org.apache.jackrabbit.core
Class PropertyId

java.lang.Object
  extended byorg.apache.jackrabbit.core.ItemId
      extended byorg.apache.jackrabbit.core.PropertyId
All Implemented Interfaces:
Serializable

public class PropertyId
extends ItemId

Property identifier. An instance of this class identifies a single property using the UUID of the parent node and the qualified name of the property. Once created a property identifier instance is immutable.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.jackrabbit.core.ItemId
hash
 
Constructor Summary
PropertyId(String parentUUID, QName propName)
          Creates a property identifier instance for the identified property.
 
Method Summary
 boolean denotesNode()
          Returns false as this class represents a property identifier, not a node identifier.
 boolean equals(Object obj)
          Compares property identifiers for equality.
 QName getName()
          Returns the qualified name of the property.
 String getParentUUID()
          Returns the UUID of the parent node.
 int hashCode()
          Returns the hash code of this property identifier.
 String toString()
          Returns a string representation of this property identifier.
static PropertyId valueOf(String s)
          Returns a property identifier instance holding the value of the specified string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyId

public PropertyId(String parentUUID,
                  QName propName)
Creates a property identifier instance for the identified property.

Parameters:
parentUUID - UUID of the parent node
propName - qualified name of the property
Method Detail

denotesNode

public boolean denotesNode()
Returns false as this class represents a property identifier, not a node identifier.

Specified by:
denotesNode in class ItemId
Returns:
always false
See Also:
ItemId.denotesNode()

getParentUUID

public String getParentUUID()
Returns the UUID of the parent node.

Returns:
node UUID

getName

public QName getName()
Returns the qualified name of the property.

Returns:
qualified name

valueOf

public static PropertyId valueOf(String s)
                          throws IllegalArgumentException
Returns a property identifier instance holding the value of the specified string. The string must be in the format returned by the toString() method of this class.

Parameters:
s - a String containing the PropertyId representation to be parsed.
Returns:
the PropertyId represented by the argument
Throws:
IllegalArgumentException - if the specified string can not be parsed as a PropertyId.
See Also:
toString()

equals

public boolean equals(Object obj)
Compares property identifiers for equality.

Parameters:
obj - other object
Returns:
true if the given object is a property identifier instance that identifies the same property as this identifier, false otherwise
See Also:
Object.equals(Object)

toString

public String toString()
Returns a string representation of this property identifier.

Returns:
property identifier string
See Also:
Object.toString()

hashCode

public int hashCode()
Returns the hash code of this property identifier. The hash code is computed from the parent node UUID and the property name. The hash code is memorized for performance.

Returns:
hash code
See Also:
Object.hashCode()


Copyright © 2004-2005 The Apache Software Foundation. All Rights Reserved.