org.jpox.metadata
Class FetchGroupMetaData

java.lang.Object
  extended byorg.jpox.metadata.MetaData
      extended byorg.jpox.metadata.FetchGroupMetaData
All Implemented Interfaces:
java.io.Serializable

public class FetchGroupMetaData
extends MetaData

A fetch group defines a particular loaded state for an object graph. It specifies fields to be loaded for all of the instances in the graph.

MetaData Element

The MetaData Element represented here is as follows
 <!ELEMENT fetch-group (fetch-group|field)*>
 <!ATTLIST fetch-group name CDATA #REQUIRED>
 <!ATTLIST fetch-group post-load (true|false) #IMPLIED>
 

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

Field Summary
protected  FetchGroupMetaData[] fetchGroupMetaData
          A contained fetch-group element indicates that the named group is to be included in the group being defined.
protected  java.util.List fetchGroups
          A contained fetch-group element indicates that the named group is to be included in the group being defined.
protected  AbstractPropertyMetaData[] fieldMetaData
          fields declared to be in this fetch group
protected  java.util.List fields
          fields declared to be in this fetch group
 
Fields inherited from class org.jpox.metadata.MetaData
LOCALISER, METADATA_CREATED_STATE, METADATA_INITIALISED_STATE, METADATA_POPULATED_STATE, METADATA_USED_STATE, metaDataState, parent
 
Constructor Summary
FetchGroupMetaData(MetaData parent, java.lang.String postLoad, java.lang.String name)
          Constructor.
 
Method Summary
 void addFetchGroup(FetchGroupMetaData fgmd)
          Add a new FetchGroupMetaData
 void addField(AbstractPropertyMetaData fmd)
          Add a new AbstractPropertyMetaData
 FetchGroupMetaData[] getFetchGroupMetaData()
          Accessor for fetchGroupMetaData
 AbstractPropertyMetaData[] getFieldMetaData()
          Accessor for fieldMetaData
 java.lang.String getName()
          Accessor for name
 java.lang.Boolean getPostLoad()
          Accessor for postLoad
 void initialise()
          Initialisation method.
 java.lang.String toString()
          Returns a string representation of the object.
 java.lang.String toString(java.lang.String prefix, java.lang.String indent)
          Returns a string representation of the object.
 
Methods inherited from class org.jpox.metadata.MetaData
getParent, isCreated, isInitialised, isPopulated, isUsed, populate, setInitialised, setPopulated, setUsed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fetchGroupMetaData

protected FetchGroupMetaData[] fetchGroupMetaData
A contained fetch-group element indicates that the named group is to be included in the group being defined. Nested fetch group elements are limited to only the name attribute.


fieldMetaData

protected AbstractPropertyMetaData[] fieldMetaData
fields declared to be in this fetch group


fetchGroups

protected java.util.List fetchGroups
A contained fetch-group element indicates that the named group is to be included in the group being defined. Nested fetch group elements are limited to only the name attribute.


fields

protected java.util.List fields
fields declared to be in this fetch group

Constructor Detail

FetchGroupMetaData

public FetchGroupMetaData(MetaData parent,
                          java.lang.String postLoad,
                          java.lang.String name)
Constructor.

Parameters:
parent - The parent MetaData
postLoad - Whether to use at post load
name - Name of fetch group
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

getName

public final java.lang.String getName()
Accessor for name

Returns:
Returns the name.

getPostLoad

public final java.lang.Boolean getPostLoad()
Accessor for postLoad

Returns:
Returns the postLoad.

getFetchGroupMetaData

public final FetchGroupMetaData[] getFetchGroupMetaData()
Accessor for fetchGroupMetaData

Returns:
Returns the fetchGroupMetaData.

getFieldMetaData

public final AbstractPropertyMetaData[] getFieldMetaData()
Accessor for fieldMetaData

Returns:
Returns the fieldMetaData.

addFetchGroup

public void addFetchGroup(FetchGroupMetaData fgmd)
Add a new FetchGroupMetaData

Parameters:
fgmd - the fetch group

addField

public void addField(AbstractPropertyMetaData fmd)
Add a new AbstractPropertyMetaData

Parameters:
fmd - the field

toString

public java.lang.String toString()
Returns a string representation of the object.

Returns:
a string representation of the object.

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.

Parameters:
prefix - prefix string
indent - indent string
Returns:
a string representation of the object.


Copyright © -2007 . All Rights Reserved.