org.mmbase.bridge.implementation
Class BasicRelationManager
java.lang.Object
|
+--org.mmbase.bridge.implementation.BasicNodeManager
|
+--org.mmbase.bridge.implementation.BasicRelationManager
- All Implemented Interfaces:
- java.lang.Comparable, NodeManager, RelationManager
- public class BasicRelationManager
- extends BasicNodeManager
- implements RelationManager
- Author:
- Rob Vermeulen, Pierre van Rooden
| Methods inherited from class org.mmbase.bridge.implementation.BasicNodeManager |
compareTo, getCloud, getDescription, getField, getFields, getFields, getGUIName, getInfo, getInfo, getList, getList, getList, getName, init, mayCreateNode |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mmbase.bridge.NodeManager |
getCloud, getDescription, getField, getFields, getFields, getGUIName, getInfo, getInfo, getList, getList, getList, getName, mayCreateNode |
createNode
public Node createNode()
- Description copied from interface:
NodeManager
- Creates a new node. The returned node will not be visible in the cloud
until the commit() method is called on this node. Until then it will have
a temporary node number.
- Specified by:
createNode in interface NodeManager- Overrides:
createNode in class BasicNodeManager
- Following copied from interface:
org.mmbase.bridge.NodeManager
- Returns:
- the new
Node
getForwardRole
public java.lang.String getForwardRole()
- Description copied from interface:
RelationManager
- Retrieves the role of the source to the destination
- Specified by:
getForwardRole in interface RelationManager
- Following copied from interface:
org.mmbase.bridge.RelationManager
- Returns:
- the role as a
String
getReciprocalRole
public java.lang.String getReciprocalRole()
- Description copied from interface:
RelationManager
- Retrieves the role of the destination to the source
- Specified by:
getReciprocalRole in interface RelationManager
- Following copied from interface:
org.mmbase.bridge.RelationManager
- Returns:
- the role as a
String
getDirectionality
public int getDirectionality()
- Description copied from interface:
RelationManager
- Retrieves the directionality for this type (the default assigned to a new relation).
- Specified by:
getDirectionality in interface RelationManager
- Following copied from interface:
org.mmbase.bridge.RelationManager
- Returns:
- one of the directionality constants
getBuilder
public int getBuilder()
getSourceManager
public NodeManager getSourceManager()
- Description copied from interface:
RelationManager
- Retrieves the NodeManager of node that can act as the source of a relation of this type.
- Specified by:
getSourceManager in interface RelationManager
- Following copied from interface:
org.mmbase.bridge.RelationManager
- Returns:
- the source NodeManager
getDestinationManager
public NodeManager getDestinationManager()
- Description copied from interface:
RelationManager
- Retrieves the type of node that can act as the destination of a relation of this type.
- Specified by:
getDestinationManager in interface RelationManager
- Following copied from interface:
org.mmbase.bridge.RelationManager
- Returns:
- the destination NodeManager
createRelation
public Relation createRelation(Node sourceNode,
Node destinationNode)
- Description copied from interface:
RelationManager
- Adds a relation from this type.
- Specified by:
createRelation in interface RelationManager
- Following copied from interface:
org.mmbase.bridge.RelationManager
- Parameters:
sourceNode - the node from which you want to relatedestinationNode - the node to which you want to relate- Returns:
- the added relation
getRelations
public RelationList getRelations(Node node)
- Description copied from interface:
RelationManager
- Retrieves all the relations of this type from a given node.
- Specified by:
getRelations in interface RelationManager
- Following copied from interface:
org.mmbase.bridge.RelationManager
- Parameters:
node - the node from which to give the relations- Returns:
- a list of relations
equals
public boolean equals(java.lang.Object o)
- Compares two relationmanagers, and returns true if they are equal.
This effectively means that both objects are relationmanagers, and they both use to the same builder type
- Overrides:
equals in class BasicNodeManager
- Parameters:
o - the object to compare it with
hashCode
public int hashCode()
- Returns the relationmanager's hashCode.
This effectively returns the object number of the typerel record
- Overrides:
hashCode in class BasicNodeManager
MMBase 2001