|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lapetus_ltd._2009.xml.types.XLptsDBCreateStatementColumnSizeType
com.lapetus_ltd.api.db.xml.types.TLptsDBCreateStatementColumnSizeType
public class TLptsDBCreateStatementColumnSizeType
Class Description : Initialisation class for the Column size of a CREATE Statement.
Field Summary |
---|
Fields inherited from class com.lapetus_ltd._2009.xml.types.XLptsDBCreateStatementColumnSizeType |
---|
size1, size2 |
Constructor Summary | |
---|---|
TLptsDBCreateStatementColumnSizeType(TLptsDBCreateStatementColumnType col)
This constructor initiates the Column Size Type. |
|
TLptsDBCreateStatementColumnSizeType(XLptsDBCreateStatementColumnSizeType ccs)
This constructor copies the Column Sizes from an existing XLptsDBCreateStatementColumnSize1Type. |
Method Summary | |
---|---|
TLptsDBCreateStatementColumnType |
getColumn()
Gets the TLptsDBCreateStatementColumnType related to this column size. |
Methods inherited from class com.lapetus_ltd._2009.xml.types.XLptsDBCreateStatementColumnSizeType |
---|
getSize1, getSize2, setSize1, setSize2 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TLptsDBCreateStatementColumnSizeType(TLptsDBCreateStatementColumnType col)
This constructor initiates the Column Size Type.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : Never.
Notes :
Default Constructor initiates the size1 and size2 to empty strings.
It also stores the column information for convenient programming getColumn()
.
Example :
//Create the statement and set the Type of Statement to Update. TLptsStatement createStatement = new TLptsStatement(connection,XLptsDBTypeOfStatementType.CREATE); ... //Create the columns //--Column idColumn TLptsDBCreateStatementColumnType idColumn = new TLptsDBCreateStatementColumnType(); //Set the column name idColumn.setColumn("id"); ... //Some types like varchar have size. Also some types like decimal has two sizes. // The first is the number of digits and the second is the number of decimal places. TLptsDBCreateStatementColumnSizeType size = new TLptsDBCreateStatementColumnSizeType(idColumn); size.setSize1("10"); size.setSize2("2"); idColumn.setSizes(size); ...
col
- the column to set as the TLptsDBCreateStatementColumnType of this column sizepublic TLptsDBCreateStatementColumnSizeType(XLptsDBCreateStatementColumnSizeType ccs)
This constructor copies the Column Sizes from an existing XLptsDBCreateStatementColumnSize1Type.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : Never.
Notes : Use this function every time you need to copy or instantiate a type XLptsDBCreateStatementColumnSize1Type class.
Example :
public void example(XLptsDBCreateStatementColumnSize1Type ccs) { TLptsCreateColumnSize1 columnSize1 = new TLptsCreateColumnSize1(ccs); }
ccs
- the class object to copy.Method Detail |
---|
public TLptsDBCreateStatementColumnType getColumn()
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : Never.
Notes :
Example :
... //Set the column size by its SQL type private void setColumnSizeByType(TLptsDBCreateStatementColumnSizeType value) { if(value.getColumn().getSqlType().getSqlType()==java.sql.Types.VARCHAR) value.setSize1(50); else if(value.getColumn().getSqlType().getSqlType()==java.sql.Types.DECIMAL) value.setSize1(10); }
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |