Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.iapi.sql.dictionary
Class ColumnDescriptor  view ColumnDescriptor download ColumnDescriptor.java

java.lang.Object
  extended byorg.apache.derby.iapi.sql.dictionary.TupleDescriptor
      extended byorg.apache.derby.iapi.sql.dictionary.ColumnDescriptor

public class ColumnDescriptor
extends TupleDescriptor

This class represents a column descriptor. public methods in this class are:

  1. long getAutoincStart()
  2. java.lang.String getColumnName()
  3. DefaultDescriptor getDefaultDescriptor(DataDictionary dd)
  4. DefaultInfo getDefaultInfo
  5. UUID getDefaultUUID
  6. DataValueDescriptor getDefaultValue
  7. int getPosition()
  8. UUID getReferencingUUID()
  9. TableDescriptor getTableDescriptor
  10. DTD getType()
  11. hasNonNullDefault
  12. isAutoincrement
  13. setColumnName
  14. setPosition


Field Summary
(package private)  long autoincInc
           
(package private)  long autoincStart
           
(package private)  org.apache.derby.iapi.types.DataValueDescriptor columnDefault
           
(package private)  org.apache.derby.catalog.DefaultInfo columnDefaultInfo
           
(package private)  java.lang.String columnName
           
(package private)  int columnPosition
           
(package private)  org.apache.derby.iapi.types.DataTypeDescriptor columnType
           
(package private)  org.apache.derby.catalog.UUID defaultUUID
           
(package private)  TableDescriptor table
           
(package private)  org.apache.derby.catalog.UUID uuid
           
 
Fields inherited from class org.apache.derby.iapi.sql.dictionary.TupleDescriptor
COLUMN_LIST, CONGLOMERATE_LIST, CONSTRAINT_LIST, TRIGGER_LIST
 
Constructor Summary
ColumnDescriptor(java.lang.String columnName, int columnPosition, org.apache.derby.iapi.types.DataTypeDescriptor columnType, org.apache.derby.iapi.types.DataValueDescriptor columnDefault, org.apache.derby.catalog.DefaultInfo columnDefaultInfo, TableDescriptor table, org.apache.derby.catalog.UUID defaultUUID, long autoincStart, long autoincInc, boolean autoinc)
          Constructor for a ColumnDescriptor
ColumnDescriptor(java.lang.String columnName, int columnPosition, org.apache.derby.iapi.types.DataTypeDescriptor columnType, org.apache.derby.iapi.types.DataValueDescriptor columnDefault, org.apache.derby.catalog.DefaultInfo columnDefaultInfo, org.apache.derby.catalog.UUID uuid, org.apache.derby.catalog.UUID defaultUUID, long autoincStart, long autoincInc, boolean autoinc)
          Constructor for a ColumnDescriptor.
 
Method Summary
private static void assertAutoinc(boolean autoinc, long autoincInc, org.apache.derby.catalog.DefaultInfo defaultInfo)
           
 long getAutoincInc()
          Get the Increment value given by the user for an autoincrement column
 long getAutoincStart()
          Get the start value of 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.
 org.apache.derby.catalog.DefaultInfo getDefaultInfo()
          Get the DefaultInfo for this ColumnDescriptor.
 org.apache.derby.catalog.UUID getDefaultUUID()
          Get the UUID for the column default, if any.
 org.apache.derby.iapi.types.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)
 org.apache.derby.catalog.UUID getReferencingUUID()
          Get the UUID of the object the column is a part of.
 TableDescriptor getTableDescriptor()
          Get the TableDescriptor of the column's table.
 org.apache.derby.iapi.types.DataTypeDescriptor getType()
          Get the TypeDescriptor of the column's datatype.
 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 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()
           
 
Methods inherited from class org.apache.derby.iapi.sql.dictionary.TupleDescriptor
getColumnDependableFinder, getDataDictionary, getDependableFinder, isPersistent, setDataDictionary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

columnDefaultInfo

org.apache.derby.catalog.DefaultInfo columnDefaultInfo

table

TableDescriptor table

columnName

java.lang.String columnName

columnPosition

int columnPosition

columnType

org.apache.derby.iapi.types.DataTypeDescriptor columnType

