org.mmbase.bridge.implementation
Class BasicRelation

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

public class BasicRelation
extends BasicNode
implements Relation

Version:
$Id: BasicRelation.java,v 1.25.2.5 2003/04/08 14:32:22 pierre Exp $
Author:
Rob Vermeulen, Pierre van Rooden

Field Summary
protected  int dnum
           
protected  boolean relationChanged
           
protected  int snum
           
 
Fields inherited from class org.mmbase.bridge.implementation.BasicNode
account, ACTION_COMMIT, ACTION_CREATE, ACTION_DELETE, ACTION_EDIT, cloud, isnew, mmb, nodeManager, noderef, temporaryNodeId
 
Method Summary
 void commit()
          Commit the node to the database.
 Node getDestination()
          Retrieves the destination of the relation
 RelationManager getRelationManager()
          Retrieves the RelationManager used
 Node getSource()
          Retrieves the source of the relation
protected  void init()
          Initializes the node.
 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
_setValue, cancel, compareTo, countRelatedNodes, countRelations, countRelations, createAlias, createRelation, delete, delete, deleteAlias, deleteRelations, deleteRelations, edit, equals, finalize, getAliases, getBooleanValue, getByteSize, getByteSize, getByteValue, getCloud, getContext, getDoubleValue, getFieldValue, getFieldValue, getFloatValue, getFunctionValue, getIntValue, getLongValue, getNode, getNodeManager, getNodeValue, getNumber, getPossibleContexts, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelations, getRelations, getRelations, getRelations, getStringValue, getValue, getXMLValue, getXMLValue, hashCode, hasRelations, invalidateNode, isNodeManager, isRelation, isRelationManager, mayChangeContext, mayDelete, mayLink, mayWrite, setBooleanValue, setByteValue, setContext, setDoubleValue, setFloatValue, setIntValue, setLongValue, setNode, setNodeValue, setStringValue, setValue, setXMLValue, toNodeManager, toRelation, toRelationManager, toString
 
Methods inherited from class java.lang.Object
clone, 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, getFieldValue, getFieldValue, getFloatValue, getFunctionValue, getIntValue, getLongValue, getNodeManager, getNodeValue, getNumber, getPossibleContexts, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelations, getRelations, getRelations, getRelations, getStringValue, getValue, getXMLValue, getXMLValue, hasRelations, isNodeManager, isRelation, isRelationManager, mayChangeContext, mayDelete, mayLink, mayWrite, setBooleanValue, setByteValue, setContext, setDoubleValue, setFloatValue, setIntValue, setLongValue, setNodeValue, setStringValue, setValue, setXMLValue, toNodeManager, toRelation, toRelationManager, toString
 

Field Detail

snum

protected int snum

dnum

protected int dnum

relationChanged

protected boolean relationChanged
Method Detail

init

protected void init()
Initializes the node. Determines nodemanager and cloud (depending on information available), Sets references to MMBase modules and initializes state in case of a transaction.
Overrides:
init in class BasicNode

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


MMBase build 1.6.5.20030923