|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.persistence.bundle.util.NodePropBundle
public class NodePropBundle
This Class provides a simple structure to hold the nodestate and related propertystate data.
Nested Class Summary | |
---|---|
static class |
NodePropBundle.ChildNodeEntry
Helper class for a child node entry |
static class |
NodePropBundle.PropertyEntry
Helper class for a property enrty |
Constructor Summary | |
---|---|
NodePropBundle(BundleBinding binding,
NodeId id)
Creates a "new" bundle with the given id |
|
NodePropBundle(BundleBinding binding,
NodeState state)
Creates a bundle from the given state |
Method Summary | |
---|---|
void |
addChildNodeEntry(Name name,
NodeId id)
Adds a child node entry. |
void |
addProperty(NodePropBundle.PropertyEntry entry)
Adds a new property entry |
void |
addProperty(PropertyState state)
Creates a property entry from the given state and adds it. |
NodeState |
createNodeState(PersistenceManager pMgr)
Creates a node state from the values of this bundle |
PropertyState |
createPropertyState(PersistenceManager pMgr,
Name name)
Creates a property state from the values of this bundle |
List |
getChildNodeEntries()
Returns the list of the child node entries. |
NodeId |
getId()
Returns the node id of this bundle |
Set |
getMixinTypeNames()
Returns the mixin type names of this bundle. |
short |
getModCount()
Retrusn the mod clount. |
NodeDefId |
getNodeDefId()
Returns the node def id of this bundle. |
Name |
getNodeTypeName()
Returns the nodetype name of this bundle |
NodeId |
getParentId()
Returns the parent id of this bundle |
Collection |
getPropertyEntries()
Returns a collection of property entries. |
NodePropBundle.PropertyEntry |
getPropertyEntry(Name name)
Returns the property entry with the given name. |
Set |
getPropertyNames()
Returns a set of the property names. |
Set |
getSharedSet()
Sets the shared set of this bundle. |
long |
getSize()
Returns the approx. size of this bundle. |
boolean |
hasProperty(Name name)
Checks if this bundle has a property |
boolean |
isNew()
Checks if this bundle is new. |
boolean |
isReferenceable()
Checks if this bundle is referenceable. |
void |
markOld()
Marks this bunlde as 'not new'. |
void |
removeAllProperties()
Removes all property entries |
void |
removeProperty(Name name)
Removes the proprty with the given name from this bundle. |
void |
setMixinTypeNames(Set mixinTypeNames)
Sets the mixin type names |
void |
setModCount(short modCount)
Sets the mod count |
void |
setNodeDefId(NodeDefId nodeDefId)
Sets the node def id. |
void |
setNodeTypeName(Name nodeTypeName)
Sets the node type name |
void |
setParentId(NodeId parentId)
Sets the parent id |
void |
setReferenceable(boolean referenceable)
Sets the is referenceable flag on this bundle |
void |
setSharedSet(Set sharedSet)
Sets the shared set. |
void |
setSize(long size)
Sets the data size of this bundle |
void |
update(NodeState state)
Updates this bundle with values from the given state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodePropBundle(BundleBinding binding, NodeId id)
binding
- the bundle bindingid
- the node idpublic NodePropBundle(BundleBinding binding, NodeState state)
binding
- the bundle bindingstate
- the node stateMethod Detail |
---|
public void update(NodeState state)
state
- the node statepublic NodeState createNodeState(PersistenceManager pMgr)
pMgr
- the persistence manager
public PropertyState createPropertyState(PersistenceManager pMgr, Name name)
pMgr
- the persistence managername
- the name of the new property
public boolean isNew()
true
if this bundle is new;
false
otherwise.public void markOld()
public NodeId getId()
public NodeId getParentId()
public void setParentId(NodeId parentId)
parentId
- the parent idpublic Name getNodeTypeName()
public void setNodeTypeName(Name nodeTypeName)
nodeTypeName
- the nodetype namepublic Set getMixinTypeNames()
public void setMixinTypeNames(Set mixinTypeNames)
mixinTypeNames
- the mixin type namespublic NodeDefId getNodeDefId()
public void setNodeDefId(NodeDefId nodeDefId)
nodeDefId
- the node def id.public boolean isReferenceable()
true
if this bundle is referenceable;
false
otherwise.public void setReferenceable(boolean referenceable)
referenceable
- the ref. flagpublic short getModCount()
public void setModCount(short modCount)
modCount
- the mod countpublic List getChildNodeEntries()
public void addChildNodeEntry(Name name, NodeId id)
name
- the name of the entry.id
- the id of the entrypublic void addProperty(NodePropBundle.PropertyEntry entry)
entry
- the enrty to addpublic void addProperty(PropertyState state)
state
- the property statepublic boolean hasProperty(Name name)
name
- the name of the property
true
if the property exists;
false
otherwise.public Set getPropertyNames()
public Collection getPropertyEntries()
public NodePropBundle.PropertyEntry getPropertyEntry(Name name)
name
- the name of the property entry
null
public void removeAllProperties()
public void removeProperty(Name name)
name
- the name of the propertypublic Set getSharedSet()
public void setSharedSet(Set sharedSet)
sharedSet
- shared setpublic long getSize()
public void setSize(long size)
size
- the data size
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |