Class ColumnInfo
java.lang.Object
org.apache.derby.impl.sql.execute.ColumnInfo
- All Implemented Interfaces:
Externalizable
,Serializable
,Formatable
,TypedFormat
This is the Column descriptor that is passed from Compilation to Execution
for CREATE TABLE statements.
- Version:
- 0.1
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
This class implements Formatable.(package private) long
(package private) boolean
(package private) long
(package private) long
static final int
(package private) DataTypeDescriptor
(package private) DefaultInfo
(package private) DataValueDescriptor
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
(package private) String
(package private) UUID
(package private) UUID
(package private) ProviderInfo[]
-
Constructor Summary
ConstructorsConstructorDescriptionPublic niladic constructor.ColumnInfo
(String name, DataTypeDescriptor dataType, DataValueDescriptor defaultValue, DefaultInfo defaultInfo, ProviderInfo[] providers, UUID newDefaultUUID, UUID oldDefaultUUID, int action, long autoincStart, long autoincInc, boolean autoincCycle, long autoinc_create_or_modify_Start_Increment) Make one of these puppies. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the formatID which corresponds to this class.void
Read this object from a stream of stored objects.toString()
void
Write this object to a stream of stored objects.
-
Field Details
-
action
int actionThis class implements Formatable. That means that it can write itself to and from a formatted stream. If you add more fields to this class, make sure that you also write/read them with the writeExternal()/readExternal() methods. If, inbetween releases, you add more fields to this class, then you should bump the version number emitted by the getTypeFormatId() method. -
name
String name -
dataType
DataTypeDescriptor dataType -
defaultInfo
DefaultInfo defaultInfo -
providers
ProviderInfo[] providers -
defaultValue
DataValueDescriptor defaultValue -
newDefaultUUID
UUID newDefaultUUID -
oldDefaultUUID
UUID oldDefaultUUID -
autoincStart
long autoincStart -
autoincInc
long autoincInc -
autoincCycle
boolean autoincCycle -
autoinc_create_or_modify_Start_Increment
long autoinc_create_or_modify_Start_Increment -
CREATE
public static final int CREATE- See Also:
-
DROP
public static final int DROP- See Also:
-
MODIFY_COLUMN_TYPE
public static final int MODIFY_COLUMN_TYPE- See Also:
-
MODIFY_COLUMN_CONSTRAINT
public static final int MODIFY_COLUMN_CONSTRAINT- See Also:
-
MODIFY_COLUMN_CONSTRAINT_NOT_NULL
public static final int MODIFY_COLUMN_CONSTRAINT_NOT_NULL- See Also:
-
MODIFY_COLUMN_DEFAULT_RESTART
public static final int MODIFY_COLUMN_DEFAULT_RESTART- See Also:
-
MODIFY_COLUMN_DEFAULT_INCREMENT
public static final int MODIFY_COLUMN_DEFAULT_INCREMENT- See Also:
-
MODIFY_COLUMN_DEFAULT_VALUE
public static final int MODIFY_COLUMN_DEFAULT_VALUE- See Also:
-
MODIFY_COLUMN_GENERATED_ALWAYS
public static final int MODIFY_COLUMN_GENERATED_ALWAYS- See Also:
-
MODIFY_COLUMN_GENERATED_BY_DEFAULT
public static final int MODIFY_COLUMN_GENERATED_BY_DEFAULT- See Also:
-
MODIFY_COLUMN_DEFAULT_CYCLE
public static final int MODIFY_COLUMN_DEFAULT_CYCLE- See Also:
-
-
Constructor Details
-
ColumnInfo
public ColumnInfo()Public niladic constructor. Needed for Formatable interface to work. -
ColumnInfo
public ColumnInfo(String name, DataTypeDescriptor dataType, DataValueDescriptor defaultValue, DefaultInfo defaultInfo, ProviderInfo[] providers, UUID newDefaultUUID, UUID oldDefaultUUID, int action, long autoincStart, long autoincInc, boolean autoincCycle, long autoinc_create_or_modify_Start_Increment) Make one of these puppies.- Parameters:
name
- Column name.dataType
- Column type.defaultValue
- Column default value.defaultInfo
- Column default info.providers
- Array of providers that this column depends on.newDefaultUUID
- New UUID for default.oldDefaultUUID
- Old UUID for default.action
- Action (create, modify default, etc.)autoincStart
- Start of autoincrement values.autoincInc
- Increment of autoincrement values-- if parameter is 0, it implies that this is not an autoincrement value.
-
-
Method Details
-
readExternal
Read this object from a stream of stored objects.- Specified by:
readExternal
in interfaceExternalizable
- Parameters:
in
- read this.- Throws:
IOException
- thrown on errorClassNotFoundException
- thrown on error
-
writeExternal
Write this object to a stream of stored objects.- Specified by:
writeExternal
in interfaceExternalizable
- Parameters:
out
- write bytes here.- Throws:
IOException
- thrown on error
-
getTypeFormatId
public int getTypeFormatId()Get the formatID which corresponds to this class.- Specified by:
getTypeFormatId
in interfaceTypedFormat
- Returns:
- the formatID of this class
-
getDataType
-
toString
-