java.io.Externalizable
, java.io.Serializable
, DefaultInfo
, Formatable
, TypedFormat
public class DefaultInfoImpl extends java.lang.Object implements DefaultInfo, Formatable
Modifier and Type | Field | Description |
---|---|---|
private static int |
BITS_MASK_IS_DEFAULTVALUE_AUTOINC |
|
private static int |
BITS_MASK_IS_GENERATED_COLUMN |
|
private java.lang.String |
defaultText |
|
private DataValueDescriptor |
defaultValue |
This class implements Formatable.
|
private java.lang.String |
originalCurrentSchema |
|
private java.lang.String[] |
referencedColumnNames |
|
private int |
type |
Constructor | Description |
---|---|
DefaultInfoImpl() |
Public niladic constructor.
|
DefaultInfoImpl(boolean isDefaultValueAutoinc,
java.lang.String defaultText,
DataValueDescriptor defaultValue) |
Constructor for use with numeric types
|
DefaultInfoImpl(java.lang.String defaultText,
java.lang.String[] referencedColumnNames,
java.lang.String originalCurrentSchema) |
Constructor for use with generated columns
|
Modifier and Type | Method | Description |
---|---|---|
private static int |
calcType(boolean isDefaultValueAutoinc) |
This function returns stored value for flags and so on.
|
java.lang.String |
getDefaultText() |
Get the text of a default.
|
DataValueDescriptor |
getDefaultValue() |
Get the default value.
|
java.lang.String |
getOriginalCurrentSchema() |
Return the name of the current schema when the default was created.
|
java.lang.String[] |
getReferencedColumnNames() |
If this default is a generation clause, then return the names of
other columns in the row which the generation clause references.
|
int |
getTypeFormatId() |
Get the formatID which corresponds to this class.
|
boolean |
isDefaultValueAutoinc() |
Is default value generated by auto increment?
|
boolean |
isGeneratedColumn() |
Return true if this is the generation clause for a generated column.
|
void |
readExternal(java.io.ObjectInput in) |
Read this object from a stream of stored objects.
|
void |
setDefaultValue(DataValueDescriptor defaultValue) |
Set the default value.
|
java.lang.String |
toString() |
|
void |
writeExternal(java.io.ObjectOutput out) |
Write this object to a stream of stored objects.
|
private DataValueDescriptor defaultValue
private java.lang.String defaultText
private int type
private java.lang.String[] referencedColumnNames
private java.lang.String originalCurrentSchema
private static final int BITS_MASK_IS_DEFAULTVALUE_AUTOINC
private static final int BITS_MASK_IS_GENERATED_COLUMN
public DefaultInfoImpl()
public DefaultInfoImpl(boolean isDefaultValueAutoinc, java.lang.String defaultText, DataValueDescriptor defaultValue)
defaultText
- The text of the default.public DefaultInfoImpl(java.lang.String defaultText, java.lang.String[] referencedColumnNames, java.lang.String originalCurrentSchema)
defaultText
- Text of generation clause.referencedColumnNames
- names of other columns in the base row which are mentioned in the generation clause.originalCurrentSchema
- Schema in effect when the generate column was added to the table.public java.lang.String getDefaultText()
DefaultInfo
getDefaultText
in interface DefaultInfo
DefaultInfo.getDefaultText()
public java.lang.String[] getReferencedColumnNames()
DefaultInfo
getReferencedColumnNames
in interface DefaultInfo
DefaultInfo.getReferencedColumnNames()
public java.lang.String getOriginalCurrentSchema()
DefaultInfo
getOriginalCurrentSchema
in interface DefaultInfo
DefaultInfo.getOriginalCurrentSchema()
public java.lang.String toString()
toString
in class java.lang.Object
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- read this.java.io.IOException
- thrown on errorjava.lang.ClassNotFoundException
- thrown on errorpublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- write bytes here.java.io.IOException
- thrown on errorpublic int getTypeFormatId()
getTypeFormatId
in interface TypedFormat
public DataValueDescriptor getDefaultValue()
public void setDefaultValue(DataValueDescriptor defaultValue)
defaultValue
- The default value.public boolean isDefaultValueAutoinc()
DefaultInfo
isDefaultValueAutoinc
in interface DefaultInfo
DefaultInfo.isDefaultValueAutoinc()
public boolean isGeneratedColumn()
DefaultInfo
isGeneratedColumn
in interface DefaultInfo
DefaultInfo.isGeneratedColumn()
private static int calcType(boolean isDefaultValueAutoinc)
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.