org.mmbase.bridge.implementation
Class BasicRelation

java.lang.Object
  |
  +--org.mmbase.bridge.implementation.BasicNode
        |
        +--org.mmbase.bridge.implementation.BasicRelation
All Implemented Interfaces:
Node, Relation

public class BasicRelation
extends BasicNode
implements Relation

Author:
Rob Vermeulen, Pierre van Rooden

Fields inherited from class org.mmbase.bridge.implementation.BasicNode
account, ACTION_COMMIT, ACTION_CREATE, ACTION_DELETE, ACTION_EDIT, ACTION_LINK, cloud, isnew, mmb, nodeManager, noderef, temporaryNodeId
 
Method Summary
 void commit()
          Commit the node to the database.
 boolean equals(java.lang.Object o)
          Compares two relations, and returns true if they are equal.
 Node getDestination()
          Retrieves the destination of the relation
 RelationManager getRelationManager()
          Retrieves the RelationManager used
 Node getSource()
          Retrieves the source of the relation
 int hashCode()
          Returns the object's hashCode.
 void setDestination(Node node)
          set the destination of the relation
 void setSource(Node node)
          set the source of the relation
 
Methods inherited from class org.mmbase.bridge.implementation.BasicNode
cancel, countRelatedNodes, countRelations, countRelations, createAlias, createRelation, delete, delete, deleteAlias, deleteRelations, deleteRelations, edit, getAliases, getBooleanValue, getByteValue, getCloud, getContext, getDoubleValue, getFloatValue, getIntValue, getLongValue, getNode, getNodeManager, getNodeValue, getNumber, getPossibleContexts, getRelatedNodes, getRelatedNodes, getRelations, getRelations, getStringValue, getValue, hasRelations, mayChangeContext, mayDelete, mayLink, mayWrite, setBooleanValue, setByteValue, setContext, setDoubleValue, setFloatValue, setIntValue, setLongValue, setStringValue, setValue, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mmbase.bridge.Node
cancel, countRelatedNodes, countRelations, countRelations, createAlias, createRelation, delete, delete, deleteAlias, deleteRelations, deleteRelations, getAliases, getBooleanValue, getByteValue, getCloud, getContext, getDoubleValue, getFloatValue, getIntValue, getLongValue, getNodeManager, getNodeValue, getNumber, getPossibleContexts, getRelatedNodes, getRelatedNodes, getRelations, getRelations, getStringValue, getValue, hasRelations, mayChangeContext, mayDelete, mayLink, mayWrite, setByteValue, setContext, setDoubleValue, setFloatValue, setIntValue, setLongValue, setStringValue, setValue, toString
 

Method Detail

getSource

public Node getSource()
Description copied from interface: Relation
Retrieves the source of the relation
Specified by:
getSource in interface Relation
Following copied from interface: org.mmbase.bridge.Relation
Returns:
the source node

getDestination

public Node getDestination()
Description copied from interface: Relation
Retrieves the destination of the relation
Specified by:
getDestination in interface Relation
Following copied from interface: org.mmbase.bridge.Relation
Returns:
the destination node

setSource

public void setSource(Node node)
Description copied from interface: Relation
set the source of the relation
Specified by:
setSource in interface Relation
Following copied from interface: org.mmbase.bridge.Relation
Parameters:
the - source node

setDestination

public void setDestination(Node node)
Description copied from interface: Relation
set the destination of the relation
Specified by:
setDestination in interface Relation
Following copied from interface: org.mmbase.bridge.Relation
Parameters:
the - destination node

getRelationManager

public RelationManager getRelationManager()
Description copied from interface: Relation
Retrieves the RelationManager used
Specified by:
getRelationManager in interface Relation
Following copied from interface: org.mmbase.bridge.Relation
Returns:
the RelationManager

commit

public void commit()
Description copied from interface: Node
Commit the node to the database. Makes this node and/or the changes made to this node visible to the cloud. If this method is called for the first time on this node it will make this node visible to the cloud, otherwise the modifications made to this node using the set methods will be made visible to the cloud. This action fails if the current node is not in edit mode. If the node is in a transaction, nothing happens - actual committing occurs through the transaction.
Specified by:
commit in interface Node
Overrides:
commit in class BasicNode

equals

public boolean equals(java.lang.Object o)
Compares two relations, and returns true if they are equal. This effectively means that both objects are relations, and they both refer to the same objectnode
Overrides:
equals in class BasicNode
Parameters:
o - the object to compare it with

hashCode

public int hashCode()
Returns the object's hashCode. This effectively returns th objectnode's number
Overrides:
hashCode in class BasicNode


MMBase 2001