Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.javatools.db
Class Column

java.lang.Object
  extended by oracle.javatools.db.AbstractDBObject
      extended by oracle.javatools.db.AbstractChildDBObject
          extended by oracle.javatools.db.Column
All Implemented Interfaces:
ChildDBObject, DBObject, Copyable, DynamicPropertySet
Direct Known Subclasses:
ViewColumn

public class Column
extends AbstractChildDBObject

Model of a database column.


Nested Class Summary
 
Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject
AbstractDBObject.ChildSupport
 
Field Summary
static java.lang.String AUTO_GENERATED_SEQUENCE
           
static java.lang.String AUTO_GENERATED_SEQUENCE_TRIGGER
           
static java.lang.String TYPE
           
 
Fields inherited from interface oracle.javatools.db.DBObject
COMMENT
 
Constructor Summary
Column()
          Constructs a new Column.
Column(java.lang.String name)
          Constructs a new Column with the specified name.
Column(java.lang.String name, DataTypeUsage usage)
          Constructs a new Column with the specified name and datatype.
 
Method Summary
 DataTypeUsage getDataTypeUsage()
          Gets the usage object for the datatype information for this column.
 java.lang.Object getDefault()
          Retrieves the default value for the Column.
 java.lang.Long getPrecision()
          Deprecated. - use getDataTypeUsage() and then get the appropriate attribute from the DataTypeUsage.
e.g. dataTypeUsage.getAttributeValue( DataTypeAttribute.DATATYPE_PRECISION)
 Relation getRelation()
          Gets the Relation that owns this Column.
 java.lang.Long getScale()
          Deprecated. - use getDataTypeUsage() and then get the appropriate attribute from the DataTypeUsage.
e.g. dataTypeUsage.getAttributeValue( DataTypeAttribute.DATATYPE_SCALE)
 java.lang.String getType()
          Returns the type of this object.
 boolean isNotNull()
          Whether the Column is restricted to non-null values.
 void setDataTypeUsage(DataTypeUsage dataTypeUsage)
          Sets the usage object for the datatype information for this column.
 void setDefault(java.lang.Object defaultValue)
          Sets the default value for the Column.
 void setNotNull(boolean notNull)
          Sets whether the Column is restricted to non-null values.
 void setPrecision(java.lang.Long precision)
          Deprecated. - use getDataTypeUsage() and then set the appropriate attribute from the DataTypeUsage.
e.g. dataTypeUsage.setAttributeValue( DataTypeAttribute.DATATYPE_PRECISION)
 void setRelation(Relation relation)
          Sets the Relation that owns this Column.
 void setScale(java.lang.Long scale)
          Deprecated. - use getDataTypeUsage() and then set the appropriate attribute from the DataTypeUsage.
e.g. dataTypeUsage.setAttributeValue( DataTypeAttribute.DATATYPE_SCALE)
 
Methods inherited from class oracle.javatools.db.AbstractChildDBObject
copyToImpl, findParent, getParent, getProperty, setParent, setProperty
 
Methods inherited from class oracle.javatools.db.AbstractDBObject
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, equalsImpl, findOwnedObject, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getOwnedObjectsImpl, getProperties, getProperty, getReferenceIDs, getReferenceIDsImpl, hashCode, includeOwnedObject, includesType, includesType, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.javatools.db.DBObject
copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getReferenceIDs, replaceReferenceIDs, setID, setName
 
Methods inherited from interface oracle.javatools.util.DynamicPropertySet
getProperties, getProperty, setProperties
 

Field Detail

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values

AUTO_GENERATED_SEQUENCE

public static final java.lang.String AUTO_GENERATED_SEQUENCE
See Also:
Constant Field Values

AUTO_GENERATED_SEQUENCE_TRIGGER

public static final java.lang.String AUTO_GENERATED_SEQUENCE_TRIGGER
See Also:
Constant Field Values
Constructor Detail

Column

public Column()
Constructs a new Column.


Column

public Column(java.lang.String name)
Constructs a new Column with the specified name.

Parameters:
name - a string containing the column name

Column

public Column(java.lang.String name,
              DataTypeUsage usage)
Constructs a new Column with the specified name and datatype.

Parameters:
name - a string containing the column name
dataType - the datatype of the column
Method Detail

setDefault

public void setDefault(java.lang.Object defaultValue)
Sets the default value for the Column. The default value of a column is used whenever an insert or update does not specify a value for the column.

Parameters:
defaultValue - an object representing the default value for the Column. null means the column has no default. To specify that the Column should default to NULL, use the String value "NULL".

getDefault

public java.lang.Object getDefault()
Retrieves the default value for the Column. The default value of a column is used whenever an insert or update does not specify a value for the column.

Returns:
the default value for the Column, or null if no default is specified

isNotNull

public boolean isNotNull()
Whether the Column is restricted to non-null values.

Returns:
a boolean value indicating whether null values are disallowed

setNotNull

public void setNotNull(boolean notNull)
Sets whether the Column is restricted to non-null values.

Parameters:
notNull - boolean value indicating whether null values are disallowed

setDataTypeUsage

public void setDataTypeUsage(DataTypeUsage dataTypeUsage)
Sets the usage object for the datatype information for this column. This includes the datatype used, as well as any parameters for the usage of that type (e.g. precision, scale, etc).


getDataTypeUsage

public DataTypeUsage getDataTypeUsage()
Gets the usage object for the datatype information for this column. This includes the datatype used, as well as any parameters for the usage of that type (e.g. precision, scale, etc).


getType

public java.lang.String getType()
Description copied from interface: DBObject
Returns the type of this object. Valid types include things like tables, views, synonyms, and columns.

Returns:
a string describing the type of object.

getRelation

public Relation getRelation()
Gets the Relation that owns this Column.

Returns:
the Relation that owns this column

setRelation

public void setRelation(Relation relation)
Sets the Relation that owns this Column.

Parameters:
relation - the Relation that owns this column.

getPrecision

@Deprecated
public java.lang.Long getPrecision()
Deprecated. - use getDataTypeUsage() and then get the appropriate attribute from the DataTypeUsage.
e.g. dataTypeUsage.getAttributeValue( DataTypeAttribute.DATATYPE_PRECISION)


setPrecision

@Deprecated
public void setPrecision(java.lang.Long precision)
Deprecated. - use getDataTypeUsage() and then set the appropriate attribute from the DataTypeUsage.
e.g. dataTypeUsage.setAttributeValue( DataTypeAttribute.DATATYPE_PRECISION)


getScale

@Deprecated
public java.lang.Long getScale()
Deprecated. - use getDataTypeUsage() and then get the appropriate attribute from the DataTypeUsage.
e.g. dataTypeUsage.getAttributeValue( DataTypeAttribute.DATATYPE_SCALE)


setScale

@Deprecated
public void setScale(java.lang.Long scale)
Deprecated. - use getDataTypeUsage() and then set the appropriate attribute from the DataTypeUsage.
e.g. dataTypeUsage.setAttributeValue( DataTypeAttribute.DATATYPE_SCALE)


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.