public class Type extends PlSqlSchemaObjectSpec implements DataType
| Modifier and Type | Class and Description |
|---|---|
static class |
Type.SQLJUsingType |
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COLLECTION_TYPECODE |
static java.lang.String |
OBJECT_TYPECODE |
static java.lang.String |
TABLE_TYPE |
static java.lang.String |
TYPE |
static java.lang.String |
VARRAY_TYPE |
PCTROWTYPE, PCTTYPE, REF| Constructor and Description |
|---|
Type() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(PlSqlAttribute attribute)
Adds the given PlSqlAttribute to the Attributes property array
|
void |
addMethod(PlSqlMethod method)
Adds the given PlSqlMethod to the Methods property array
|
void |
addSubProgram(PlSqlSubProgram subProgram)
Adds the given PlSqlSubProgram to the Methods property array.
|
void |
addVariable(PlSqlVariable var)
Adds the given PlSqlVariable to the Attributes property array.
|
boolean |
canHaveBody()
Some Types cannot have a body (ie VARRAYs and TABLES).
|
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.
|
PlSqlAttribute |
getAttribute(java.lang.String name)
Gets a Attribute of the given name
|
PlSqlAttribute[] |
getAttributes()
Get method for the Attributes property
|
java.lang.String |
getCollectionType()
Returns the code for the Type for Collection Types - either VARRAY or
TABLE.
|
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
|
PlSqlMethod |
getMethod(java.lang.String name)
Gets a Method of the given name
|
PlSqlMethod[] |
getMethods()
Get method for the Methods property
|
DataTypeUsage |
getOfTypeUsage()
Get method for the OfTypeUsage property
|
PlSqlReference |
getOfTypeUsageReference()
Get method for the OfTypeUsageReference property
|
java.lang.String |
getOID()
Get method for the OID property
|
java.lang.String |
getSqljExternalName()
Get method for the SqljExternalName property
|
Type.SQLJUsingType |
getSqljUsing()
Get method for the SqljUsing property
|
java.lang.Integer |
getSQLType()
Gets the SQL type that identifies this data type.
|
PlSqlSubProgram[] |
getSubPrograms()
Convenience method, overloads the superclass getSubPrograms
but will return the same as getMethods()
|
java.lang.String |
getType()
Returns the type of this object.
|
java.lang.String |
getTypeCode()
Returns the type code
|
DBObjectID |
getUnderTypeID()
Get method for the UnderTypeID property
|
PlSqlReference |
getUnderTypeReference()
Get method for the UnderTypeReference property
|
PlSqlVariable[] |
getVariables()
Convenience method, overloads the superclass getVariables
but will return the same as getAttributes()
|
boolean |
hasDataTypeAttribute(java.lang.String name)
Returns true if this DataType has the given attribute name.
|
boolean |
isAuthidCurrentUser()
Get method for the AuthidCurrentUser property
|
boolean |
isFinal()
Whether this object type can be the supertype to another object type
|
boolean |
isInstantiable()
Whether an object can be defined to be of this type.
|
boolean |
matches(java.lang.String usageString)
Returns
true if the usageString is valid syntax for the DataType,
false otherwise. |
void |
removeAttribute(PlSqlAttribute attribute)
Removes the given PlSqlAttribute from the Attributes property array
|
void |
removeMethod(PlSqlMethod method)
Removes the given PlSqlMethod from the Methods property array
|
void |
setAttributes(PlSqlAttribute[] attributes)
Set method for the Attributes property
|
void |
setAuthidCurrentUser(boolean authidCurrentUser)
Set method for the AuthidCurrentUser property
|
void |
setCollectionType(java.lang.String collectionType)
Set method for the CollectionType property
|
void |
setFinal(boolean final_)
Set whether this object type can be the supertype to another object type.
|
void |
setInstantiable(boolean instantiable)
Set whether an object can be defined to be of this type.
|
void |
setLimit(java.lang.Integer limit)
Set method for the Limit property
|
void |
setMethods(PlSqlMethod[] methods)
Set method for the Methods property
|
void |
setOfTypeUsageReference(PlSqlReference ofTypeUsageRef)
Set method for the OfTypeUsageReference property
|
void |
setOID(java.lang.String oid)
Set method for the OID property
|
void |
setSqljExternalName(java.lang.String sqljExternalName)
Set method for the SqljExternalName property
|
void |
setSqljUsing(Type.SQLJUsingType sqljUsing)
Set method for the SqljUsing property
|
void |
setSubPrograms(PlSqlSubProgram[] subPrograms)
Convenience method, overloads the superclass setSubPrograms
but each entry in the array must be a PlSqlMethod or an IllegalArgumentExcption will
be thrown.
|
void |
setTypeCode(java.lang.String typeCode)
Set method for the TypeCode property
|
void |
setUnderTypeReference(PlSqlReference underTypeRef)
Set method for the UnderTypeReference property
|
void |
setVariables(PlSqlVariable[] vars)
Convenience method, overloads the superclass setVariables
but each entry in the array must be a PlSqlAttribute or an IllegalArgumentExcption will
be thrown.
|
void |
validateDefaultValue(java.lang.Object defaultValue,
DataTypeUsage dataTypeUsage,
DBObject dbObject)
Deprecated.
|
void |
validateUsage(DataTypeUsage dataTypeUsage,
DBObject dbObject)
Deprecated.
|
getBodyID, setBodyIDgetBlocks, getComments, getDatatypes, getEndOffset, getReferences, getSchema, getSource, getStartOffset, setSchema, setSourceaddBlock, addDatatype, addReference, findOwnedObject, getSubProgram, getVariable, setBlocks, setDatatypes, setReferencesaddComment, setCommentscopyToImpl, getChildAtOffset, getDeclarationAtOffset, getEndToken, getName, getReferenceAtOffset, getSourceID, getStartToken, setEndOffset, setSourceImpl, setStartOffsetsetParentcheckInit, checkInit, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitializationaddObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, equalsImpl, 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, setPropertygetChildAtOffset, getDeclarationAtOffset, getEndToken, getReferenceAtOffset, getStartTokenaddObjectListener, removeObjectListeneraddObjectListener, fireObjectUpdated, removeObjectListenergetParentpublic static final java.lang.String TYPE
public static final java.lang.String OBJECT_TYPECODE
public static final java.lang.String COLLECTION_TYPECODE
public static final java.lang.String TABLE_TYPE
public static final java.lang.String VARRAY_TYPE
public java.lang.String getType()
DBObjectgetType in interface DBObjectgetType in class PlSqlBlockpublic java.lang.Integer getSQLType()
DataTypegetSQLType in interface DataTypeTypes,
OracleTypespublic boolean canHaveBody()
PlSqlSchemaObjectSpeccanHaveBody in class PlSqlSchemaObjectSpecpublic boolean isFinal()
public void setFinal(boolean final_)
final_ - true if no subtypes are to be allowed, false otherwisepublic boolean isInstantiable()
public void setInstantiable(boolean instantiable)
instantiable - set true if an object can be of this typepublic java.lang.String getTypeCode()
public void setTypeCode(java.lang.String typeCode)
typeCode - public java.lang.String getCollectionType()
public void setCollectionType(java.lang.String collectionType)
collectionType - public void setAuthidCurrentUser(boolean authidCurrentUser)
authidCurrentUser - public boolean isAuthidCurrentUser()
public void setLimit(java.lang.Integer limit)
limit - public java.lang.Integer getLimit()
public DataTypeUsage getOfTypeUsage()
public void setOfTypeUsageReference(PlSqlReference ofTypeUsageRef)
ofTypeUsageRef - public PlSqlReference getOfTypeUsageReference()
public PlSqlReference getUnderTypeReference()
public void setUnderTypeReference(PlSqlReference underTypeRef)
underTypeRef - public DBObjectID getUnderTypeID()
public void setOID(java.lang.String oid)
oid - public java.lang.String getOID()
public void setSqljExternalName(java.lang.String sqljExternalName)
sqljExternalName - public java.lang.String getSqljExternalName()
public void setSqljUsing(Type.SQLJUsingType sqljUsing)
sqljUsing - public Type.SQLJUsingType getSqljUsing()
public void setMethods(PlSqlMethod[] methods)
methods - public PlSqlMethod[] getMethods()
public PlSqlMethod getMethod(java.lang.String name)
public void addMethod(PlSqlMethod method)
method - public void removeMethod(PlSqlMethod method)
method - public PlSqlSubProgram[] getSubPrograms()
getSubPrograms in interface PlSqlSourceObjectgetSubPrograms in class PlSqlSchemaObjectpublic void setSubPrograms(PlSqlSubProgram[] subPrograms)
setSubPrograms in class PlSqlBlocksubPrograms - public void addSubProgram(PlSqlSubProgram subProgram)
addSubProgram in class PlSqlBlocksubProgram - public void setAttributes(PlSqlAttribute[] attributes)
attributes - public PlSqlAttribute[] getAttributes()
public PlSqlAttribute getAttribute(java.lang.String name)
public void addAttribute(PlSqlAttribute attribute)
attribute - public void removeAttribute(PlSqlAttribute attribute)
attribute - public PlSqlVariable[] getVariables()
getVariables in interface PlSqlSourceObjectgetVariables in class PlSqlSchemaObjectpublic void setVariables(PlSqlVariable[] vars)
setVariables in class PlSqlBlockvars - public void addVariable(PlSqlVariable var)
addVariable in class PlSqlBlockvar - public java.lang.String getDDL(DataTypeUsage dataTypeUsage)
DataTypepublic 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 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 usage@Deprecated public void validateUsage(DataTypeUsage dataTypeUsage, DBObject dbObject) throws DataTypeValidationException
validateUsage in interface DataTypeDataTypeValidationException@Deprecated
public void validateDefaultValue(java.lang.Object defaultValue,
DataTypeUsage dataTypeUsage,
DBObject dbObject)
throws DefaultValueValidationException
validateDefaultValue in interface DataTypeDefaultValueValidationExceptionpublic 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.public 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 usage