org.jboss.dna.jcr.cache
Class NewNodeInfo
java.lang.Object
org.jboss.dna.jcr.cache.ChangedNodeInfo
org.jboss.dna.jcr.cache.NewNodeInfo
- All Implemented Interfaces:
- NodeInfo
public class NewNodeInfo
- extends ChangedNodeInfo
Method Summary |
boolean |
isModified()
Indicates whether the node represented by this NodeInfo is modified (i.e., exists in the persistent repository with
different child items).
Always returns false, since a new node is not persisted yet. |
boolean |
isNew()
Indicates whether the node represented by this NodeInfo is new (i.e., does not yet exist in the persistent
repository).
Always returns true. |
Methods inherited from class org.jboss.dna.jcr.cache.ChangedNodeInfo |
addChild, addChild, addPeer, getChildren, getDefinitionId, getMixinTypeNames, getOriginal, getOriginalLocation, getParent, getPeers, getPrimaryTypeName, getProperty, getPropertyCount, getPropertyNames, getSingleMultiPropertyNames, getUuid, getUuidsForRemovedChildren, hasProperties, removeChild, removeProperty, removeSingleMultiProperty, setDefinitionId, setParent, setProperty, setSingleMultiProperty |
NewNodeInfo
public NewNodeInfo(Location originalLocation,
Name primaryTypeName,
NodeDefinitionId definition,
UUID parent,
Map<Name,PropertyInfo> properties)
- Create an immutable NodeInfo instance.
- Parameters:
originalLocation
- the original locationprimaryTypeName
- the name of the node's primary typedefinition
- the definition used when creating the nodeparent
- the parentproperties
- the unmodifiable map of properties; may be null if there are no properties
isNew
public boolean isNew()
- Indicates whether the node represented by this
NodeInfo
is new (i.e., does not yet exist in the persistent
repository).
Always returns true.
- Specified by:
isNew
in interface NodeInfo
- Overrides:
isNew
in class ChangedNodeInfo
- Returns:
true
if the node represented by this NodeInfo
has not yet been saved to the persistent repository.- See Also:
ChangedNodeInfo.isNew()
isModified
public boolean isModified()
- Indicates whether the node represented by this
NodeInfo
is modified (i.e., exists in the persistent repository with
different child items).
Always returns false, since a new node is not persisted yet.
- Specified by:
isModified
in interface NodeInfo
- Overrides:
isModified
in class ChangedNodeInfo
- Returns:
true
if the immediate child items of the node represented by this NodeInfo
have been modified since
the last time the node was saved to the persistent repository- See Also:
ChangedNodeInfo.isModified()
Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.