Method Summary |
|
public Inheritance | addInheritance(Attributes attrib) A utility function to create a new column
from attrib and add it to this table. |
public void | addInheritance(Inheritance inh) |
public void | addOption(String key, String value) Add an XML Specified option key/value pair to this element's option set. |
public void | addReferrer(ForeignKey fk) Adds the foreign key from another table that refers to this column. |
public String | getAutoIncrementString() |
public List | getChildren() Get the inheritance definitions. |
public String | getDefaultSetting() Return a string that will give this column a default value. |
public String | getDefaultValue() Get a string that will give this column a default value. |
public String | getDescription() |
public Domain | getDomain() |
public ForeignKey | getForeignKey() |
public String | getFullyQualifiedName() |
public String | getGetterName() |
public String | getInheritanceType() Get the value of the inheritance attribute defined in the schema XML. |
public String | getInputValidator() |
public String | getJavaName() Get name to use in Java sources to build method names. |
public String | getJavaNative() Return a string representation of the native java type which corresponds
to the JDBC type of this column. |
public String | getJavaObject() Return a string representation of the
Java object which corresponds to the JDBC
type of this column. |
public String | getJavaPrimitive() Return a string representation of the primitive java type which
corresponds to the JDBC type of this column. |
public String | getJavaType() Returns whether the type in the java object should be an object
or primitive. |
public String | getName() |
public String | getNotNullString() |
public String | getOption(String key) Get the value that was associated with this key in an XML option
element.
Parameters: key - the key of the option. |
public Map | getOptions() Gets the full ordered hashtable array of items specified by XML option
statements under this element.
Note, this is not thread save but since it's only used for
generation which is single threaded, there should be minimum
danger using this in Velocity.
An Map of all options. |
public String | getParameterParserMethod() Return ParameterParser getX() method which
corresponds to the JDBC type which represents this column. |
public String | getPeerJavaName() Returns the name of the constant that is used for the column in the Peer
class, e.g., RecordPeer.COLVARNAME.
Generally this will be a straight conversion to upper case.
But if the column name is equals to TABLE_NAME or
DATABASE_NAME (Torque predefined vars), the column name will have an _
prefixed, e.g. |
public int | getPosition() Get the location of this column within the table (one-based). |
public String | getPrecision() Try to determine the precision of the field from the size attribute. |
public List | getReferrers() Get list of references to this column. |
public String | getRelatedColumnName() Utility method to get the related column of this local column if this
column is a foreign key or part of a foreign key. |
public String | getRelatedTableName() |
public String | getScale() Try to determine the scale of the field from the scale and size
attribute. |
public String | getSetterName() |
public String | getSize() |
public String | getSqlString() |
public Table | getTable() |
public String | getTableName() |
public Object | getTorqueType() |
public Object | getType() |
public String | getUncapitalisedJavaName() |
public String | getVillageMethod() Return Village asX() method which corresponds to the JDBC type
which represents this column. |
public boolean | isAutoIncrement() Return auto increment/sequence string for the target database. |
public boolean | isBit() Returns true if the column type is boolean in the
java object and a Bit ("1" or "0") in the db. |
public boolean | isBooleanChar() Returns true if the column type is boolean in the
java object and a String ("Y" or "N") in the db. |
public boolean | isBooleanInt() Returns true if the column type is boolean in the
java object and a numeric (1 or 0) in the db. |
public boolean | isCorrectGetters() |
public boolean | isEnumeratedClasses() Determine if possible classes have been enumerated in the xml file. |
public boolean | isForeignKey() Utility method to determine if this column is a foreign key. |
public boolean | isInheritance() Determine if this column is a normal property or specifies a
the classes that are represented in the table containing this column. |
public boolean | isMultipleFK() Determine if this column is a foreign key that refers to the
same table as another foreign key column in this table. |
public boolean | isNotNull() |
public boolean | isPrimaryKey() |
public boolean | isPrimitive() |
public boolean | isProtected() |
public boolean | isString() |
public boolean | isUnique() |
public boolean | isUsePrimitive() |
public void | loadFromXML(Attributes attrib) |
public static String | makeList(List columns) Return a comma delimited string listing the specified columns. |
public boolean | needEscapedValue() Utility method to return the value as an element to be usable
in an SQL insert statement. |
public String | printSize() Return the size and scale in brackets for use in an sql schema. |
public boolean | requiresTransactionInPostgres() |
public void | setAutoIncrement(boolean value) Set the auto increment value. |
public void | setCorrectGetters(boolean correctGetters) Set the correctGetters property of the column. |
public void | setDefaultValue(String def) Set a string that will give this column a default value. |
public void | setDescription(String newDescription) |
public void | setDomain(Domain domain) |
public void | setJavaName(String javaName) Set the name to use in Java sources. |
public void | setName(String newName) |
public void | setNotNull(boolean status) |
public void | setPosition(int v) Get the location of this column within the table (one-based). |
public void | setPrimaryKey(boolean pk) |
public void | setProtected(boolean prot) |
public void | setScale(String newScale) |
public void | setSize(String newSize) |
public void | setTable(Table parent) |
public void | setType(String torqueType) |
public void | setType(SchemaType torqueType) |
public void | setTypeFromString(String typeName, String size) |
public void | setUnique(boolean u) |
public String | toString() String representation of the column. |