com.silverpeas.mydb.data.db
Class DbColumn

java.lang.Object
  extended by com.silverpeas.mydb.data.db.DbColumn

public class DbColumn
extends Object

Database column.

Author:
Antoine HEDIN

Field Summary
static String COLUMN_DEF
           
static String COLUMN_NAME
           
static String COLUMN_SIZE
           
static String DATA_TYPE
           
static int DEFAULT_DATA_SIZE
           
static int DEFAULT_DATA_TYPE
           
static String FK_NAME
           
static String FKCOLUMN_NAME
           
static String FKTABLE_NAME
           
static int MAX_DATA_SIZE
           
static String NULLABLE
           
static String PKCOLUMN_NAME
           
static String PKTABLE_NAME
           
 
Constructor Summary
DbColumn(String name)
           
DbColumn(String name, int dataType, int dataSize)
           
DbColumn(String name, int dataType, int dataSize, boolean nullable, String defaultValue)
           
 
Method Summary
 void addExportedForeignKey(DbForeignKey exportedForeignKey)
           
 int getDataSize()
           
 String getDataSizeAsString()
           
 int getDataType()
           
 String getDefaultValue()
           
 String getDefaultValueAsString()
           
 DbForeignKey[] getExportedForeignKeys()
           
 DbForeignKey getImportedForeignKey()
           
 String getInfo(DataTypeList dataTypeList)
           
 String getName()
           
 boolean hasDataSize()
           
 boolean hasDefaultValue()
           
 boolean hasExportedForeignKeys()
           
 boolean hasImportedForeignKey()
           
 boolean isAutoIncrement()
           
 boolean isNullable()
           
 boolean isReadOnly()
           
 void removeDataSize()
           
 void setAutoIncrement(boolean autoIncrement)
           
 void setDataSize(int dataSize)
           
 void setDataType(int dataType)
           
 void setDefaultValue(String defaultValue)
           
 void setImportedForeignKey(DbForeignKey importedForeignKey)
           
 void setName(String name)
           
 void setNullable(boolean nullable)
           
 void setReadOnly(boolean readOnly)
           
 void update(DbColumn column)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLUMN_NAME

public static final String COLUMN_NAME
See Also:
Constant Field Values

DATA_TYPE

public static final String DATA_TYPE
See Also:
Constant Field Values

COLUMN_SIZE

public static final String COLUMN_SIZE
See Also:
Constant Field Values

NULLABLE

public static final String NULLABLE
See Also:
Constant Field Values

COLUMN_DEF

public static final String COLUMN_DEF
See Also:
Constant Field Values

FK_NAME

public static final String FK_NAME
See Also:
Constant Field Values

FKTABLE_NAME

public static final String FKTABLE_NAME
See Also:
Constant Field Values

FKCOLUMN_NAME

public static final String FKCOLUMN_NAME
See Also:
Constant Field Values

PKTABLE_NAME

public static final String PKTABLE_NAME
See Also:
Constant Field Values

PKCOLUMN_NAME

public static final String PKCOLUMN_NAME
See Also:
Constant Field Values

DEFAULT_DATA_TYPE

public static final int DEFAULT_DATA_TYPE
See Also:
Constant Field Values

DEFAULT_DATA_SIZE

public static final int DEFAULT_DATA_SIZE
See Also:
Constant Field Values

MAX_DATA_SIZE

public static final int MAX_DATA_SIZE
See Also:
Constant Field Values
Constructor Detail

DbColumn

public DbColumn(String name,
                int dataType,
                int dataSize,
                boolean nullable,
                String defaultValue)

DbColumn

public DbColumn(String name,
                int dataType,
                int dataSize)

DbColumn

public DbColumn(String name)
Method Detail

getName

public String getName()

setName

public void setName(String name)

getDataType

public int getDataType()

setDataType

public void setDataType(int dataType)

getDataSize

public int getDataSize()

getDataSizeAsString

public String getDataSizeAsString()

setDataSize

public void setDataSize(int dataSize)

removeDataSize

public void removeDataSize()

hasDataSize

public boolean hasDataSize()

isNullable

public boolean isNullable()

setNullable

public void setNullable(boolean nullable)

isReadOnly

public boolean isReadOnly()

setReadOnly

public void setReadOnly(boolean readOnly)

isAutoIncrement

public boolean isAutoIncrement()

setAutoIncrement

public void setAutoIncrement(boolean autoIncrement)

getDefaultValue

public String getDefaultValue()

getDefaultValueAsString

public String getDefaultValueAsString()

hasDefaultValue

public boolean hasDefaultValue()

setDefaultValue

public void setDefaultValue(String defaultValue)

getImportedForeignKey

public DbForeignKey getImportedForeignKey()

hasImportedForeignKey

public boolean hasImportedForeignKey()

setImportedForeignKey

public void setImportedForeignKey(DbForeignKey importedForeignKey)

getExportedForeignKeys

public DbForeignKey[] getExportedForeignKeys()

hasExportedForeignKeys

public boolean hasExportedForeignKeys()

addExportedForeignKey

public void addExportedForeignKey(DbForeignKey exportedForeignKey)

update

public void update(DbColumn column)

getInfo

public String getInfo(DataTypeList dataTypeList)


Copyright © 2016 Silverpeas. All Rights Reserved.