oracle.javatools.db.datatypes
Class CharacterDataType
java.lang.Object
oracle.javatools.db.AbstractDBObject
oracle.javatools.db.datatypes.PredefinedDataType
oracle.javatools.db.datatypes.CharacterDataType
- All Implemented Interfaces:
- DataType, DBObject, Copyable, DynamicPropertySet
public class CharacterDataType
- extends PredefinedDataType
- Since:
- 10.1.3
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. |
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 |
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 nameminSize
- : 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 namedefinition
- minSize
- : the minimum size of the data typemaxSize
- : the maximum size of the data typedefaultSize
- : 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 declaredattributes
- : Definitions of additional attributes
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 validateddefaultValue
- : the default valuedbObject
- : 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
Copyright © 1997, 2013, Oracle. All rights reserved.