|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthelma.objectmodel.TransientNode
public class TransientNode
A transient implementation of INode. An instance of this class can't be made persistent by reachability from a persistent node. To make a persistent-capable object, class helma.objectmodel.db.Node has to be used.
Field Summary | |
---|---|
protected boolean |
anonymous
|
protected long |
created
|
protected java.lang.String |
id
|
protected long |
lastmodified
|
protected java.lang.String |
name
|
protected java.util.Hashtable |
nodeMap
|
protected java.util.Vector |
nodes
|
protected TransientNode |
parent
|
protected java.util.Hashtable |
propMap
|
Fields inherited from interface helma.objectmodel.INodeState |
---|
CLEAN, DELETED, INVALID, MODIFIED, NEW, TRANSIENT, VIRTUAL |
Constructor Summary | |
---|---|
TransientNode()
Creates a new TransientNode object. |
|
TransientNode(java.lang.String n)
Make a new TransientNode object with a given name |
Method Summary | |
---|---|
INode |
addNode(INode elem)
Add a child node to this node. |
INode |
addNode(INode elem,
int where)
Add a child node to this node at the given position |
void |
clearCacheNode()
Reset the cache node for this node. |
int |
contains(INode n)
Returns the position of the child or -1. |
long |
created()
Get the node's creation timestamp. |
INode |
createNode()
|
INode |
createNode(int where)
|
INode |
createNode(java.lang.String nm)
Create a new named property with a node value |
INode |
createNode(java.lang.String nm,
int where)
Create a new unnamed child node at the given position. |
static java.lang.String |
generateID()
|
IProperty |
get(java.lang.String propname)
Get a property with the given name. |
boolean |
getBoolean(java.lang.String propname)
Get a boolean property with the given name. |
INode |
getCacheNode()
Get the cache node for this node. |
IPathElement |
getChildElement(java.lang.String name)
Retrieve a child element of this object by name. |
java.util.Date |
getDate(java.lang.String propname)
Get a date property with the given name. |
DbMapping |
getDbMapping()
Get the node's DbMapping . |
java.lang.String |
getElementName()
Return the name to be used to get this element from its parent |
double |
getFloat(java.lang.String propname)
Get a float property with the given name. |
java.lang.String |
getFullName(INode root)
|
java.lang.String |
getID()
Get the node's ID. |
long |
getInteger(java.lang.String propname)
Get an integer property with the given name. |
java.lang.Object |
getJavaObject(java.lang.String propname)
Get a Java object property with the given name. |
java.lang.String |
getName()
Get the node's name. |
INode |
getNode(java.lang.String propname)
Get a node property with the given name. |
INode |
getParent()
Get the node's parent node. |
IPathElement |
getParentElement()
Return the parent element of this object. |
java.lang.String |
getPath()
Get the node's path. |
java.lang.String |
getPrototype()
Return the node's prototype name. |
int |
getState()
Get the node's state flag. |
java.lang.String |
getString(java.lang.String propname)
Get a string property with the given name. |
java.lang.String |
getString(java.lang.String propname,
java.lang.String defaultValue)
|
INode |
getSubnode(java.lang.String name)
Get a named child node with the given name or id. |
INode |
getSubnodeAt(int index)
GEt an unnamed child node at the given position |
java.lang.String |
getSubnodeRelation()
Get the node's explicit subnode select clause if one was set, or null |
java.util.Enumeration |
getSubnodes()
Get an enumeration of this node's unnamed child nodes |
boolean |
isAnonymous()
Returns true if this node is an unnamed node. |
long |
lastModified()
Get the node's last modification timestamp. |
int |
numberOfNodes()
Get the number the node's direct child nodes. |
java.util.Enumeration |
properties()
property-related |
protected void |
releaseNode(INode node)
"Physically" remove a subnode from the subnodes table. |
boolean |
remove()
Remove this node from the database. |
void |
removeNode(INode node)
Remove the given node from this node's child nodes. |
void |
setBoolean(java.lang.String propname,
boolean value)
Set the property with the given name to the given boolean value. |
void |
setDate(java.lang.String propname,
java.util.Date value)
Set the property with the given name to the given date value. |
void |
setDbMapping(DbMapping dbmap)
Set the node's DbMapping . |
void |
setFloat(java.lang.String propname,
double value)
Set the property with the given name to the given float value. |
void |
setInteger(java.lang.String propname,
long value)
Set the property with the given name to the given integer value. |
void |
setJavaObject(java.lang.String propname,
java.lang.Object value)
Set the property with the given name to the given Java object value. |
void |
setName(java.lang.String name)
Set the node's name. |
void |
setNode(java.lang.String propname,
INode value)
Set the property with the given name to the given node value. |
void |
setPrototype(java.lang.String proto)
Set the node's prototype name. |
void |
setState(int s)
Set the node's state flag. |
void |
setString(java.lang.String propname,
java.lang.String value)
Set the property with the given name to the given string value. |
void |
setSubnodeRelation(java.lang.String rel)
Set an explicit select clause for the node's subnodes |
java.lang.String |
toString()
|
void |
unset(java.lang.String propname)
Unset the property with the given name.. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Hashtable propMap
protected java.util.Hashtable nodeMap
protected java.util.Vector nodes
protected TransientNode parent
protected long created
protected long lastmodified
protected java.lang.String id
protected java.lang.String name
protected boolean anonymous
Constructor Detail |
---|
public TransientNode()
public TransientNode(java.lang.String n)
Method Detail |
---|
public static java.lang.String generateID()
public void setDbMapping(DbMapping dbmap)
INode
DbMapping
.
setDbMapping
in interface INode
public DbMapping getDbMapping()
INode
DbMapping
.
getDbMapping
in interface INode
public java.lang.String getID()
INode
getID
in interface INode
public boolean isAnonymous()
INode
isAnonymous
in interface INode
public java.lang.String getName()
INode
getName
in interface INode
public java.lang.String getElementName()
IPathElement
getElementName
in interface IPathElement
public int getState()
INode
getState
in interface INode
INodeState
interface.public void setState(int s)
INode
setState
in interface INode
s
- one of the constants defined in the INodeState
interface.public java.lang.String getPath()
INode
getPath
in interface INode
public java.lang.String getFullName(INode root)
public void setName(java.lang.String name)
INode
setName
in interface INode
public java.lang.String getPrototype()
INode
getPrototype
in interface IPathElement
getPrototype
in interface INode
public void setPrototype(java.lang.String proto)
INode
setPrototype
in interface INode
public INode getParent()
INode
getParent
in interface INode
public void setSubnodeRelation(java.lang.String rel)
INode
setSubnodeRelation
in interface INode
public java.lang.String getSubnodeRelation()
INode
getSubnodeRelation
in interface INode
public int numberOfNodes()
INode
numberOfNodes
in interface INode
public INode addNode(INode elem)
INode
addNode
in interface INode
public INode addNode(INode elem, int where)
INode
addNode
in interface INode
public INode createNode()
public INode createNode(int where)
public INode createNode(java.lang.String nm)
INode
createNode
in interface INode
public INode createNode(java.lang.String nm, int where)
INode
createNode
in interface INode
public IPathElement getParentElement()
IPathElement
getParentElement
in interface IPathElement
public IPathElement getChildElement(java.lang.String name)
IPathElement
getChildElement
in interface IPathElement
public INode getSubnode(java.lang.String name)
INode
getSubnode
in interface INode
public INode getSubnodeAt(int index)
INode
getSubnodeAt
in interface INode
public int contains(INode n)
INode
contains
in interface INode
public boolean remove()
INode
remove
in interface INode
public void removeNode(INode node)
INode
removeNode
in interface INode
protected void releaseNode(INode node)
public java.util.Enumeration getSubnodes()
INode
getSubnodes
in interface INode
public java.util.Enumeration properties()
properties
in interface INode
public IProperty get(java.lang.String propname)
INode
get
in interface INode
public java.lang.String getString(java.lang.String propname, java.lang.String defaultValue)
public java.lang.String getString(java.lang.String propname)
INode
getString
in interface INode
public long getInteger(java.lang.String propname)
INode
getInteger
in interface INode
public double getFloat(java.lang.String propname)
INode
getFloat
in interface INode
public java.util.Date getDate(java.lang.String propname)
INode
getDate
in interface INode
public boolean getBoolean(java.lang.String propname)
INode
getBoolean
in interface INode
public INode getNode(java.lang.String propname)
INode
getNode
in interface INode
public java.lang.Object getJavaObject(java.lang.String propname)
INode
getJavaObject
in interface INode
public void setString(java.lang.String propname, java.lang.String value)
INode
setString
in interface INode
public void setInteger(java.lang.String propname, long value)
INode
setInteger
in interface INode
public void setFloat(java.lang.String propname, double value)
INode
setFloat
in interface INode
public void setBoolean(java.lang.String propname, boolean value)
INode
setBoolean
in interface INode
public void setDate(java.lang.String propname, java.util.Date value)
INode
setDate
in interface INode
public void setJavaObject(java.lang.String propname, java.lang.Object value)
INode
setJavaObject
in interface INode
public void setNode(java.lang.String propname, INode value)
INode
setNode
in interface INode
public void unset(java.lang.String propname)
INode
unset
in interface INode
public long lastModified()
INode
lastModified
in interface INode
public long created()
INode
created
in interface INode
public java.lang.String toString()
toString
in class java.lang.Object
public INode getCacheNode()
getCacheNode
in interface INode
public void clearCacheNode()
clearCacheNode
in interface INode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |