org.apache.jackrabbit.core.state
Class NodeReferences

java.lang.Object
  extended byorg.apache.jackrabbit.core.state.NodeReferences
All Implemented Interfaces:
Serializable

public class NodeReferences
extends Object
implements Serializable

NodeReferences represents the references (i.e. properties of type REFERENCE) to a particular node (denoted by its uuid).

See Also:
Serialized Form

Field Summary
protected  NodeReferencesId id
          identifier of this NodeReferences instance.
protected  ArrayList references
          list of PropertyId's (i.e.
 
Constructor Summary
NodeReferences(NodeReferencesId id)
          Package private constructor
 
Method Summary
 void addAllReferences(List references)
           
 void addReference(PropertyId refId)
           
 void clearAllReferences()
           
 NodeReferencesId getId()
          Returns the identifier of this node references object.
 List getReferences()
           
 NodeId getTargetId()
          Returns the identifier of the target node.
 boolean hasReferences()
          Returns a flag indicating whether this object holds any references
 boolean removeReference(PropertyId refId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected NodeReferencesId id
identifier of this NodeReferences instance.


references

protected ArrayList references
list of PropertyId's (i.e. the id's of the properties that refer to the target node denoted by id.getTargetId()).

note that the list can contain duplicate entries because a specific REFERENCE property can contain multiple references (if it's multi-valued) to potentially the same target node.

Constructor Detail

NodeReferences

public NodeReferences(NodeReferencesId id)
Package private constructor

Parameters:
id -
Method Detail

getId

public NodeReferencesId getId()
Returns the identifier of this node references object.

Returns:
the id of this node references object.

getTargetId

public NodeId getTargetId()
Returns the identifier of the target node.

Returns:
the id of the target node

hasReferences

public boolean hasReferences()
Returns a flag indicating whether this object holds any references

Returns:
true if this object holds references, false otherwise

getReferences

public List getReferences()
Returns:
the list of references

addReference

public void addReference(PropertyId refId)
Parameters:
refId -

addAllReferences

public void addAllReferences(List references)
Parameters:
references -

removeReference

public boolean removeReference(PropertyId refId)
Parameters:
refId -
Returns:
true if the reference was removed; false otherwise.

clearAllReferences

public void clearAllReferences()


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.