Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.db.plsql
Class PlSqlDatatype

java.lang.Object
  extended by oracle.javatools.db.AbstractDBObject
      extended by oracle.javatools.db.AbstractBuildableObject
          extended by oracle.javatools.db.plsql.DBObjectPlSqlFragment
              extended by oracle.javatools.db.plsql.PlSqlDatatype

All Implemented Interfaces:
ChildDBObject, DataType, DBObject, Copyable, DynamicPropertySet

public class PlSqlDatatype
extends DBObjectPlSqlFragment
implements DataType

Representation of a PL/SQL Datatype sucj as a record, varray table etc.


Nested Class Summary
static class PlSqlDatatype.Structure
           

 

Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport

 

Field Summary
static java.lang.String TYPE
           

 

Fields inherited from interface oracle.javatools.db.datatypes.DataType
PCTROWTYPE, PCTTYPE, REF

 

Fields inherited from interface oracle.javatools.db.DBObject
COMMENT

 

Constructor Summary
PlSqlDatatype()
           

 

Method Summary
 void addVariable(PlSqlVariable variable)
          Adds the given PlSqlVariable to the Variables property array
 DataTypeUsage createDefaultUsage()
          Returns an DataTypeUsage object for this type.
 DataTypeUsage createUsage(java.util.Map<java.lang.String,java.lang.Object> attributes)
          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.
 DBObjectID getBaseTypeID()
          Get method for the BaseTypeID property
 DataTypeAttribute getDataTypeAttribute(java.lang.String name)
          Gets a DataTypeAttribute of the given name
 DataTypeAttribute[] getDataTypeAttributes()
          Get method for the DataTypeAttributes property
 java.lang.String getDDL(DataTypeUsage dataTypeUsage)
          Generates the DDL for this type.
 java.lang.Integer getLimit()
          Get method for the Limit property
 PlSqlDatatype.Structure getStructure()
          Get method for the Structure property
 java.lang.String getType()
          Returns the type of this object.
 PlSqlVariable[] getVariables()
          Get method for the Variables property
 boolean hasDataTypeAttribute(java.lang.String name)
          Returns true if this DataTYpe has the given attribute name.
 boolean isSubType()
          Get method for the SubType property
 boolean matches(java.lang.String usageString)
          Returns true if the usageString is valid syntax for the DataType, false otherwise.
 void setBaseTypeID(DBObjectID baseTypeID)
          Set method for the BaseTypeID property
 void setLimit(java.lang.Integer limit)
          Set method for the Limit property
 void setStructure(PlSqlDatatype.Structure structure)
          Set method for the Structure property
 void setSubType(boolean subType)
          Set method for the SubType property
 void setVariables(PlSqlVariable[] variables)
          Set method for the Variables property
 void validateDefaultValue(java.lang.Object defaultValue, DataTypeUsage dataTypeUsage, DBObject dbObject)
          Validates defaultValue for dataTypeUsage against self's definition.
 void validateUsage(DataTypeUsage dataTypeUsage, DBObject dbObject)
          Validates dataTypeUsage against self's definition.

 

Methods inherited from class oracle.javatools.db.plsql.DBObjectPlSqlFragment
clearSourceID, copyToImpl, getChildAtOffset, getEndOffset, getParent, getSourceID, getStartOffset, setEndOffset, setParent, setStartOffset

 

Methods inherited from class oracle.javatools.db.AbstractBuildableObject
checkInit, checkInit, equalsImpl, getOwnedObjectsImpl, getProperties, getProperty, getReferenceIDsImpl, needsInitialization, setProperty

 

Methods inherited from class oracle.javatools.db.AbstractDBObject
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getProperty, getReferenceIDs, 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, getParent, getReferenceIDs, replaceReferenceIDs, setID, setName

 

Methods inherited from interface oracle.javatools.util.DynamicPropertySet
getProperties, getProperty, getProperty, setProperties, setProperty

 

Field Detail

TYPE

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

Constructor Detail

PlSqlDatatype

public PlSqlDatatype()

Method Detail

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.
Specified by:
getType in interface DBObject
Returns:
a string describing the type of object.

setVariables

public void setVariables(PlSqlVariable[] variables)
Set method for the Variables property
Parameters:
variables - constituent members of a record datatype
Since:
11.1.2.0.0

getVariables

public PlSqlVariable[] getVariables()
Get method for the Variables property
Returns:
constituent members of a record datatype
Since:
11.1.2.0.0

addVariable

public void addVariable(PlSqlVariable variable)
Adds the given PlSqlVariable to the Variables property array
Parameters:
variable - member of a record datatype
Since:
11.1.2.0.0

isSubType

public boolean isSubType()
Get method for the SubType property
Since:
11.1.2.0.0

