org.datanucleus.metadata
Class DiscriminatorMetaData

java.lang.Object
  extended by org.datanucleus.metadata.MetaData
      extended by org.datanucleus.metadata.DiscriminatorMetaData
All Implemented Interfaces:
java.io.Serializable

public class DiscriminatorMetaData
extends MetaData

Representation of a discriminator in an inheritance strategy.

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

Field Summary
protected  ColumnMetaData columnMetaData
          Discriminator column
protected  java.lang.String columnName
          Column name of discriminator
protected  IndexedValue indexed
          Whether the discriminator is indexed or not and whether it is unique
protected  IndexMetaData indexMetaData
          Definition of any indexing of the discriminator column.
protected  DiscriminatorStrategy strategy
          strategy tag value.
protected  java.lang.String value
          Value for discriminator column
 
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
DiscriminatorMetaData(InheritanceMetaData parent, DiscriminatorMetaData dmd)
          Constructor.
DiscriminatorMetaData(InheritanceMetaData parent, java.lang.String columnName, java.lang.String value, java.lang.String strategy, java.lang.String indexed)
          Constructor.
 
Method Summary
 ColumnMetaData getColumnMetaData()
          Accessor for column MetaData.
 java.lang.String getColumnName()
          Accessor for columnName.
 IndexedValue getIndexedValue()
          Accessor for indexed value.
 IndexMetaData getIndexMetaData()
          Accessor for indexMetaData
 DiscriminatorStrategy getStrategy()
          Accessor for strategy.
 java.lang.String getValue()
          Accessor for value.
 void initialise()
          Initialisation method.
 void setColumnMetaData(ColumnMetaData columnMetaData)
          Mutator for column MetaData.
 void setColumnName(java.lang.String columnName)
          Mutator for columnName.
 void setIndexMetaData(IndexMetaData indexMetaData)
          Mutator for the index MetaData
 java.lang.String toString(java.lang.String prefix, java.lang.String indent)
          Returns a string representation of the object using a prefix
 
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
 

Field Detail

strategy

protected DiscriminatorStrategy strategy
strategy tag value.


columnName

protected java.lang.String columnName
Column name of discriminator


value

protected java.lang.String value
Value for discriminator column


columnMetaData

protected ColumnMetaData columnMetaData
Discriminator column


indexed

protected IndexedValue indexed
Whether the discriminator is indexed or not and whether it is unique


indexMetaData

protected IndexMetaData indexMetaData
Definition of any indexing of the discriminator column.

Constructor Detail

DiscriminatorMetaData

public DiscriminatorMetaData(InheritanceMetaData parent,
                             java.lang.String columnName,
                             java.lang.String value,
                             java.lang.String strategy,
                             java.lang.String indexed)
Constructor.

Parameters:
parent - parent InheritanceMetaData instance
columnName - Name of the column
value - Value for discriminator column
strategy - The strategy
indexed - The indexed tag

DiscriminatorMetaData

public DiscriminatorMetaData(InheritanceMetaData parent,
                             DiscriminatorMetaData dmd)
Constructor.

Parameters:
parent - parent InheritanceMetaData instance
dmd - DiscriminatorMetaData
Method Detail

initialise

public void initialise()
Initialisation method. This should be called AFTER using the populate method if you are going to use populate. It creates the internal convenience arrays etc needed for normal operation.

Overrides:
initialise in class MetaData

getColumnMetaData

public ColumnMetaData getColumnMetaData()
Accessor for column MetaData.

Returns:
Returns the column MetaData.

setColumnMetaData

public void setColumnMetaData(ColumnMetaData columnMetaData)
Mutator for column MetaData.

Parameters:
columnMetaData - The column MetaData to set.

getIndexMetaData

public final IndexMetaData getIndexMetaData()
Accessor for indexMetaData

Returns:
Returns the indexMetaData.

setIndexMetaData

public final void setIndexMetaData(IndexMetaData indexMetaData)
Mutator for the index MetaData

Parameters:
indexMetaData - The indexMetaData to set.

getValue

public java.lang.String getValue()
Accessor for value.

Returns:
Returns the value.

getColumnName

public java.lang.String getColumnName()
Accessor for columnName.

Returns:
Returns the columnName.

getStrategy

public final DiscriminatorStrategy getStrategy()
Accessor for strategy.

Returns:
Returns the strategy.

getIndexedValue

public final IndexedValue getIndexedValue()
Accessor for indexed value.

Returns:
Returns the indexed value.

setColumnName

public void setColumnName(java.lang.String columnName)
Mutator for columnName.

Parameters:
columnName - The columnName to set.

toString

public java.lang.String toString(java.lang.String prefix,
                                 java.lang.String indent)
Returns a string representation of the object using a prefix

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


Copyright © 2009. All Rights Reserved.