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

E13403-05

oracle.javatools.db.datatypes
Class CharacterDataType

java.lang.Object
  extended by oracle.javatools.db.AbstractDBObject
      extended by oracle.javatools.db.datatypes.PredefinedDataType
          extended by oracle.javatools.db.datatypes.CharacterDataType
All Implemented Interfaces:
DataType, DBObject, Copyable, DynamicPropertySet

public class CharacterDataType
extends PredefinedDataType

Since:
10.1.3

Nested Class Summary
 
Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject
AbstractDBObject.ChildSupport
 
Field Summary
 
Fields inherited from interface oracle.javatools.db.datatypes.DataType
PCTROWTYPE, PCTTYPE, REF, TYPE
 
Fields inherited from interface oracle.javatools.db.DBObject
COMMENT
 
Constructor Summary
CharacterDataType()
           
CharacterDataType(int domain, java.lang.String name)
          Use this constructor when the data type is a simple name with no declarable attributes, e.g.
CharacterDataType(int domain, java.lang.String name, long minSize, long maxSize)
          Use this constructor when the data type has a maximum size that is used in default value validation, but isn't declarable, e.g.
CharacterDataType(int domain, java.lang.String name, java.lang.String definition, DataTypeAttribute[] attributes)
          Use this constructor when the datatype is not just a simple name, but has declarable attributes, e.g.
CharacterDataType(int domain, java.lang.String name, java.lang.String definition, long minSize, long maxSize, long defaultSize, boolean isSizeMandatory, DataTypeAttribute[] attributes)
          Use this constructor when the data type has a declarable maximum size, e.g.
 
Method Summary
static void validateDefaultValue(java.lang.Object defaultValue, DataType dataType, DataTypeUsage dataTypeUsage, DBObject dbObject)
          Does default validation.
 void validateDefaultValue(java.lang.Object defaultValue, DataTypeUsage dataTypeUsage, DBObject dbObject)
          Validates defaultValue for dataTypeUsage against the declared size of this character type.
 
Methods inherited from class oracle.javatools.db.datatypes.PredefinedDataType
addAttribute, addAttribute, copyToImpl, createDefaultUsage, createUsage, createUsage, equalsImpl, getDataTypeAttribute, getDataTypeAttributes, getDDL, getParent, getType, hasDataTypeAttribute, matches, parseDefaultValue, removeAttribute, setDataTypeAttributes, tokenize, validateDefinition, validateUsage
 
Methods inherited from class oracle.javatools.db.AbstractDBObject
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getOwnedObjectsImpl, getProperties, getProperty, getProperty, getReferenceIDs, getReferenceIDsImpl, hashCode, includeOwnedObject, includesType, includesType, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties, setProperty, 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, getProperty, setProperties, setProperty
 

Constructor Detail

CharacterDataType

public CharacterDataType()

CharacterDataType

public CharacterDataType(int domain,
                         java.lang.String name)
Use this constructor when the data type is a simple name with no declarable attributes, e.g. Oracle CLOB and NCLOB.

Parameters:
domain - : Context of data type definition, e.g. column, variable. Domains are specific to each database and are defined in their interface.
name -

CharacterDataType

public CharacterDataType(int domain,
                         java.lang.String name,
                         java.lang.String definition,
                         DataTypeAttribute[] attributes)
Use this constructor when the datatype is not just a simple name, but has declarable attributes, e.g. Oracle CHAR[(<size>[ <unit>])]. Add the attribute definitions with the attributes parameter.

Parameters:
domain - : Context of data type definition, e.g. column, variable. Domains are specific to each database and are defined in their interface.
name -
definition -
attributes - : Definitions of the data type's attributes

CharacterDataType

public CharacterDataType(int domain,
                         java.lang.String name,
                         long minSize,
                         long maxSize)
Use this constructor when the data type has a maximum size that is used in default value validation, but isn't declarable, e.g. Oracle LONG, CLOB, BLOB.

Parameters:
domain - : Context of data type definition, e.g. column, variable. Domains are specific to each database and are defined in their interface.
name - : data type name
minSize - : the minimum size of the data type (usually 1 but may be 0)
maxSize - : the maximum size of the data type

CharacterDataType

public CharacterDataType(int domain,
                         java.lang.String name,
                         java.lang.String definition,
                         long minSize,
                         long maxSize,
                         long defaultSize,
                         boolean isSizeMandatory,
                         DataTypeAttribute[] attributes)
Use this constructor when the data type has a declarable maximum size, e.g. Oracle CHAR[(<size>[ <unit>])] . Add additional attributes with e.g. unit, with the attributes parameter.

Parameters:
domain - : Context of data type definition, e.g. column, variable. Domains are specific to each database and are defined in their interface.
name - : data type name
definition -
minSize - : the minimum size of the data type
maxSize - : the maximum size of the data type
defaultSize - : size of data type when size is optional and not declared, default size for UI when size is mandatory.
isSizeMandatory - : TRUE when size has to be declared
attributes - : Definitions of additional attributes
Method Detail

validateDefaultValue

public void validateDefaultValue(java.lang.Object defaultValue,
                                 DataTypeUsage dataTypeUsage,
                                 DBObject dbObject)
                          throws DefaultValueValidationException
Validates defaultValue for dataTypeUsage against the declared size of this character type.

Specified by:
validateDefaultValue in interface DataType
Overrides:
validateDefaultValue in class PredefinedDataType
Parameters:
dataTypeUsage - : the usage to be validated
defaultValue - : the default value
dbObject - : the context of the data type usage
Throws:
DefaultValueValidationException

validateDefaultValue

public static void validateDefaultValue(java.lang.Object defaultValue,
                                        DataType dataType,
                                        DataTypeUsage dataTypeUsage,
                                        DBObject dbObject)
                                 throws DefaultValueValidationException
Does default validation. Also called from BinaryDataType.validateDefaultValue()

Parameters:
defaultValue -
dataType -
dataTypeUsage -
dbObject -
Throws:
DefaultValueValidationException

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.