setSubType

public void setSubType(boolean subType)
Set method for the SubType property
Since:
11.1.2.0.0

getStructure

public PlSqlDatatype.Structure getStructure()
Get method for the Structure property
Returns:
indicator of the type of DataType
Since:
11.1.2.0.0

setStructure

public void setStructure(PlSqlDatatype.Structure structure)
Set method for the Structure property
Parameters:
structure - indicator of the type of DataType
Since:
11.1.2.0.0

getBaseTypeID

public DBObjectID getBaseTypeID()
Get method for the BaseTypeID property
Returns:
the ID of the base datatype for collections such as table and varray
Since:
11.1.2.0.0

setBaseTypeID

public void setBaseTypeID(DBObjectID baseTypeID)
Set method for the BaseTypeID property
Parameters:
baseTypeID - the ID of the base datatype for collections such as table and varray
Since:
11.1.2.0.0

getLimit

public java.lang.Integer getLimit()
Get method for the Limit property
Returns:
the size of the collection if varray
Since:
11.1.2.0.0

setLimit

public void setLimit(java.lang.Integer limit)
Set method for the Limit property
Parameters:
limit - the size of the collection if varray
Since:
11.1.2.0.0

getDataTypeAttributes

public DataTypeAttribute[] getDataTypeAttributes()
Get method for the DataTypeAttributes property
Specified by:
getDataTypeAttributes in interface DataType
Returns:
Since:
11.1.2.0.0

hasDataTypeAttribute

public boolean hasDataTypeAttribute(java.lang.String name)
Description copied from interface: DataType
Returns true if this DataTYpe has the given attribute name.
Specified by:
hasDataTypeAttribute in interface DataType
Returns:
true if the DataTypeAttribute corresponding to name exists.

getDataTypeAttribute

public DataTypeAttribute getDataTypeAttribute(java.lang.String name)
Gets a DataTypeAttribute of the given name
Specified by:
getDataTypeAttribute in interface DataType
Returns:
Since:
11.1.2.0.0

getDDL

public java.lang.String getDDL(DataTypeUsage dataTypeUsage)
Description copied from interface: DataType
Generates the DDL for this type. Uses dataTypeUsages's get() methods to get the actual property values. Should be overridden by sub-classes to generate extra bits.
Specified by:
getDDL in interface DataType

createDefaultUsage

public DataTypeUsage createDefaultUsage()
Description copied from interface: DataType
Returns an DataTypeUsage object for this type. Used by UI to create a default data type usage. Mandatory declarable attributes of the data type are initialised with appropriate values, e.g. the size of a usage of an Oracle VARCHAR2 data type would be set to 4000, its maximum. Should be overridden by sub-classes to return an object of the sub-class type.
Specified by:
createDefaultUsage in interface DataType

createUsage

public DataTypeUsage createUsage(java.util.Map<java.lang.String,java.lang.Object> attributes)
Description copied from interface: DataType
Returns an DataTypeUsage object for this type, populated with attributes. Should be overridden by sub-classes to return an object of the sub-class type.
Specified by:
createUsage in interface DataType

createUsage

public DataTypeUsage createUsage(java.lang.String usageString)
Description copied from interface: DataType
Returns an DataTypeUsage object for this type, populated with attributes based on the usageString. Returns null if the usageString does not match the syntax of the DataType. See DataType.matches(java.lang.String). Should be overridden by sub-classes to return an object of the sub-class type.
Specified by:
createUsage in interface DataType

matches

public boolean matches(java.lang.String usageString)
Description copied from interface: DataType
Returns true if the usageString is valid syntax for the DataType, false otherwise. Should be overridden by sub-classes to do the validation.
Specified by:
matches in interface DataType

validateUsage

public void validateUsage(DataTypeUsage dataTypeUsage,
                          DBObject dbObject)
Description copied from interface: DataType
Validates dataTypeUsage against self's definition. Uses dataTypeUSage's get() methods to get the actual property values for validation. Should be overridden by sub-classes to do sub-class validation.
Specified by:
validateUsage in interface DataType
Parameters:
dataTypeUsage - : the usage to be validated
dbObject - : the context of the data type usage

validateDefaultValue

public void validateDefaultValue(java.lang.Object defaultValue,
                                 DataTypeUsage dataTypeUsage,
                                 DBObject dbObject)
Description copied from interface: DataType
Validates defaultValue for dataTypeUsage against self's definition. Method should be overridden by sub-classes to do sub-class validation.
Specified by:
validateDefaultValue in interface DataType
Parameters:
defaultValue - : the default value
dataTypeUsage - : the usage to be validated
dbObject - : the context of the data type usage

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


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