public class PlSqlDatatype extends PlSqlCodeFragment implements DataType
| Modifier and Type | Class and Description |
|---|---|
static class |
PlSqlDatatype.Structure |
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TYPE |
PCTROWTYPE, PCTTYPE, REF| Constructor and Description |
|---|
PlSqlDatatype() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
PlSqlReference |
findBaseTypeReference()
Finds the PlSqlReference from the parent PlSqlBlock that represents the
base type of this datatype.
|
DBObjectID |
getBaseTypeID()
Convenience method to get the DBObjectID for the base type of this
datatype.
|
java.lang.Integer |
getBaseTypeOffset()
Gets the offset of the base type for this datatype in the source.
|
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
|
java.lang.Integer |
getSQLType()
Gets the SQL type that identifies this data type.
|
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)
Deprecated.
set the offset of the PlSqlReference that represents the
base type instead using
setBaseTypeOffset(Integer). |
void |
setBaseTypeOffset(java.lang.Integer offset)
Sets the offset of the base type for this datatype in the source.
|
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)
Deprecated.
|
void |
validateUsage(DataTypeUsage dataTypeUsage,
DBObject dbObject)
Deprecated.
|
addComment, getComments, setCommentscopyToImpl, getChildAtOffset, getDeclarationAtOffset, getEndOffset, getEndToken, getName, getReferenceAtOffset, getSourceID, getStartOffset, getStartToken, setEndOffset, setSourceImpl, setStartOffsetsetParentcheckInit, checkInit, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitializationaddObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, equalsImpl, findOwnedObject, findOwnedObject, findOwnedObject, findOwnedObject, findParent, fireObjectUpdated, firePropertyChanged, getChildSupport, getID, getOwnedObjects, getOwnedObjects, getParent, getProperty, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeObjectListener, removeObjectListener, removeObjectListener, removeOwnedObject, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties, setProperty, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddObjectListener, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getProperties, getReferenceIDs, hashCode, removeObjectListener, removeOwnedObject, replaceReferenceIDs, setID, setNamegetProperty, getProperty, setProperties, setPropertygetParentpublic static final java.lang.String TYPE
public java.lang.String getType()
DBObjectpublic java.lang.Integer getSQLType()
DataTypegetSQLType in interface DataTypeTypes,
OracleTypespublic void setVariables(PlSqlVariable[] variables)
variables - constituent members of a record datatypepublic PlSqlVariable[] getVariables()
public void addVariable(PlSqlVariable variable)
variable - member of a record datatypepublic boolean isSubType()
public void setSubType(boolean subType)
public PlSqlDatatype.Structure getStructure()
public void setStructure(PlSqlDatatype.Structure structure)
structure - indicator of the type of DataTypepublic DBObjectID getBaseTypeID()
getBaseTypeOffset(),
findBaseTypeReference()@Deprecated public void setBaseTypeID(DBObjectID baseTypeID)
setBaseTypeOffset(Integer).public java.lang.Integer getBaseTypeOffset()
For example, for type varvarr in the following procedure:
CREATE PROCEDURE PROC1 AS TYPE varvarr IS VARRAY(2) of VARCHAR2(10); ...This is the offset of the start of VARCHAR2.
public void setBaseTypeOffset(java.lang.Integer offset)
offset - the base type offsetpublic PlSqlReference findBaseTypeReference()
getBaseTypeOffset()public java.lang.Integer getLimit()
public void setLimit(java.lang.Integer limit)
limit - the size of the collection if varraypublic DataTypeAttribute[] getDataTypeAttributes()
getDataTypeAttributes in interface DataTypepublic boolean hasDataTypeAttribute(java.lang.String name)
DataTypehasDataTypeAttribute in interface DataTypename - the name of the attribute to check.public DataTypeAttribute getDataTypeAttribute(java.lang.String name)
getDataTypeAttribute in interface DataTypename - the name of the attribute to getpublic java.lang.String getDDL(DataTypeUsage dataTypeUsage)
DataTypepublic DataTypeUsage createDefaultUsage()
DataTypecreateDefaultUsage in interface DataTypepublic DataTypeUsage createUsage(java.util.Map<java.lang.String,java.lang.Object> attributes)
DataTypecreateUsage in interface DataTypeattributes - the attributes for the new usagepublic DataTypeUsage createUsage(java.lang.String usageString)
DataTypeDataType.matches(java.lang.String).
Should be overridden by sub-classes to return an object of the sub-class type.createUsage in interface DataTypeusageString - the string to use to create a usagepublic boolean matches(java.lang.String usageString)
DataTypetrue if the usageString is valid syntax for the DataType,
false otherwise.
Should be overridden by sub-classes to do the validation.@Deprecated public void validateUsage(DataTypeUsage dataTypeUsage, DBObject dbObject)
validateUsage in interface DataType@Deprecated
public void validateDefaultValue(java.lang.Object defaultValue,
DataTypeUsage dataTypeUsage,
DBObject dbObject)
validateDefaultValue in interface DataType