info.magnolia.imaging.parameters
Class SimpleEqualityNodeDataWrapper

java.lang.Object
  extended by info.magnolia.cms.util.NodeDataWrapper
      extended by info.magnolia.imaging.parameters.SimpleEqualityNodeDataWrapper
All Implemented Interfaces:
info.magnolia.cms.core.NodeData, Cloneable

public class SimpleEqualityNodeDataWrapper
extends info.magnolia.cms.util.NodeDataWrapper

A NodeDataWrapper which simply defines equals() and hashCode() methods based on the property's path and HierarchyManager name. It also caches the handle of the node, so that equals() and hashCode() can be used even if the node's JCR session was terminated.

Version:
$Id$

Field Summary
 
Fields inherited from interface info.magnolia.cms.core.NodeData
MULTIVALUE_FALSE, MULTIVALUE_TRUE, MULTIVALUE_UNDEFINED
 
Constructor Summary
SimpleEqualityNodeDataWrapper(info.magnolia.cms.core.NodeData nodeData)
           
 
Method Summary
 boolean equals(Object o)
           
 String getHandle()
           
 int hashCode()
           
 
Methods inherited from class info.magnolia.cms.util.NodeDataWrapper
delete, getAttribute, getAttributeNames, getBoolean, getContentLength, getDate, getDouble, getHierarchyManager, getJCRProperty, getLong, getName, getParent, getReferencedContent, getReferencedContent, getStream, getString, getString, getType, getValue, getValues, getWrappedNodeData, isExist, isGranted, isMultiValue, refresh, save, setAttribute, setAttribute, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setWrappedNodeData, toString, wrap
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleEqualityNodeDataWrapper

public SimpleEqualityNodeDataWrapper(info.magnolia.cms.core.NodeData nodeData)
Method Detail

getHandle

public String getHandle()
Specified by:
getHandle in interface info.magnolia.cms.core.NodeData
Overrides:
getHandle in class info.magnolia.cms.util.NodeDataWrapper

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.