org.mmbase.bridge.implementation
Class BasicRelation

java.lang.Object
  extended byorg.mmbase.bridge.util.AbstractNode
      extended byorg.mmbase.bridge.implementation.BasicNode
          extended byorg.mmbase.bridge.implementation.BasicRelation
All Implemented Interfaces:
Comparable, Node, Relation, SizeMeasurable

public class BasicRelation
extends BasicNode
implements Relation

Version:
$Id: BasicRelation.java,v 1.40 2006/01/24 12:29:27 michiel Exp $
Author:
Rob Vermeulen, Pierre van Rooden
Warning: No Java Documentation Available.

Field Summary
protected  int dnum
           
protected  boolean relationChanged
           
protected  int snum
           
 
Fields inherited from class org.mmbase.bridge.implementation.BasicNode
cloud, nodeManager, noderef
 
Fields inherited from class org.mmbase.bridge.util.AbstractNode
ACTION_COMMIT, ACTION_CREATE, ACTION_DELETE, ACTION_EDIT
 
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.
 boolean isRelation()
          Determine whether this Node is a Relation.
 void setDestination(Node node)
          set the destination of the relation
 void setSource(Node node)
          set the source of the relation
 void setValueWithoutProcess(String fieldName, Object value)
          Like setValue, but skips any processing that MMBase would normally perform on a field.
 Relation toRelation()
          Returns this as a Relation.
 
Methods inherited from class org.mmbase.bridge.implementation.BasicNode
cancel, countRelatedNodes, countRelatedNodes, createAlias, createFunctionValue, createParameters, delete, deleteAlias, deleteRelations, edit, finalize, getAliases, getBooleanValue, getByteSize, getByteSize, getByteValue, getChanged, getCloud, getContext, getDateValue, getDoubleValue, getFloatValue, getFunctions, getInputStreamValue, getIntValue, getListValue, getLongValue, getNode, getNodeFunction, getNodeManager, getNodeValue, getNumber, getPossibleContexts, getRelatedNodes, getRelations, getRelations, getSize, getStringValue, getValueWithoutProcess, getXMLValue, hashCode, hasRelations, invalidateNode, isChanged, isChanged, isNew, isNull, mayChangeContext, mayDelete, mayWrite, setContext, setNode, setNodeManager, setSize, setValueWithoutChecks, toNodeNumber, toString
 
Methods inherited from class org.mmbase.bridge.util.AbstractNode
compareTo, countRelations, countRelations, createRelation, delete, deleteRelations, equals, getFieldValue, getFieldValue, getFunction, getFunctionValue, getObjectValue, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelations, getRelations, getRelations, getValue, getXMLValue, isNodeManager, isRelationManager, processCommit, setBooleanValue, setByteValue, setDateValue, setDoubleValue, setFloatValue, setInputStreamValue, setIntValue, setListValue, setLongValue, setNodeValue, setObjectValue, setStringValue, setValue, setXMLValue, toNodeManager, toRelationManager, validate
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mmbase.bridge.Node
cancel, countRelatedNodes, countRelatedNodes, countRelations, countRelations, createAlias, createParameters, createRelation, delete, delete, deleteAlias, deleteRelations, deleteRelations, getAliases, getBooleanValue, getByteValue, getChanged, getCloud, getContext, getDateValue, getDoubleValue, getFieldValue, getFieldValue, getFloatValue, getFunction, getFunctions, getFunctionValue, getInputStreamValue, getIntValue, getListValue, getLongValue, getNodeManager, getNodeValue, getNumber, getObjectValue, getPossibleContexts, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelations, getRelations, getRelations, getRelations, getRelations, getSize, getStringValue, getValue, getValueWithoutProcess, getXMLValue, getXMLValue, hasRelations, isChanged, isChanged, isNew, isNodeManager, isNull, isRelationManager, mayChangeContext, mayDelete, mayWrite, setBooleanValue, setByteValue, setContext, setDateValue, setDoubleValue, setFloatValue, setInputStreamValue, setIntValue, setListValue, setLongValue, setNodeValue, setObjectValue, setStringValue, setValue, setXMLValue, toNodeManager, toRelationManager, toString, validate
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

snum

protected int snum

dnum

protected int dnum

relationChanged

protected boolean relationChanged
Method Detail

isRelation

public final boolean isRelation()
Description copied from interface: Node
Determine whether this Node is a Relation.

Specified by:
isRelation in interface Node
Overrides:
isRelation in class AbstractNode

toRelation

public Relation toRelation()
Description copied from interface: Node
Returns this as a Relation.

Specified by:
toRelation in interface Node
Overrides:
toRelation in class AbstractNode

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
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
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
Parameters:
node - 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
Parameters:
node - the destination node

getRelationManager

public RelationManager getRelationManager()
Description copied from interface: Relation
Retrieves the RelationManager used

Specified by:
getRelationManager in interface Relation
Returns:
the RelationManager

setValueWithoutProcess

public void setValueWithoutProcess(String fieldName,
                                   Object value)
Description copied from interface: Node
Like setValue, but skips any processing that MMBase would normally perform on a field. You can use this to set data on fields that are 'system' defined, to prevent (among other things) infinite recursion. Use with care - in general processing of a field has a purpose!

Specified by:
setValueWithoutProcess in interface Node
Overrides:
setValueWithoutProcess in class AbstractNode
Parameters:
fieldName - name of field
value - new value of the field

commit

public void commit()
Description copied from interface: Node
Commit the node to the database. Prior to committing, the values are processed by any commit-processors associated with the datatype of the node's fields), then validated. 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.8.1.20060716