columnDefault

org.apache.derby.iapi.types.DataValueDescriptor columnDefault

uuid

org.apache.derby.catalog.UUID uuid

defaultUUID

org.apache.derby.catalog.UUID defaultUUID

autoincStart

long autoincStart

autoincInc

long autoincInc
Constructor Detail

ColumnDescriptor

public ColumnDescriptor(java.lang.String columnName,
                        int columnPosition,
                        org.apache.derby.iapi.types.DataTypeDescriptor columnType,
                        org.apache.derby.iapi.types.DataValueDescriptor columnDefault,
                        org.apache.derby.catalog.DefaultInfo columnDefaultInfo,
                        TableDescriptor table,
                        org.apache.derby.catalog.UUID defaultUUID,
                        long autoincStart,
                        long autoincInc,
                        boolean autoinc)
Constructor for a ColumnDescriptor


ColumnDescriptor

public ColumnDescriptor(java.lang.String columnName,
                        int columnPosition,
                        org.apache.derby.iapi.types.DataTypeDescriptor columnType,
                        org.apache.derby.iapi.types.DataValueDescriptor columnDefault,
                        org.apache.derby.catalog.DefaultInfo columnDefaultInfo,
                        org.apache.derby.catalog.UUID uuid,
                        org.apache.derby.catalog.UUID defaultUUID,
                        long autoincStart,
                        long autoincInc,
                        boolean autoinc)
Constructor for a ColumnDescriptor. Used when columnDescriptor doesn't know/care about a table descriptor.

Method Detail

getReferencingUUID

public org.apache.derby.catalog.UUID getReferencingUUID()
Get the UUID of the object the column is a part of.


getTableDescriptor

public TableDescriptor getTableDescriptor()
Get the TableDescriptor of the column's table.


getColumnName

public java.lang.String getColumnName()
Get the name of the column.


setColumnName

public void setColumnName(java.lang.String newColumnName)
Sets the column name in case of rename column.


setTableDescriptor

public void setTableDescriptor(TableDescriptor tableDescriptor)
Sets the table descriptor for the column.


getPosition

public int getPosition()
Get the ordinal position of the column (1 based)


getType

public org.apache.derby.iapi.types.DataTypeDescriptor getType()
Get the TypeDescriptor of the column's datatype.


hasNonNullDefault

public boolean hasNonNullDefault()
Return whether or not there is a non-null default on this column.


getDefaultValue

public org.apache.derby.iapi.types.DataValueDescriptor getDefaultValue()
Get the default value for the column. For columns with primitive types, the object returned will be of the corresponding object type. For example, for a float column, getDefaultValue() will return a Float.


getDefaultInfo

public org.apache.derby.catalog.DefaultInfo getDefaultInfo()
Get the DefaultInfo for this ColumnDescriptor.


getDefaultUUID

public org.apache.derby.catalog.UUID getDefaultUUID()
Get the UUID for the column default, if any.


getDefaultDescriptor

public DefaultDescriptor getDefaultDescriptor(DataDictionary dd)
Get a DefaultDescriptor for the default, if any, associated with this column.


isAutoincrement

public boolean isAutoincrement()
Is this column an autoincrement column?


updatableByCursor

public boolean updatableByCursor()

isAutoincAlways

public boolean isAutoincAlways()
Is this column to have autoincremented value always ?


getAutoincStart

public long getAutoincStart()
Get the start value of an autoincrement column


getAutoincInc

public long getAutoincInc()
Get the Increment value given by the user for an autoincrement column


setPosition

public void setPosition(int columnPosition)
Set the ordinal position of the column.


toString

public java.lang.String toString()
Convert the ColumnDescriptor to a String.


getDescriptorName

public java.lang.String getDescriptorName()
Overrides:
getDescriptorName in class TupleDescriptor

getDescriptorType

public java.lang.String getDescriptorType()
Description copied from class: TupleDescriptor
Each descriptor must identify itself with its type; i.e index, check constraint whatever.

Overrides:
getDescriptorType in class TupleDescriptor

assertAutoinc

private static void assertAutoinc(boolean autoinc,
                                  long autoincInc,
                                  org.apache.derby.catalog.DefaultInfo defaultInfo)