Java Doc for BasicNode.java in  » Database-ORM » MMBase » org » mmbase » bridge » implementation » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » MMBase » org.mmbase.bridge.implementation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mmbase.bridge.util.AbstractNode
      org.mmbase.bridge.implementation.BasicNode

All known Subclasses:   org.mmbase.bridge.implementation.BasicRelation,  org.mmbase.bridge.implementation.BasicNodeManager,
BasicNode
public class BasicNode extends org.mmbase.bridge.util.AbstractNode implements Node,SizeMeasurable(Code)
Basic implementation of Node. Wraps MMObjectNodes, adds security.
author:
   Rob Vermeulen
author:
   Pierre van Rooden
author:
   Michiel Meeuwissen
version:
   $Id: BasicNode.java,v 1.226 2008/03/17 10:05:02 michiel Exp $
See Also:   org.mmbase.bridge.Node
See Also:   org.mmbase.module.core.MMObjectNode


Field Summary
protected  Stringaccount
     The account this node is edited under.
final protected  BasicCloudcloud
     Reference to the Cloud.
protected  BasicNodeManagernodeManager
    
protected  MMObjectNodenoderef
     Reference to actual MMObjectNode object.
protected  inttemporaryNodeId
     Temporary node ID. This is necessary since there is otherwise no sure (and quick) way to determine whether a node is in 'edit' mode (i.e.

Constructor Summary
 BasicNode(BasicCloud cloud)
    
 BasicNode(MMObjectNode node, BasicNodeManager nodeManager)
     Instantiates a node, linking it to a specified node manager.
 BasicNode(MMObjectNode node, BasicCloud cloud)
     Instantiates a node, linking it to a specified cloud The NodeManager for the node is requested from the Cloud.
 BasicNode(MMObjectNode node, BasicCloud cloud, int id)
     Instantiates a new node (for insert), using a specified nodeManager.

Method Summary
public  voidcancel()
    
protected  voidcheckAccount()
    
protected  voidcheckCommit()
    
protected  voidcheckCreate()
    
protected  voidcheckDelete()
    
protected  voidcheckWrite()
    
public  voidcommit()
    
public  intcountRelatedNodes(NodeManager otherNodeManager, String role, String direction)
    
public  intcountRelatedNodes(String type)
    
public  voidcreateAlias(String aliasName)
    
protected  FieldValuecreateFunctionValue(Object result)
    
public  ParameterscreateParameters(String functionName)
    
public  voiddelete(boolean deleteRelations)
    
public  voiddeleteAlias(String aliasName)
    
public  voiddeleteRelations(String type)
    
protected  voidfinalize()
     Reverse the buffers, when changed and not stored...
public  StringListgetAliases()
    
public  booleangetBooleanValue(String fieldName)
    
public  intgetByteSize()
    
public  intgetByteSize(SizeOf sizeof)
    
public  byte[]getByteValue(String fieldName)
    
public  Set<String>getChanged()
    
public  CloudgetCloud()
    
public  StringgetContext()
    
public  DategetDateValue(String fieldName)
    
public  doublegetDoubleValue(String fieldName)
    
public  floatgetFloatValue(String fieldName)
    
public  Collection<Function<?>>getFunctions()
    
public  java.io.InputStreamgetInputStreamValue(String fieldName)
    
public  intgetIntValue(String fieldName)
    
public  ListgetListValue(String fieldName)
    
public  longgetLongValue(String fieldName)
    
final protected  MMObjectNodegetNode()
     Obtains a reference to the underlying MMObjectNode.
protected  FunctiongetNodeFunction(String functionName)
    
public  NodeManagergetNodeManager()
    
public  NodegetNodeValue(String fieldName)
    
public  intgetNumber()
    
public  StringListgetPossibleContexts()
    
protected  NodeListgetRelatedNodes(NodeManager otherManager, String role)
    
public  NodeListgetRelatedNodes(NodeManager otherManager, String role, String searchDir)
    
public  RelationListgetRelations(String role, String otherNodeManager)
    
public  RelationListgetRelations(String role, NodeManager nodeManager, String searchDir)
     Returns a list of relations of the given node.
public  longgetSize(String fieldName)
    
public  StringgetStringValue(String fieldName)
    
public  ObjectgetValueWithoutProcess(String fieldName)
     Like getObjectValue, but skips any processing that MMBase would normally perform on a field.
public  DocumentgetXMLValue(String fieldName)
    
public  booleanhasRelations()
    
protected  voidinit()
     Initializes state in case of a transaction.
protected  voidinvalidateNode()
     Invalidates the reference to the underlying MMObjectNode, replacing it with a virtual node that only inherits the number field.
public  booleanisChanged(String fieldName)
    
public  booleanisChanged()
    
public  booleanisNew()
     Returns whether this is a new (not yet committed) node.
public  booleanisNull(String fieldName)
    
public  booleanmayChangeContext()
    
public  booleanmayDelete()
    
public  booleanmayWrite()
    
public  voidsetContext(String context)
    
protected  voidsetNode(MMObjectNode n)
     Sets the reference to the underlying MMObjectNode.
protected  voidsetNodeManager(MMObjectNode node)
    
protected  voidsetSize(String fieldName, long size)
    
protected  voidsetValueWithoutChecks(String fieldName, Object value)
     Protected method to be able to set rnumber when creating a relation.
protected  IntegertoNodeNumber(Object v)
    
public  StringtoString()
    

Field Detail
account
protected String account(Code)
The account this node is edited under. This is needed to check whether people have not switched users during an edit.



cloud
final protected BasicCloud cloud(Code)
Reference to the Cloud.



nodeManager
protected BasicNodeManager nodeManager(Code)
Reference to the NodeManager



noderef
protected MMObjectNode noderef(Code)
Reference to actual MMObjectNode object.



temporaryNodeId
protected int temporaryNodeId(Code)
Temporary node ID. This is necessary since there is otherwise no sure (and quick) way to determine whether a node is in 'edit' mode (i.e. has a temporary node). Basically, a temporarynodeid is either -1 (invalid), or a negative number smaller than -1 (a temporary number assigned by the system).




Constructor Detail
BasicNode
BasicNode(BasicCloud cloud)(Code)



BasicNode
BasicNode(MMObjectNode node, BasicNodeManager nodeManager)(Code)
Instantiates a node, linking it to a specified node manager. Use this constructor if the node you create uses a NodeManager that is not readily available from the cloud (such as a temporary nodemanager for a result list).
Parameters:
  node - the MMObjectNode to base the node on
Parameters:
  nodeManager - the NodeManager to use for administrating this Node
throws:
  IllegalArgumentException - If node is null



BasicNode
BasicNode(MMObjectNode node, BasicCloud cloud)(Code)
Instantiates a node, linking it to a specified cloud The NodeManager for the node is requested from the Cloud.
Parameters:
  node - the MMObjectNode to base the node on
Parameters:
  cloud - the cloud to which this node belongs
throws:
  IllegalArgumentException - If node is null



BasicNode
BasicNode(MMObjectNode node, BasicCloud cloud, int id)(Code)
Instantiates a new node (for insert), using a specified nodeManager.
Parameters:
  node - a temporary MMObjectNode that is the base for the node
Parameters:
  cloud - the cloud to create the node in
Parameters:
  id - the id of the node in the temporary cloud




Method Detail
cancel
public void cancel()(Code)



checkAccount
protected void checkAccount()(Code)



checkCommit
protected void checkCommit()(Code)



checkCreate
protected void checkCreate()(Code)



checkDelete
protected void checkDelete()(Code)



checkWrite
protected void checkWrite()(Code)



commit
public void commit()(Code)



countRelatedNodes
public int countRelatedNodes(NodeManager otherNodeManager, String role, String direction)(Code)



countRelatedNodes
public int countRelatedNodes(String type)(Code)



createAlias
public void createAlias(String aliasName)(Code)



createFunctionValue
protected FieldValue createFunctionValue(Object result)(Code)



createParameters
public Parameters createParameters(String functionName)(Code)



delete
public void delete(boolean deleteRelations)(Code)



deleteAlias
public void deleteAlias(String aliasName)(Code)



deleteRelations
public void deleteRelations(String type) throws NotFoundException(Code)



finalize
protected void finalize()(Code)
Reverse the buffers, when changed and not stored...



getAliases
public StringList getAliases()(Code)



getBooleanValue
public boolean getBooleanValue(String fieldName)(Code)



getByteSize
public int getByteSize()(Code)



getByteSize
public int getByteSize(SizeOf sizeof)(Code)



getByteValue
public byte[] getByteValue(String fieldName)(Code)



getChanged
public Set<String> getChanged()(Code)



getCloud
public Cloud getCloud()(Code)



getContext
public String getContext()(Code)



getDateValue
public Date getDateValue(String fieldName)(Code)



getDoubleValue
public double getDoubleValue(String fieldName)(Code)



getFloatValue
public float getFloatValue(String fieldName)(Code)



getFunctions
public Collection<Function<?>> getFunctions()(Code)



getInputStreamValue
public java.io.InputStream getInputStreamValue(String fieldName)(Code)



getIntValue
public int getIntValue(String fieldName)(Code)



getListValue
public List getListValue(String fieldName)(Code)



getLongValue
public long getLongValue(String fieldName)(Code)



getNode
final protected MMObjectNode getNode()(Code)
Obtains a reference to the underlying MMObjectNode. If the underlying node was deleted, this returns a virtual node with no info except the (original) node number. the underlying MMObjectNode
throws:
  NotFoundException - if no node was specified.



getNodeFunction
protected Function getNodeFunction(String functionName)(Code)



getNodeManager
public NodeManager getNodeManager()(Code)



getNodeValue
public Node getNodeValue(String fieldName)(Code)



getNumber
public int getNumber()(Code)



getPossibleContexts
public StringList getPossibleContexts()(Code)



getRelatedNodes
protected NodeList getRelatedNodes(NodeManager otherManager, String role)(Code)

since:
   MMBase-1.8.2



getRelatedNodes
public NodeList getRelatedNodes(NodeManager otherManager, String role, String searchDir)(Code)

Parameters:
  otherManager - node manager on the other side of the relation
Parameters:
  role - role of the relation
Parameters:
  searchDir - direction of the relation List of related nodes
See Also:   Queries.createRelatedNodesQuery
See Also:    Should perhaps be implemented with that.
since:
   MMBase-1.6



getRelations
public RelationList getRelations(String role, String otherNodeManager) throws NotFoundException(Code)



getRelations
public RelationList getRelations(String role, NodeManager nodeManager, String searchDir) throws NotFoundException(Code)
Returns a list of relations of the given node.
Parameters:
  role - role of the relation
Parameters:
  nodeManager - node manager on the other side of the relation
Parameters:
  searchDir - direction of the relation list of relations
throws:
  NotFoundException -
See Also:   Queries.createRelationNodesQuery
See Also:    Should perhaps be implemented with that



getSize
public long getSize(String fieldName)(Code)



getStringValue
public String getStringValue(String fieldName)(Code)



getValueWithoutProcess
public Object getValueWithoutProcess(String fieldName)(Code)
Like getObjectValue, but skips any processing that MMBase would normally perform on a field. You can use this to get data from a field for validation purposes.
Parameters:
  fieldName - name of field
since:
   MMBase-1.8



getXMLValue
public Document getXMLValue(String fieldName)(Code)



hasRelations
public boolean hasRelations()(Code)



init
protected void init()(Code)
Initializes state in case of a transaction.



invalidateNode
protected void invalidateNode()(Code)
Invalidates the reference to the underlying MMObjectNode, replacing it with a virtual node that only inherits the number field.
since:
   MMBase-1.6.4



isChanged
public boolean isChanged(String fieldName)(Code)



isChanged
public boolean isChanged()(Code)



isNew
public boolean isNew()(Code)
Returns whether this is a new (not yet committed) node. is a new node



isNull
public boolean isNull(String fieldName)(Code)



mayChangeContext
public boolean mayChangeContext()(Code)



mayDelete
public boolean mayDelete()(Code)



mayWrite
public boolean mayWrite()(Code)



setContext
public void setContext(String context)(Code)



setNode
protected void setNode(MMObjectNode n)(Code)
Sets the reference to the underlying MMObjectNode.
Parameters:
  n - the node to set a reference to.
throws:
  IllegalArgumentException - is n is null
since:
   MMBase-1.6.4



setNodeManager
protected void setNodeManager(MMObjectNode node)(Code)

since:
   MMBase-1.8



setSize
protected void setSize(String fieldName, long size)(Code)



setValueWithoutChecks
protected void setValueWithoutChecks(String fieldName, Object value)(Code)
Protected method to be able to set rnumber when creating a relation.
Parameters:
  fieldName - name of field
Parameters:
  value - new value of field
since:
   MMBase-1.7



toNodeNumber
protected Integer toNodeNumber(Object v)(Code)



toString
public String toString()(Code)



Methods inherited from org.mmbase.bridge.util.AbstractNode
public void cancel()(Code)(Java Doc)
protected void checkWrite()(Code)(Java Doc)
public void commit()(Code)(Java Doc)
final public int compareTo(Node o)(Code)(Java Doc)
public int countRelatedNodes(NodeManager otherNodeManager, String role, String direction)(Code)(Java Doc)
public int countRelatedNodes(String type)(Code)(Java Doc)
final public int countRelations()(Code)(Java Doc)
final public int countRelations(String type)(Code)(Java Doc)
public void createAlias(String aliasName)(Code)(Java Doc)
protected FieldValue createFunctionValue(Object result)(Code)(Java Doc)
public Parameters createParameters(String functionName)(Code)(Java Doc)
public Relation createRelation(Node destinationNode, RelationManager relationManager)(Code)(Java Doc)
final public void delete()(Code)(Java Doc)
public void delete(boolean deleteRelations)(Code)(Java Doc)
public void deleteAlias(String aliasName)(Code)(Java Doc)
final public void deleteRelations()(Code)(Java Doc)
public void deleteRelations(String type) throws NotFoundException(Code)(Java Doc)
final public boolean equals(Object o)(Code)(Java Doc)
public StringList getAliases()(Code)(Java Doc)
public boolean getBooleanValue(String fieldName)(Code)(Java Doc)
public byte[] getByteValue(String fieldName)(Code)(Java Doc)
public Set<String> getChanged()(Code)(Java Doc)
public String getContext()(Code)(Java Doc)
public Date getDateValue(String fieldName)(Code)(Java Doc)
public double getDoubleValue(String fieldName)(Code)(Java Doc)
final public FieldValue getFieldValue(String fieldName) throws NotFoundException(Code)(Java Doc)
final public FieldValue getFieldValue(Field field)(Code)(Java Doc)
public float getFloatValue(String fieldName)(Code)(Java Doc)
final public Function getFunction(String functionName)(Code)(Java Doc)
public FieldValue getFunctionValue(String functionName, List parameters)(Code)(Java Doc)
public java.io.InputStream getInputStreamValue(String fieldName)(Code)(Java Doc)
public int getIntValue(String fieldName)(Code)(Java Doc)
public List getListValue(String fieldName)(Code)(Java Doc)
public long getLongValue(String fieldName)(Code)(Java Doc)
protected Function getNodeFunction(String functionName)(Code)(Java Doc)
public Node getNodeValue(String fieldName)(Code)(Java Doc)
public int getNumber()(Code)(Java Doc)
final public Object getObjectValue(String fieldName)(Code)(Java Doc)
public StringList getPossibleContexts()(Code)(Java Doc)
final public NodeList getRelatedNodes()(Code)(Java Doc)
final public NodeList getRelatedNodes(String type)(Code)(Java Doc)
final public NodeList getRelatedNodes(NodeManager nodeManager)(Code)(Java Doc)
final public NodeList getRelatedNodes(String type, String role, String searchDir)(Code)(Java Doc)
public NodeList getRelatedNodes(NodeManager nodeManager, String role, String searchDir)(Code)(Java Doc)
final public RelationList getRelations()(Code)(Java Doc)
final public RelationList getRelations(String role)(Code)(Java Doc)
final public RelationList getRelations(String role, NodeManager nodeManager)(Code)(Java Doc)
public RelationList getRelations(String role, NodeManager nodeManager, String searchDir) throws NotFoundException(Code)(Java Doc)
public RelationList getRelations(String role, String nodeManager) throws NotFoundException(Code)(Java Doc)
public String getStringValue(String fieldName)(Code)(Java Doc)
final public Object getValue(String fieldName)(Code)(Java Doc)
public Document getXMLValue(String fieldName)(Code)(Java Doc)
final public Element getXMLValue(String fieldName, Document tree)(Code)(Java Doc)
public boolean hasRelations()(Code)(Java Doc)
final public int hashCode()(Code)(Java Doc)
public boolean isChanged(String fieldName)(Code)(Java Doc)
public boolean isChanged()(Code)(Java Doc)
public boolean isNew()(Code)(Java Doc)
public boolean isNodeManager()(Code)(Java Doc)
public boolean isNull(String fieldName)(Code)(Java Doc)
public boolean isRelation()(Code)(Java Doc)
public boolean isRelationManager()(Code)(Java Doc)
public boolean mayChangeContext()(Code)(Java Doc)
public boolean mayDelete()(Code)(Java Doc)
public boolean mayWrite()(Code)(Java Doc)
final public void processCommit()(Code)(Java Doc)
protected Object processNull(int type, Field field)(Code)(Java Doc)
final public void setBooleanValue(String fieldName, boolean value)(Code)(Java Doc)
final public void setByteValue(String fieldName, byte[] value)(Code)(Java Doc)
public void setContext(String context)(Code)(Java Doc)
final public void setDateValue(String fieldName, Date value)(Code)(Java Doc)
final public void setDoubleValue(String fieldName, double value)(Code)(Java Doc)
final public void setFloatValue(String fieldName, float value)(Code)(Java Doc)
final public void setInputStreamValue(String fieldName, InputStream value, long size)(Code)(Java Doc)
final public void setIntValue(String fieldName, int value)(Code)(Java Doc)
final public void setListValue(String fieldName, List value)(Code)(Java Doc)
final public void setLongValue(String fieldName, long value)(Code)(Java Doc)
final public void setNodeValue(String fieldName, Node value)(Code)(Java Doc)
final public void setObjectValue(String fieldName, Object value)(Code)(Java Doc)
abstract protected void setSize(String fieldName, long size)(Code)(Java Doc)
final public void setStringValue(String fieldName, String value)(Code)(Java Doc)
final public void setValue(String fieldName, Object value)(Code)(Java Doc)
abstract protected void setValueWithoutChecks(String fieldName, Object value)(Code)(Java Doc)
public void setValueWithoutProcess(String fieldName, Object value)(Code)(Java Doc)
final public void setXMLValue(String fieldName, Document value)(Code)(Java Doc)
public NodeManager toNodeManager()(Code)(Java Doc)
protected Integer toNodeNumber(Object v)(Code)(Java Doc)
public Relation toRelation()(Code)(Java Doc)
public RelationManager toRelationManager()(Code)(Java Doc)
public Collection<String> validate()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.