|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.objectweb.cjdbc.common.sql.schema.DatabaseColumn
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).
| Field Summary | |
private boolean |
isUnique
true if this column has a UNIQUE constraint
(like primary keys for example). |
private java.lang.String |
name
Column name. |
private int |
type
Type of the column ( VARCHAR,TEXT, ...). |
| Constructor Summary | |
DatabaseColumn(java.lang.String name,
boolean isUnique)
Creates a new DatabaseColumn instance. |
|
DatabaseColumn(java.lang.String name,
boolean isUnique,
int type)
Creates a new DatabaseColumn instance. |
|
| Method Summary | |
boolean |
equals(java.lang.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. |
boolean |
equalsIgnoreType(java.lang.Object other)
This function is the same as equal but ignores the column type. |
java.lang.String |
getName()
Gets the column name. |
int |
getType()
Returns the column type according to java.sql.Types. |
java.lang.String |
getXml()
Get xml information about this column. |
boolean |
isUnique()
Tests if the column has a UNIQUE constraint (like primary
keys for example). |
void |
setIsUnique(boolean bool)
Sets the value of isUnique. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.lang.String name
private boolean isUnique
true if this column has a UNIQUE constraint
(like primary keys for example).
private int type
VARCHAR,TEXT, ...).
| Constructor Detail |
public DatabaseColumn(java.lang.String name,
boolean isUnique)
DatabaseColumn instance.
name - name of the columnisUnique - true if this column has a UNIQUE
constraint
public DatabaseColumn(java.lang.String name,
boolean isUnique,
int type)
DatabaseColumn instance.
name - name of the columnisUnique - true if this column has a UNIQUE
constrainttype - type of the column (VARCHAR,TEXT,
...)| Method Detail |
public java.lang.String getName()
String value.public boolean isUnique()
UNIQUE constraint (like primary
keys for example).
true if the column has a UNIQUE
constraintpublic void setIsUnique(boolean bool)
isUnique.
bool - true if the column has a UNIQUE
constraint (like primary keys for example).public int getType()
java.sql.Types.
Types.NULL if the type is
not set.Typespublic boolean equals(java.lang.Object other)
DatabaseColumn are considered equal if they have the
same name and type and if they are both unique or both non unique.
other - the object to compare with
true if the columns are equalpublic boolean equalsIgnoreType(java.lang.Object other)
other - the object to compare with
equals(Object)public java.lang.String getXml()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||