org.enhydra.barracuda.plankton.data
Interface PData

All Superinterfaces:
Cloneable, Serializable, StateMap
All Known Subinterfaces:
PList, PMap
All Known Implementing Classes:
AbstractPData, PArrayList, PHashMap

public interface PData
extends StateMap, Cloneable, Serializable

This interface defines the methods required to establish a heirarchical relationship between objects.


Method Summary
 PData getParent()
          get the objects parent (null if root)
 PData getRootParent()
          get the root parent by chaining back up the heirarchy until we find the highest PData object in the heirarchy.
 boolean isInheritParents()
          Return true if we are inheriting parents.
 void setInheritParents(boolean val)
          Do we want to inherit parents.
 void setParent(PData p)
          set the object's parent
 
Methods inherited from interface org.enhydra.barracuda.plankton.data.StateMap
clearState, getState, getStateKeys, getStateValues, putState, removeState
 

Method Detail

setParent

public void setParent(PData p)
set the object's parent

Parameters:
p -

getParent

public PData getParent()
get the objects parent (null if root)

Returns:
the PData object

getRootParent

public PData getRootParent()
get the root parent by chaining back up the heirarchy until we find the highest PData object in the heirarchy.

Returns:
the root PData object

setInheritParents

public void setInheritParents(boolean val)
Do we want to inherit parents. Defaults to true. This indicates that when an object is added to this data collection, if it implements PData, it should automatically inherit the current object as its parent. You would typically set this to false if you were going to be storing PData "mini-hierarchies" within a larger PData hierarchy

Parameters:
val - true if we should inherit parents

isInheritParents

public boolean isInheritParents()
Return true if we are inheriting parents.

Returns:
true if we are inheriting parents


Copyright © 2003 BarracudaMVC.org All Rights Reserved.