org.jpox
Class FetchGroupImpl

java.lang.Object
  extended by org.jpox.FetchGroupImpl
All Implemented Interfaces:
java.io.Serializable, FetchGroup

public class FetchGroupImpl
extends java.lang.Object
implements FetchGroup, java.io.Serializable

Group of fields for fetching, to be part of a FetchPlan.

Version:
$Revision: 1.2 $
See Also:
Serialized Form

Field Summary
protected static Localiser LOCALISER
          Localisation utility for output messages
 
Constructor Summary
FetchGroupImpl(java.lang.String name, java.lang.Class cls)
          Constructor.
 
Method Summary
 FetchGroup add(java.lang.String fieldName)
          Method to add a field of the class to the fetch group.
 void deregisterListener(FetchPlan plan)
          Method to deregister a listener for changes to this FetchGroup.
 void disconnectFromListeners()
          Method to disconnect this fetch group from all listeners since the group is removed from use.
 java.lang.String getClassName()
          Accessor for the class for this fetch group.
 java.lang.Class getFetchGroupClass()
          Accessor for the class that this group is for.
 java.lang.String[] getFieldNames()
          Accessor for the names of the fields in this fetch group.
 java.lang.String getName()
          Accessor for the group name.
 boolean getPostLoad()
          Accessor for whether to call postLoad when this group is loaded.
 boolean hasField(java.lang.String fieldName)
          Accessor for whether a particular field is in this group.
 void registerListener(FetchPlan plan)
          Method to register a listener for changes to this FetchGroup.
 FetchGroup remove(java.lang.String fieldName)
          Method to remove a field of the class from the fetch group.
 void setPostLoad(boolean postLoad)
          Mutator for whether the postLoad callback should be called on loading this fetch group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALISER

protected static final Localiser LOCALISER
Localisation utility for output messages

Constructor Detail

FetchGroupImpl

public FetchGroupImpl(java.lang.String name,
                      java.lang.Class cls)
Constructor.

Parameters:
name - Name of the group
cls - The class
Method Detail

getName

public java.lang.String getName()
Accessor for the group name.

Specified by:
getName in interface FetchGroup
Returns:
Name of the group

getFetchGroupClass

public java.lang.Class getFetchGroupClass()
Accessor for the class that this group is for.

Returns:
the class

getClassName

public java.lang.String getClassName()
Accessor for the class for this fetch group.

Specified by:
getClassName in interface FetchGroup
Returns:
Name of the class for this group

setPostLoad

public void setPostLoad(boolean postLoad)
Mutator for whether the postLoad callback should be called on loading this fetch group.

Specified by:
setPostLoad in interface FetchGroup
Parameters:
postLoad - Whether the postLoad callback should be called.

getPostLoad

public boolean getPostLoad()
Accessor for whether to call postLoad when this group is loaded.

Specified by:
getPostLoad in interface FetchGroup
Returns:
Whether to call postLoad

hasField

public boolean hasField(java.lang.String fieldName)
Accessor for whether a particular field is in this group.

Specified by:
hasField in interface FetchGroup
Parameters:
fieldName - Name of the field
Returns:
Whether it is present

getFieldNames

public java.lang.String[] getFieldNames()
Accessor for the names of the fields in this fetch group.

Specified by:
getFieldNames in interface FetchGroup
Returns:
Names of the fields in the group

add

public FetchGroup add(java.lang.String fieldName)
Method to add a field of the class to the fetch group.

Specified by:
add in interface FetchGroup
Parameters:
fieldName - Name of the field
Returns:
This FetchGroup
Throws:
JPOXUserException - if the field doesnt exist for this class

remove

public FetchGroup remove(java.lang.String fieldName)
Method to remove a field of the class from the fetch group.

Specified by:
remove in interface FetchGroup
Parameters:
fieldName - Name of the field
Returns:
This FetchGroup

registerListener

public void registerListener(FetchPlan plan)
Method to register a listener for changes to this FetchGroup.

Parameters:
plan - The FetchPlan that is listening

deregisterListener

public void deregisterListener(FetchPlan plan)
Method to deregister a listener for changes to this FetchGroup.

Parameters:
plan - The FetchPlan that is no longer listening

disconnectFromListeners

public void disconnectFromListeners()
Method to disconnect this fetch group from all listeners since the group is removed from use.



Copyright © -2008 . All Rights Reserved.