|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.cortex.ColumnDeclaration
public class ColumnDeclaration
This represents the declaration of a column, to be used as part of a TableDeclaration object.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Constructor Summary | |
---|---|
ColumnDeclaration(java.lang.String pName,
int pType)
Constructs a new ColumnDeclaration |
|
ColumnDeclaration(java.lang.String pName,
int pType,
int pSize)
Constructs a new ColumnDeclaration |
Method Summary | |
---|---|
java.lang.String |
getAdditionalConstraints()
Returns any additional, possibly database-dependent constraints for the column. |
static java.lang.String |
getJDBCTypeName(int pType)
Returns the name of the JDBC type corresponding to the type specified from java.sql.Types |
java.lang.String |
getName()
Returns the name of the column |
int |
getSize()
Returns the size of the column |
int |
getType()
Returns the type of the column taken from java.sql.Types |
boolean |
isNotNull()
Returns true if the NOT NULL constraint was added to the column. |
boolean |
isNull()
Returns true if the NULL constraint was added to the column. |
boolean |
isPrimaryKey()
Returns true if the PRIMARY KEY constraint was added to the column. |
boolean |
isSizeDeclared()
Returns true is a size was declared for the column |
boolean |
isUnique()
Returns true if the UNIQUE constraint was added to the column. |
ColumnDeclaration |
withAdditionalConstraints(java.lang.String pAdditionalConstraints)
Adds any other additional constraints to the column that are passed directly to the CREATE TABLE statement. |
ColumnDeclaration |
withNotNull()
Adds the NOT NULL constraint to the column. |
ColumnDeclaration |
withNull()
Adds the NULL constraint to the column. |
ColumnDeclaration |
withPrimaryKey()
Adds the PRIMARY KEY constraint to the column. |
ColumnDeclaration |
withSize(int pSize)
Sets the size of the column. |
ColumnDeclaration |
withUnique()
Adds the UNIQUE constraint to the column. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public ColumnDeclaration(java.lang.String pName, int pType)
pName
- the name of the columnpType
- the SQL type as taken from java.sql.Typespublic ColumnDeclaration(java.lang.String pName, int pType, int pSize)
pName
- the name of the columnpType
- the SQL type as taken from java.sql.TypespSize
- the size of the column, for variable-length typesMethod Detail |
---|
public ColumnDeclaration withSize(int pSize)
public ColumnDeclaration withNull()
public ColumnDeclaration withNotNull()
public ColumnDeclaration withUnique()
public ColumnDeclaration withPrimaryKey()
public ColumnDeclaration withAdditionalConstraints(java.lang.String pAdditionalConstraints)
public java.lang.String getName()
public int getType()
public int getSize()
public boolean isSizeDeclared()
public boolean isNull()
public boolean isNotNull()
public boolean isUnique()
public boolean isPrimaryKey()
public java.lang.String getAdditionalConstraints()
public static java.lang.String getJDBCTypeName(int pType)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |