org.datanucleus.metadata
Class InheritanceMetaData

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

public class InheritanceMetaData
extends MetaData

Representation of the Meta-Data defining inherited classes.

See Also:
Serialized Form

Field Summary
protected  DiscriminatorMetaData discriminatorMetaData
          DiscriminatorMetaData element.
protected  JoinMetaData joinMetaData
          JoinMetaData element.
protected  InheritanceStrategy strategy
          strategy tag value.
protected  java.lang.String strategyForTree
          Strategy to apply for the whole inheritance tree.
 
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
InheritanceMetaData()
          Default constructor.
 
Method Summary
 DiscriminatorMetaData getDiscriminatorMetaData()
           
 JoinMetaData getJoinMetaData()
           
 InheritanceStrategy getStrategy()
           
 java.lang.String getStrategyForTree()
           
 void initialise(ClassLoaderResolver clr, MetaDataManager mmgr)
          Method to initialise the object, creating internal convenience arrays.
 DiscriminatorMetaData newDiscriminatorMetadata()
          Method to create a new discriminator metadata, assign it to this inheritance, and return it.
 JoinMetaData newJoinMetadata()
          Method to create a new JoinMetaData, set it, and return it.
 void setDiscriminatorMetaData(DiscriminatorMetaData discriminatorMetaData)
           
 void setJoinMetaData(JoinMetaData joinMetaData)
           
 InheritanceMetaData setStrategy(InheritanceStrategy strategy)
           
 InheritanceMetaData setStrategy(java.lang.String strategy)
           
 InheritanceMetaData setStrategyForTree(java.lang.String strategy)
           
 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, assertIfInitialised, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, isInitialised, isPopulated, isUsed, newExtensionMetaData, removeExtension, setParent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

strategy

protected InheritanceStrategy strategy
strategy tag value.


joinMetaData

protected JoinMetaData joinMetaData
JoinMetaData element.


discriminatorMetaData

protected DiscriminatorMetaData discriminatorMetaData
DiscriminatorMetaData element.


strategyForTree

protected java.lang.String strategyForTree
Strategy to apply for the whole inheritance tree. Optional, used by JPA.

Constructor Detail

InheritanceMetaData

public InheritanceMetaData()
Default constructor. Set any fields using setters, before populate().

Method Detail

initialise

public void initialise(ClassLoaderResolver clr,
                       MetaDataManager mmgr)
Method to initialise the object, creating internal convenience arrays. Initialises all sub-objects.

Overrides:
initialise in class MetaData

setStrategyForTree

public InheritanceMetaData setStrategyForTree(java.lang.String strategy)

getStrategyForTree

public java.lang.String getStrategyForTree()

getStrategy

public InheritanceStrategy getStrategy()

setStrategy

public InheritanceMetaData setStrategy(InheritanceStrategy strategy)

setStrategy

public InheritanceMetaData setStrategy(java.lang.String strategy)

getJoinMetaData

public JoinMetaData getJoinMetaData()

setJoinMetaData

public void setJoinMetaData(JoinMetaData joinMetaData)

newJoinMetadata

public JoinMetaData newJoinMetadata()
Method to create a new JoinMetaData, set it, and return it.

Returns:
The join metadata

getDiscriminatorMetaData

public DiscriminatorMetaData getDiscriminatorMetaData()

setDiscriminatorMetaData

public void setDiscriminatorMetaData(DiscriminatorMetaData discriminatorMetaData)

newDiscriminatorMetadata

public DiscriminatorMetaData newDiscriminatorMetadata()
Method to create a new discriminator metadata, assign it to this inheritance, and return it.

Returns:
The discriminator metadata

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 © 2011. All Rights Reserved.