001: /*
002: * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
003: *
004: * This file is part of Resin(R) Open Source
005: *
006: * Each copy or derived work must preserve the copyright notice and this
007: * notice unmodified.
008: *
009: * Resin Open Source is free software; you can redistribute it and/or modify
010: * it under the terms of the GNU General Public License as published by
011: * the Free Software Foundation; either version 2 of the License, or
012: * (at your option) any later version.
013: *
014: * Resin Open Source is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017: * of NON-INFRINGEMENT. See the GNU General Public License for more
018: * details.
019: *
020: * You should have received a copy of the GNU General Public License
021: * along with Resin Open Source; if not, write to the
022: *
023: * Free Software Foundation, Inc.
024: * 59 Temple Place, Suite 330
025: * Boston, MA 02111-1307 USA
026: *
027: * @author Rodrigo Westrupp
028: */
029:
030: package com.caucho.amber.cfg;
031:
032: import java.util.ArrayList;
033:
034: /**
035: * <table-generator> tag in orm.xml
036: */
037: public class TableGeneratorConfig extends AbstractGeneratorConfig {
038:
039: // attributes
040: private String _table;
041: private String _catalog;
042: private String _schema;
043: private String _pkColumnName;
044: private String _valueColumnName;
045: private String _pkColumnValue;
046:
047: // elements
048: private ArrayList<UniqueConstraintConfig> _uniqueConstraintList = new ArrayList<UniqueConstraintConfig>();
049:
050: public String getTable() {
051: return _table;
052: }
053:
054: public void setTable(String table) {
055: _table = table;
056: }
057:
058: public String getCatalog() {
059: return _catalog;
060: }
061:
062: public void setCatalog(String catalog) {
063: _catalog = catalog;
064: }
065:
066: public String getSchema() {
067: return _schema;
068: }
069:
070: public void setSchema(String schema) {
071: _schema = schema;
072: }
073:
074: public String getPkColumnName(String pkColumnName) {
075: return _pkColumnName;
076: }
077:
078: public void setPkColumnName(String pkColumnName) {
079: _pkColumnName = pkColumnName;
080: }
081:
082: public String getValueColumnName(String valueColumnName) {
083: return _valueColumnName;
084: }
085:
086: public void setValueColumnName(String valueColumnName) {
087: _valueColumnName = valueColumnName;
088: }
089:
090: public String getPkColumnValue(String pkColumnValue) {
091: return _pkColumnValue;
092: }
093:
094: public void setPkColumnValue(String pkColumnValue) {
095: _pkColumnValue = pkColumnValue;
096: }
097:
098: public void addUniqueConstraint(
099: UniqueConstraintConfig uniqueConstraint) {
100: _uniqueConstraintList.add(uniqueConstraint);
101: }
102:
103: public ArrayList<UniqueConstraintConfig> getUniqueConstraintList() {
104: return _uniqueConstraintList;
105: }
106: }
|