public class DataTypeUsage extends AbstractChildDBObject
A DataTypeUsage can be "validated" by its corresponding DataType.
This replaces the deprecated way of storing scale and precision on a Column which was not flexible enough to support all datatype attributes.
To get a String representation of the usage and attributes use the DataType.getDDL(oracle.javatools.db.datatypes.DataTypeUsage) method.
Code examples for using DataTypeUsages are available in the datatypes datatypes package summary
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TYPE |
| Constructor and Description |
|---|
DataTypeUsage() |
DataTypeUsage(DataType dt) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
copyToImpl(AbstractDBObject target, DBObject copyParent, IDPolicy idPolicy)
Implementation method for making a copy of this object.
|
void |
deleteAttributeValue(java.lang.String name)
Deletes entry named name.
|
protected boolean |
equalsImpl(AbstractDBObject target)
Equals implementation for testing equality with another AbstractDBObject.
|
java.lang.Object |
getAttributeValue(java.lang.String name)
Gets the value of the given named attribute.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributeValues()
Returns a Map of the keys/values of all attributes in this usage.
|
DBObjectID |
getDataTypeID()
Gets the id of the DataType being used.
|
protected void |
getReferenceIDsImpl(java.util.Collection<DBObjectID> refs)
Used by the final getReferenceID() implementation.
|
java.lang.String |
getType()
Returns the type of this object.
|
boolean |
hasAttributeValue(java.lang.String name)
Returns true if there is an entry for the given attribute name.
|
void |
putAttributeValue(java.lang.String name, java.lang.Object value)
Adds {attribute_name, attribute_value} to self or replaces value where an entry for name already exists.
|
boolean |
replaceReferenceIDs(java.util.Map<? extends DBObjectID,? extends DBObjectID> idMap)
Override in subclasses to replace reference IDs as appropriate.
|
void |
setAttributeValues(java.util.Map<java.lang.String,java.lang.Object> attributeValues)
Sets the keys/values of all attributes in this usage.
|
void |
setDataTypeID(DBObjectID dataTypeID)
Sets the id of the DataType being used.
|
setParentaddObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, findOwnedObject, findParent, fireObjectUpdated, firePropertyChanged, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getOwnedObjectsImpl, getParent, getProperties, getProperty, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeObjectListener, removeObjectListener, removeObjectListener, removeOwnedObject, removeThisAsParent, setID, setName, setProperties, setProperty, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetParentaddObjectListener, copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getProperties, getReferenceIDs, removeObjectListener, removeOwnedObject, setID, setNamegetProperty, getProperty, setProperties, setPropertypublic static final java.lang.String TYPE
public DataTypeUsage()
public DataTypeUsage(DataType dt)
public java.lang.String getType()
DBObjectprotected boolean equalsImpl(AbstractDBObject target)
AbstractDBObjectequalsImpl in class AbstractDBObjectprotected void copyToImpl(AbstractDBObject target, DBObject copyParent, IDPolicy idPolicy)
AbstractDBObjectcopyToImpl in class AbstractDBObjecttarget - 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.public final void setDataTypeID(DBObjectID dataTypeID)
public final DBObjectID getDataTypeID()
public final void setAttributeValues(java.util.Map<java.lang.String,java.lang.Object> attributeValues)
attributeValues - (attribute_name, attribute_value) map of usage valuespublic final java.util.Map<java.lang.String,java.lang.Object> getAttributeValues()
public final java.lang.Object getAttributeValue(java.lang.String name)
name -
public final void putAttributeValue(java.lang.String name,
java.lang.Object value)
name -value -public final void deleteAttributeValue(java.lang.String name)
name -public final boolean hasAttributeValue(java.lang.String name)
name -protected void getReferenceIDsImpl(java.util.Collection<DBObjectID> refs)
AbstractDBObjectgetReferenceIDsImpl in class AbstractDBObjectrefs - the collection of ids this object referencespublic boolean replaceReferenceIDs(java.util.Map<? extends DBObjectID,? extends DBObjectID> idMap)
AbstractDBObjectreplaceReferenceIDs in interface DBObjectreplaceReferenceIDs in class AbstractDBObjectidMap - key = old DBObjectID, value = new DBObjectID