|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.db.AbstractDBObject
oracle.javatools.db.datatypes.PredefinedDataType
public class PredefinedDataType
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 | |
---|---|
PredefinedDataType() |
|
PredefinedDataType(int domain, java.lang.String name) Use this constructor when the data type is a simple name with no declarable attributes, e.g. |
|
PredefinedDataType(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. |
|
PredefinedDataType(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 | |
---|---|
void |
addAttribute(DataTypeAttribute attribute) |
void |
addAttribute(DataTypeAttribute attribute, int atIndex) |
protected void |
copyToImpl(AbstractDBObject other, DBObject copyParent, IDPolicy idPolicy) Implementation method for making a copy of this object. |
DataTypeUsage |
createDefaultUsage() Returns an DataTypeUsage object for this type. |
DataTypeUsage |
createUsage(java.util.Map<java.lang.String,java.lang.Object> attributeValues) Returns an DataTypeUsage object for this type, populated with attributes. |
DataTypeUsage |
createUsage(java.lang.String usageString) Returns an DataTypeUsage object for this type, populated with attributes based on the usageString. |
protected boolean |
equalsImpl(AbstractDBObject target) Equals implementation for testing equality with another AbstractDBObject. |
DataTypeAttribute |
getDataTypeAttribute(java.lang.String name) Returns the DataTypeAttribute called name or null if this data type doesn't define it. |
DataTypeAttribute[] |
getDataTypeAttributes() Returns an array of this type's DataTypeAttributes in the order they were added to this type. |
java.lang.String |
getDDL(DataTypeUsage dataTypeUsage) Generates the DDL for this type. |
DBObject |
getParent() Returns the parent of this object, if one exists. |
java.lang.String |
getType() Returns the type of this object. |
boolean |
hasDataTypeAttribute(java.lang.String name) Returns true if the DataTypeAttribute name is on this DataType. |
boolean |
matches(java.lang.String usageString) Returns true if the usageString is valid syntax for the DataType, false otherwise. |
protected static PlsqlNode |
parseDefaultValue(java.lang.String strDefaultValue, DataType dataType, DBObject dbObject) Parse the default value. |
void |
removeAttribute(DataTypeAttribute attribute) |
void |
setDataTypeAttributes(DataTypeAttribute[] attrs) |
protected static java.lang.String[] |
tokenize(java.lang.String string, java.lang.String delimiters) Creates a String[] of tokens extracted from string. |
void |
validateDefaultValue(java.lang.Object defaultValue, DataTypeUsage dataTypeUsage, DBObject dbObject) Validates defaultValue for dataTypeUsage against self's definition. |
void |
validateDefinition() Validate BNF definition methods. |
void |
validateUsage(DataTypeUsage dataTypeUsage, DBObject dbObject) Validates dataTypeUsage against self's definition. |
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 |
---|
public PredefinedDataType()
public PredefinedDataType(int domain, java.lang.String name)
domain
- : Context of data type definition, e.g. column, variable. Domains are specific to each database and are defined in their interface.name
-public PredefinedDataType(int domain, java.lang.String name, java.lang.String definition, DataTypeAttribute[] attributes)
domain
- : Context of data type definition, e.g. column, variable. Domains are specific to each database and are defined in their interface.name
- : Lookup and display name of this data typedefinition
- : BNF definition of this data typeattributes
- : Definitions of this data type's attributespublic PredefinedDataType(int domain, java.lang.String name, java.lang.String definition, long minSize, long maxSize, long defaultSize, boolean isSizeMandatory, DataTypeAttribute[] attributes)
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
- : BNF definition of this data typeminSize
- : the minimum size of this data typemaxSize
- : the maximum size of this 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 attributesMethod Detail |
---|
public final void addAttribute(DataTypeAttribute attribute)
public final void addAttribute(DataTypeAttribute attribute, int atIndex)
public final void removeAttribute(DataTypeAttribute attribute)
public DataTypeUsage createDefaultUsage()
DataType
createDefaultUsage
in interface DataType
public DataTypeUsage createUsage(java.util.Map<java.lang.String,java.lang.Object> attributeValues)
DataType
createUsage
in interface DataType
public void validateUsage(DataTypeUsage dataTypeUsage, DBObject dbObject) throws DataTypeValidationException
DataType
validateUsage
in interface DataType
dataTypeUsage
- : the usage to be validateddbObject
- : the context of the data type usageDataTypeValidationException
public void validateDefaultValue(java.lang.Object defaultValue, DataTypeUsage dataTypeUsage, DBObject dbObject) throws DefaultValueValidationException
DataType
validateDefaultValue
in interface DataType
defaultValue
- : the default valuedataTypeUsage
- : the usage to be validateddbObject
- : the context of the data type usageDefaultValueValidationException
public java.lang.String getDDL(DataTypeUsage dataTypeUsage)
DataType
getDDL
in interface DataType
public final boolean hasDataTypeAttribute(java.lang.String name)
hasDataTypeAttribute
in interface DataType
public final DataTypeAttribute getDataTypeAttribute(java.lang.String name)
getDataTypeAttribute
in interface DataType
name
- the name of the attribute to findpublic final DataTypeAttribute[] getDataTypeAttributes()
getDataTypeAttributes
in interface DataType
public final void setDataTypeAttributes(DataTypeAttribute[] attrs)
public final DBObject getParent()
DBObject
getParent
in interface DBObject
public final java.lang.String getType()
DBObject
getType
in interface DBObject
protected void copyToImpl(AbstractDBObject other, DBObject copyParent, IDPolicy idPolicy)
AbstractDBObject
copyToImpl
in class AbstractDBObject
other
- the copy being created of this objectcopyParent
- if this object is being copied underneath a parent, this parameter is the copy of the parent of this object, which will therefore need to be the parent of the copy of this object.idPolicy
- the policy for copying the object's ID.protected boolean equalsImpl(AbstractDBObject target)
AbstractDBObject
equalsImpl
in class AbstractDBObject
public void validateDefinition() throws DataTypeValidationException
DataTypeValidationException
protected static java.lang.String[] tokenize(java.lang.String string, java.lang.String delimiters)
protected static PlsqlNode parseDefaultValue(java.lang.String strDefaultValue, DataType dataType, DBObject dbObject) throws DefaultValueValidationException
DefaultValueValidationException
- if there are parser exceptionspublic boolean matches(java.lang.String usageString)
DataType
true
if the usageString is valid syntax for the DataType, false
otherwise. Should be overridden by sub-classes to do the validation.matches
in interface DataType
public DataTypeUsage createUsage(java.lang.String usageString)
DataType
DataType.matches(java.lang.String)
. Should be overridden by sub-classes to return an object of the sub-class type.createUsage
in interface DataType
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |