org.jboss.dna.jcr.cache
Class NewNodeInfo

java.lang.Object
  extended by org.jboss.dna.jcr.cache.ChangedNodeInfo
      extended by org.jboss.dna.jcr.cache.NewNodeInfo
All Implemented Interfaces:
NodeInfo

public class NewNodeInfo
extends ChangedNodeInfo


Constructor Summary
NewNodeInfo(Location originalLocation, Name primaryTypeName, NodeDefinitionId definition, UUID parent, Map<Name,PropertyInfo> properties)
          Create an immutable NodeInfo instance.
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewNodeInfo

public NewNodeInfo(Location originalLocation,
                   Name primaryTypeName,
                   NodeDefinitionId definition,
                   UUID parent,
                   Map<Name,PropertyInfo> properties)
Create an immutable NodeInfo instance.

Parameters:
originalLocation - the original location
primaryTypeName - the name of the node's primary type
definition - the definition used when creating the node
parent - the parent
properties - the unmodifiable map of properties; may be null if there are no properties
Method Detail

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.