public class BasicRelationManager extends BasicNodeManager implements RelationManager
BasicNodeManager.NodeAndId| Modifier and Type | Field and Description |
|---|---|
MMObjectNode |
relDefNode |
builder, fieldTypescloud, nodeManager, noderef, originalNoderef, temporaryNodeIdBIDIRECTIONAL, UNIDIRECTIONALGUI_PLURAL, GUI_SINGULAR, ORDER_CREATE, ORDER_EDIT, ORDER_LIST, ORDER_NONE, ORDER_SEARCHCLOUD_COMMITNODE_KEY| Constructor and Description |
|---|
BasicRelationManager(MMObjectNode node,
BasicCloud cloud)
Creates a new instance of Relation manager.
|
BasicRelationManager(MMObjectNode node,
BasicCloud cloud,
int nodeId)
Creates a new Relation manager (for insert).
|
| Modifier and Type | Method and Description |
|---|---|
protected BasicNode |
createBasicNode()
BasicNodeManager is garantueed to return BasicNode's.
|
protected BasicRelation |
createBasicRelation()
BasicRelationManager is garantueed to create BasicRelations.
|
Relation |
createRelation(Node sourceNode,
Node destinationNode)
Adds a relation from this type.
|
(package private) int |
getBuilder() |
NodeManager |
getDestinationManager()
Retrieves the type of node that can act as the destination of a relation of this type.
|
int |
getDirectionality()
Retrieves the directionality for this type (the default assigned to a new relation).
|
String |
getForwardGUIName()
Retrieves the gui name (prompt) of the role from source to destination
|
String |
getForwardRole()
Retrieves the role of the source to the destination
|
String |
getReciprocalGUIName()
Retrieves the gui name (prompt) of the role from destination to source
|
String |
getReciprocalRole()
Retrieves the role of the destination to the source
|
RelationList |
getRelations(Node node)
Retrieves all the relations of this type from a given node.
|
NodeManager |
getSourceManager()
Retrieves the NodeManager of node that can act as the source of a relation of this type.
|
protected void |
initManager()
Initializes the NodeManager: determines the MMObjectBuilder from the
passed node (reldef or typerel), and fills temporary variables to maintain status.
|
boolean |
isRelationManager()
Determine whether this Node is a RelationManager.
|
boolean |
mayCreateRelation(Node sourceNode,
Node destinationNode)
Check if the current user may create a new relation of this type between
the specified nodes.
|
protected void |
setNodeManager(MMObjectNode node)
Set nodemanager for node
|
RelationManager |
toRelationManager()
Returns this as a RelationManager.
|
String |
toString()
Converts the node to a string
|
commit, createFieldList, createMMObjectNode, createNode, createNodeList, createQuery, createRelationList, delete, finalize, getAllowedRelations, getAllowedRelations, getAllowedRelations, getDescendants, getDescription, getDescription, getField, getFields, getFields, getFieldTypes, getFunctions, getGUIName, getGUIName, getGUIName, getInfo, getInfo, getList, getList, getList, getList, getMMObjectBuilder, getName, getNodeFunction, getParent, getProperties, getProperty, hasField, isNodeManager, mayCreateNode, setDefaultsWithCloud, sync, toNodeManagercancel, checkAccount, checkCommit, checkCreate, checkDelete, checkWrite, countRelatedNodes, countRelatedNodes, createAlias, createFunctionValue, createParameters, deleteAlias, deleteRelations, getAliases, getBooleanValue, getByteSize, getByteSize, getByteValue, getChanged, getCloud, getContext, getDateValue, getDoubleValue, getFloatValue, getInputStreamValue, getIntValue, getListValue, getLongValue, getNode, getNodeManager, getNodeValue, getNumber, getPossibleContexts, getRelatedNodes, getRelatedNodes, getRelations, getRelations, getSize, getStringValue, getValueWithoutProcess, getXMLValue, hasRelations, init, invalidateNode, isChanged, isChanged, isNew, isNull, mayChangeContext, mayDelete, mayWrite, setContext, setNode, setNodeManager, setSize, setValueWithoutChecks, toNodeNumbercompareTo, countRelations, countRelations, createRelation, delete, deleteRelations, equals, getDecimalValue, getFieldValue, getFieldValue, getFunction, getFunctionMap, getFunctionValue, getObjectValue, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelatedNodes, getRelations, getRelations, getRelations, getValue, getXMLValue, hashCode, isRelation, processNull, setBooleanValue, setByteValue, setDateValue, setDecimalValue, setDoubleValue, setFloatValue, setInputStreamValue, setIntValue, setListValue, setLongValue, setNodeValue, setObjectValue, setStringValue, setValue, setValueWithoutProcess, setXMLValue, toRelation, validatecreateRelationcreateFieldList, createNode, createNodeList, createQuery, createRelationList, getAllowedRelations, getAllowedRelations, getAllowedRelations, getCloud, getDescendants, getDescription, getDescription, getField, getFields, getFields, getGUIName, getGUIName, getGUIName, getInfo, getInfo, getList, getList, getList, getList, getName, getParent, getProperties, getProperty, hasField, mayCreateNodecancel, commit, countRelatedNodes, countRelatedNodes, countRelations, countRelations, createAlias, createParameters, delete, delete, deleteAlias, deleteRelations, deleteRelations, getAliases, getBooleanValue, getByteValue, getChanged, getContext, getDateValue, getDecimalValue, 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, isRelation, mayChangeContext, mayDelete, mayWrite, setBooleanValue, setByteValue, setContext, setDateValue, setDecimalValue, setDoubleValue, setFloatValue, setInputStreamValue, setIntValue, setListValue, setLongValue, setNodeManager, setNodeValue, setObjectValue, setStringValue, setValue, setValueWithoutProcess, setXMLValue, toNodeManager, toRelation, validatecompareTopublic MMObjectNode relDefNode
BasicRelationManager(MMObjectNode node, BasicCloud cloud, int nodeId)
node - the node on which to base the relation managercloud - the cloud for which to create the managerid - the id of the node in the temporary cloudBasicRelationManager(MMObjectNode node, BasicCloud cloud)
node - the node on which to base the relation managercloud - the cloud for which to create the managerpublic final boolean isRelationManager()
NodeisRelationManager in interface NodeisRelationManager in class AbstractNodetrue if this Node is a RelationManager.public final RelationManager toRelationManager()
NodetoRelationManager in interface NodetoRelationManager in class AbstractNodeNodeManager objectprotected void initManager()
initManager in class BasicNodeManagerprotected void setNodeManager(MMObjectNode node)
BasicNodesetNodeManager in class BasicNodeManagernode - node to derive nodemanager from.public String getForwardRole()
RelationManagergetForwardRole in interface RelationManagerStringpublic String getReciprocalRole()
RelationManagergetReciprocalRole in interface RelationManagerStringpublic String getForwardGUIName()
RelationManagergetForwardGUIName in interface RelationManagerStringpublic String getReciprocalGUIName()
RelationManagergetReciprocalGUIName in interface RelationManagerStringpublic int getDirectionality()
RelationManagergetDirectionality in interface RelationManagerint getBuilder()
public NodeManager getSourceManager()
RelationManagergetSourceManager in interface RelationManagerpublic NodeManager getDestinationManager()
RelationManagergetDestinationManager in interface RelationManagerprotected final BasicNode createBasicNode()
BasicNodeManagerBasicNodeManager.createNode()createBasicNode in class BasicNodeManagerprotected BasicRelation createBasicRelation()
createBasicNode().public Relation createRelation(Node sourceNode, Node destinationNode)
RelationManagercreateRelation in interface RelationManagersourceNode - the node from which you want to relatedestinationNode - the node to which you want to relatepublic RelationList getRelations(Node node)
RelationManagerNode.getRelations(String, NodeManager, String).getRelations in interface RelationManagernode - the node from which to give the relationspublic boolean mayCreateRelation(Node sourceNode, Node destinationNode)
RelationManagermayCreateRelation in interface RelationManagersourceNode - source node of the relationdestinationNode - destination node of the relationMMBase 1.9-SNAPSHOT - ${javadoctimestamp}