org.datanucleus.metadata
Class UniqueMetaData

java.lang.Object
  extended by org.datanucleus.metadata.MetaData
      extended by org.datanucleus.metadata.AbstractConstraintMetaData
          extended by org.datanucleus.metadata.UniqueMetaData
All Implemented Interfaces:
java.io.Serializable, ColumnMetaDataContainer

public class UniqueMetaData
extends AbstractConstraintMetaData
implements ColumnMetaDataContainer

MetaData representing a unique constraint.

Since:
1.1
Version:
$Revision: 1.17 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.datanucleus.metadata.AbstractConstraintMetaData
columnMetaData, columns, memberMetaData, members, name, table
 
Fields inherited from class org.datanucleus.metadata.MetaData
extensions, LOCALISER, METADATA_CREATED_STATE, METADATA_INITIALISED_STATE, METADATA_POPULATED_STATE, METADATA_USED_STATE, metaDataState, parent, VENDOR_NAME, VENDOR_NAME_OLD
 
Constructor Summary
UniqueMetaData(java.lang.String name, java.lang.String table, java.lang.String deferredValue)
          Constructor.
UniqueMetaData(UniqueMetaData umd)
          Constructor to create a copy of the passed metadata using the provided parent.
 
Method Summary
 void initialise()
          Method to initialise the object, creating internal convenience arrays.
 boolean isDeferred()
          Accessor for whether the unique constraint is deferred.
 java.lang.String toString(java.lang.String prefix, java.lang.String indent)
          Returns a string representation of the object.
 
Methods inherited from class org.datanucleus.metadata.AbstractConstraintMetaData
addColumn, addMember, getColumnMetaData, getMemberMetaData, getName, getNumberOfColumns, getNumberOfMembers, getTable, setName
 
Methods inherited from class org.datanucleus.metadata.MetaData
addExtension, addExtension, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, isInitialised, isPopulated, isUsed, removeExtension, setInitialised, setParent, setPopulated, setUsed, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.datanucleus.metadata.ColumnMetaDataContainer
addColumn, getColumnMetaData
 

Constructor Detail

UniqueMetaData

public UniqueMetaData(UniqueMetaData umd)
Constructor to create a copy of the passed metadata using the provided parent.

Parameters:
umd - The metadata to copy

UniqueMetaData

public UniqueMetaData(java.lang.String name,
                      java.lang.String table,
                      java.lang.String deferredValue)
Constructor.

Parameters:
name - Name of unique constraint
table - Name of the table
deferredValue - Whether the unique is deferred initially
Method Detail

initialise

public void initialise()
Method to initialise the object, creating internal convenience arrays. Initialise all sub-objects.

Overrides:
initialise in class MetaData

isDeferred

public final boolean isDeferred()
Accessor for whether the unique constraint is deferred.

Returns:
Returns whether the unique constraint is deferred

toString

public java.lang.String toString(java.lang.String prefix,
                                 java.lang.String indent)
Returns a string representation of the object. This can be used as part of a facility to output a MetaData file.

Overrides:
toString in class MetaData
Parameters:
prefix - prefix string
indent - indent string
Returns:
a string representation of the object.


Copyright © 2009. All Rights Reserved.