public class NodePropBundle extends Object
Modifier and Type | Class and Description |
---|---|
static class |
NodePropBundle.ChildNodeEntry
Helper class for a child node entry
|
static class |
NodePropBundle.PropertyEntry
Helper class for a property enrty
|
Constructor and Description |
---|
NodePropBundle(NodeId id)
Creates a "new" bundle with the given id
|
NodePropBundle(NodeState state)
Creates a bundle from the given state
|
Modifier and Type | Method and Description |
---|---|
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,
BLOBStore blobStore)
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
|
boolean |
equals(Object object) |
List<NodePropBundle.ChildNodeEntry> |
getChildNodeEntries()
Returns the list of the child node entries.
|
NodeId |
getId()
Returns the node id of this bundle
|
Set<Name> |
getMixinTypeNames()
Returns the mixin type names of this bundle.
|
short |
getModCount()
Returns the mod count.
|
Name |
getNodeTypeName()
Returns the nodetype name of this bundle
|
NodeId |
getParentId()
Returns the parent id of this bundle
|
Collection<NodePropBundle.PropertyEntry> |
getPropertyEntries()
Returns a collection of property entries.
|
NodePropBundle.PropertyEntry |
getPropertyEntry(Name name)
Returns the property entry with the given name.
|
Set<Name> |
getPropertyNames()
Returns a set of the property names.
|
Set<NodeId> |
getSharedSet()
Sets the shared set of this bundle.
|
long |
getSize()
Returns the approx.
|
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 bundle as 'not new'.
|
void |
removeAllProperties(BLOBStore blobStore)
Removes all property entries
|
void |
removeProperty(Name name,
BLOBStore blobStore)
Removes the proprty with the given name from this bundle.
|
void |
setMixinTypeNames(Set<Name> mixinTypeNames)
Sets the mixin type names
|
void |
setModCount(short modCount)
Sets the mod count
|
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<NodeId> sharedSet)
Sets the shared set.
|
void |
setSize(long size)
Sets the data size of this bundle
|
String |
toString() |
void |
update(NodeState state)
Updates this bundle with values from the given state.
|
public NodePropBundle(NodeId id)
id
- the node idpublic NodePropBundle(NodeState state)
state
- the node statepublic void update(NodeState state)
state
- the node statepublic NodeState createNodeState(PersistenceManager pMgr)
pMgr
- the persistence managerpublic 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<Name> getMixinTypeNames()
public void setMixinTypeNames(Set<Name> mixinTypeNames)
mixinTypeNames
- the mixin type namespublic 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<NodePropBundle.ChildNodeEntry> 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, BLOBStore blobStore)
state
- the property stateblobStore
- BLOB store from where to delete previous property valuepublic boolean hasProperty(Name name)
name
- the name of the propertytrue
if the property exists;
false
otherwise.public Set<Name> getPropertyNames()
public Collection<NodePropBundle.PropertyEntry> getPropertyEntries()
public NodePropBundle.PropertyEntry getPropertyEntry(Name name)
name
- the name of the property entrynull
public void removeAllProperties(BLOBStore blobStore)
blobStore
- BLOB store from where to delete property valuespublic void removeProperty(Name name, BLOBStore blobStore)
name
- the name of the propertyblobStore
- BLOB store from where to delete the property valuepublic Set<NodeId> getSharedSet()
public void setSharedSet(Set<NodeId> sharedSet)
sharedSet
- shared setpublic long getSize()
public void setSize(long size)
size
- the data sizeCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.