Package org.apache.jackrabbit.core.state
Class NodeReferences
- java.lang.Object
-
- org.apache.jackrabbit.core.state.NodeReferences
-
- All Implemented Interfaces:
Serializable
public class NodeReferences extends Object implements Serializable
NodeReferences
represents the references (i.e. properties of typeREFERENCE
) to a particular node (denoted by its uuid).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected NodeId
id
Identifier of the target node.protected ArrayList<PropertyId>
references
list of PropertyId's (i.e.
-
Constructor Summary
Constructors Constructor Description NodeReferences(NodeId id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAllReferences(List<PropertyId> references)
void
addReference(PropertyId refId)
void
clearAllReferences()
List<PropertyId>
getReferences()
NodeId
getTargetId()
Returns the identifier of the target node.boolean
hasReferences()
Returns a flag indicating whether this object holds any referencesboolean
removeReference(PropertyId refId)
String
toString()
-
-
-
Field Detail
-
id
protected NodeId id
Identifier of the target node.
-
references
protected ArrayList<PropertyId> references
list of PropertyId's (i.e. the id's of the properties that refer to the target node denoted byid.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(NodeId id)
-
-
Method Detail
-
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<PropertyId> getReferences()
- Returns:
- the list of references
-
addReference
public void addReference(PropertyId refId)
- Parameters:
refId
-
-
addAllReferences
public void addAllReferences(List<PropertyId> references)
- Parameters:
references
-
-
removeReference
public boolean removeReference(PropertyId refId)
- Parameters:
refId
-- Returns:
true
if the reference was removed;false
otherwise.
-
clearAllReferences
public void clearAllReferences()
-
-