public final class ColumnDescriptor extends TupleDescriptor
Modifier and Type | Field and Description |
---|---|
(package private) long |
autoinc_create_or_modify_Start_Increment |
private long |
autoincInc |
private long |
autoincStart |
private long |
autoincValue |
private DataValueDescriptor |
columnDefault |
private DefaultInfo |
columnDefaultInfo |
private java.lang.String |
columnName |
private int |
columnPosition |
private DataTypeDescriptor |
columnType |
private UUID |
defaultUUID |
private TableDescriptor |
table |
private UUID |
uuid |
Constructor and Description |
---|
ColumnDescriptor(java.lang.String columnName,
int columnPosition,
DataTypeDescriptor columnType,
DataValueDescriptor columnDefault,
DefaultInfo columnDefaultInfo,
TableDescriptor table,
UUID defaultUUID,
long autoincStart,
long autoincInc)
Constructor for a ColumnDescriptor
|
ColumnDescriptor(java.lang.String columnName,
int columnPosition,
DataTypeDescriptor columnType,
DataValueDescriptor columnDefault,
DefaultInfo columnDefaultInfo,
TableDescriptor table,
UUID defaultUUID,
long autoincStart,
long autoincInc,
long userChangedWhat)
Constructor for a ColumnDescriptor when the column involved
is an autoincrement column.
|
ColumnDescriptor(java.lang.String columnName,
int columnPosition,
DataTypeDescriptor columnType,
DataValueDescriptor columnDefault,
DefaultInfo columnDefaultInfo,
UUID uuid,
UUID defaultUUID,
long autoincStart,
long autoincInc,
long autoincValue)
Constructor for a ColumnDescriptor.
|
Modifier and Type | Method and Description |
---|---|
private static void |
assertAutoinc(boolean autoinc,
long autoincInc,
DefaultInfo defaultInfo) |
long |
getAutoinc_create_or_modify_Start_Increment() |
long |
getAutoincInc()
Get the Increment value given by the user for an autoincrement column
|
long |
getAutoincStart()
Get the start value of an autoincrement column
|
long |
getAutoincValue()
Get the current value for an autoincrement column.
|
java.lang.String |
getColumnName()
Get the name of the column.
|
DefaultDescriptor |
getDefaultDescriptor(DataDictionary dd)
Get a DefaultDescriptor for the default, if any, associated with this column.
|
DefaultInfo |
getDefaultInfo()
Get the DefaultInfo for this ColumnDescriptor.
|
UUID |
getDefaultUUID()
Get the UUID for the column default, if any.
|
DataValueDescriptor |
getDefaultValue()
Get the default value for the column.
|
java.lang.String |
getDescriptorName() |
java.lang.String |
getDescriptorType()
Each descriptor must identify itself with its type; i.e index, check
constraint whatever.
|
int |
getPosition()
Get the ordinal position of the column (1 based)
|
UUID |
getReferencingUUID()
Get the UUID of the object the column is a part of.
|
TableDescriptor |
getTableDescriptor()
Get the TableDescriptor of the column's table.
|
DataTypeDescriptor |
getType()
Get the TypeDescriptor of the column's datatype.
|
boolean |
hasGenerationClause()
Is this column a generated column
|
boolean |
hasNonNullDefault()
Return whether or not there is a non-null default on this column.
|
boolean |
isAutoincAlways()
Is this column to have autoincremented value always ?
|
boolean |
isAutoincrement()
Is this column an autoincrement column?
|
void |
setAutoinc_create_or_modify_Start_Increment(int c_or_m) |
void |
setColumnName(java.lang.String newColumnName)
Sets the column name in case of rename column.
|
void |
setPosition(int columnPosition)
Set the ordinal position of the column.
|
void |
setTableDescriptor(TableDescriptor tableDescriptor)
Sets the table descriptor for the column.
|
java.lang.String |
toString()
Convert the ColumnDescriptor to a String.
|
boolean |
updatableByCursor() |
getColumnDependableFinder, getDataDictionary, getDependableFinder, isPersistent, setDataDictionary
private DefaultInfo columnDefaultInfo
private TableDescriptor table
private java.lang.String columnName
private int columnPosition
private DataTypeDescriptor columnType
private DataValueDescriptor columnDefault
private UUID uuid
private UUID defaultUUID
private long autoincStart
private long autoincInc
private long autoincValue
long autoinc_create_or_modify_Start_Increment
public ColumnDescriptor(java.lang.String columnName, int columnPosition, DataTypeDescriptor columnType, DataValueDescriptor columnDefault, DefaultInfo columnDefaultInfo, TableDescriptor table, UUID defaultUUID, long autoincStart, long autoincInc, long userChangedWhat)
columnName
- The name of the columncolumnPosition
- The ordinal position of the columncolumnType
- A DataTypeDescriptor for the type of
the columncolumnDefault
- A DataValueDescriptor representing the
default value of the column, if any
(null if no default)columnDefaultInfo
- The default info for the column.table
- A TableDescriptor for the table the
column is indefaultUUID
- The UUID for the default, if any.autoincStart
- Start value for an autoincrement column.autoincInc
- Increment for autoincrement columnuserChangedWhat
- Adding an autoincrement column OR
changing increment value or start value of
the autoincrement column.public ColumnDescriptor(java.lang.String columnName, int columnPosition, DataTypeDescriptor columnType, DataValueDescriptor columnDefault, DefaultInfo columnDefaultInfo, TableDescriptor table, UUID defaultUUID, long autoincStart, long autoincInc)
columnName
- The name of the columncolumnPosition
- The ordinal position of the columncolumnType
- A DataTypeDescriptor for the type of
the columncolumnDefault
- A DataValueDescriptor representing the
default value of the column, if any
(null if no default)columnDefaultInfo
- The default info for the column.table
- A TableDescriptor for the table the
column is indefaultUUID
- The UUID for the default, if any.autoincStart
- Start value for an autoincrement column.autoincInc
- Increment for autoincrement columnpublic ColumnDescriptor(java.lang.String columnName, int columnPosition, DataTypeDescriptor columnType, DataValueDescriptor columnDefault, DefaultInfo columnDefaultInfo, UUID uuid, UUID defaultUUID, long autoincStart, long autoincInc, long autoincValue)
columnName
- The name of the columncolumnPosition
- The ordinal position of the columncolumnType
- A DataTypeDescriptor for the type of
the columncolumnDefault
- A DataValueDescriptor representing the
default value of the column, if any
(null if no default)columnDefaultInfo
- The default info for the column.uuid
- A uuid for the object that this column
is in.defaultUUID
- The UUID for the default, if any.autoincStart
- Start value for an autoincrement column.autoincInc
- Increment for autoincrement columnautoincValue
- Current value of the autoincrement columnpublic UUID getReferencingUUID()
public TableDescriptor getTableDescriptor()
public java.lang.String getColumnName()
public void setColumnName(java.lang.String newColumnName)
newColumnName
- The new column name.public void setTableDescriptor(TableDescriptor tableDescriptor)
tableDescriptor
- The table descriptor for this columnpublic int getPosition()
public DataTypeDescriptor getType()
public boolean hasNonNullDefault()
public DataValueDescriptor getDefaultValue()
public DefaultInfo getDefaultInfo()
public UUID getDefaultUUID()
public DefaultDescriptor getDefaultDescriptor(DataDictionary dd)
dd
- The DataDictionary.public boolean isAutoincrement()
public boolean updatableByCursor()
public boolean hasGenerationClause()
public boolean isAutoincAlways()
public long getAutoincStart()
public long getAutoincInc()
public long getAutoincValue()
public long getAutoinc_create_or_modify_Start_Increment()
public void setAutoinc_create_or_modify_Start_Increment(int c_or_m)
public void setPosition(int columnPosition)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getDescriptorName()
getDescriptorName
in class TupleDescriptor
TupleDescriptor.getDescriptorName()
public java.lang.String getDescriptorType()
TupleDescriptor
getDescriptorType
in class TupleDescriptor
TupleDescriptor.getDescriptorType()
private static void assertAutoinc(boolean autoinc, long autoincInc, DefaultInfo defaultInfo)
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.