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
|
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)
Validates defaultValue for dataTypeUsage against self's definition.
|
void |
validateUsage(DataTypeUsage dataTypeUsage, DBObject dbObject)
Validates dataTypeUsage against self's definition.
|
fireObjectUpdated, getSchema, getSource, setSchema, setSourceaddBlock, addDatatype, addReference, getBlocks, getDatatypes, getReferences, getSubProgram, getVariable, setBlocks, setDatatypes, setReferencesaddComment, getComments, setCommentsclearSourceID, copyToImpl, getChildAtOffset, getDeclarationAtOffset, getEndOffset, getReferenceAtOffset, getSourceID, getStartOffset, isBuilt, setEndOffset, setName, setSourceImpl, setStartOffsetsetParentcheckInit, checkInit, equalsImpl, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitializationaddObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, findOwnedObject, findParent, firePropertyChanged, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getProperty, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeObjectListener, removeObjectListener, removeObjectListener, removeOwnedObject, removeThisAsParent, replaceReferenceIDs, setID, setProperties, setProperty, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddObjectListener, copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getProperties, getReferenceIDs, removeObjectListener, removeOwnedObject, replaceReferenceIDs, setID, setNamegetProperty, getProperty, setProperties, setPropertyaddObjectListener, removeObjectListeneraddObjectListener, 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 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 class PlSqlBlockpublic 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 class PlSqlBlockpublic 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 DataTypepublic DataTypeAttribute getDataTypeAttribute(java.lang.String name)
getDataTypeAttribute in interface DataTypepublic DataTypeUsage createDefaultUsage()
DataTypecreateDefaultUsage in interface DataTypepublic DataTypeUsage createUsage(java.util.Map<java.lang.String,java.lang.Object> attributes)
DataTypecreateUsage in interface DataTypepublic void validateUsage(DataTypeUsage dataTypeUsage, DBObject dbObject) throws DataTypeValidationException
DataTypevalidateUsage in interface DataTypedataTypeUsage - : 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
DataTypevalidateDefaultValue in interface DataTypedefaultValue - : the default valuedataTypeUsage - : the usage to be validateddbObject - : the context of the data type usageDefaultValueValidationExceptionpublic 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 DataType