| java.lang.Object org.continuent.sequoia.common.sql.schema.DatabaseColumn
DatabaseColumn | public class DatabaseColumn implements Serializable(Code) | | A DatabaseColumn represents a column of a database table. It
is composed of a name, type (not used yet) and a boolean indicated whether or
not rows are unique or not (like primary keys or columns created explicitely
with the UNIQUE keyword).
author: Emmanuel Cecchet author: Julie Marguerite version: 1.0 |
Constructor Summary | |
public | DatabaseColumn(String name, boolean isUnique) Creates a new DatabaseColumn instance. | public | DatabaseColumn(String name, boolean isUnique, int type) Creates a new DatabaseColumn instance. |
Method Summary | |
public boolean | equals(Object other) Two DatabaseColumn are considered equal if they have the
same name and type and if they are both unique or both non unique. | public boolean | equalsIgnoreType(Object other) This function is the same as equal but ignores the column type. | public String | getName() Gets the column name. | public int | getType() Returns the column type according to java.sql.Types .
the column type. | public String | getXml() Get xml information about this column. | public boolean | isUnique() Tests if the column has a UNIQUE constraint (like primary
keys for example). | public void | setIsUnique(boolean bool) Sets the value of
DatabaseColumn.isUnique . | final public void | setType(int type) Sets the type value. | public String | toString() |
DatabaseColumn | public DatabaseColumn(String name, boolean isUnique)(Code) | | Creates a new DatabaseColumn instance.
Parameters: name - name of the column Parameters: isUnique - true if this column has aUNIQUE constraint |
DatabaseColumn | public DatabaseColumn(String name, boolean isUnique, int type)(Code) | | Creates a new DatabaseColumn instance.
Parameters: name - name of the column Parameters: isUnique - true if this column has aUNIQUE constraint Parameters: type - type of the column (VARCHAR ,TEXT ,...) |
equals | public boolean equals(Object other)(Code) | | Two DatabaseColumn are considered equal if they have the
same name and type and if they are both unique or both non unique.
Parameters: other - the object to compare with true if the columns are equal |
equalsIgnoreType | public boolean equalsIgnoreType(Object other)(Code) | | This function is the same as equal but ignores the column type.
Parameters: other - the object to compare with true if the columns are equal ignoring their type. See Also: DatabaseColumn.equals(Object) |
getName | public String getName()(Code) | | Gets the column name.
a String value. |
getType | public int getType()(Code) | | Returns the column type according to java.sql.Types .
the column type. Returns Types.NULL if the type isnot set. See Also: java.sql.Types |
getXml | public String getXml()(Code) | | Get xml information about this column.
xml formatted information on this database column. |
isUnique | public boolean isUnique()(Code) | | Tests if the column has a UNIQUE constraint (like primary
keys for example).
true if the column has a UNIQUE constraint |
setIsUnique | public void setIsUnique(boolean bool)(Code) | | Sets the value of
DatabaseColumn.isUnique .
Parameters: bool - true if the column has a UNIQUE constraint (like primary keys for example). |
setType | final public void setType(int type)(Code) | | Sets the type value.
Parameters: type - The type to set. |
|
|