Package org.apache.jackrabbit.core.id
Class PropertyId
- java.lang.Object
-
- org.apache.jackrabbit.core.id.PropertyId
-
- All Implemented Interfaces:
Serializable,ItemId
public class PropertyId extends Object implements ItemId
Property identifier. An instance of this class identifies a single property using the UUID of the parent node and the name of the property. Once created a property identifier instance is immutable.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PropertyId(NodeId parentId, Name propName)Creates a property identifier instance for the identified property.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandenotesNode()Returnsfalseas this class represents a property identifier, not a node identifier.booleanequals(Object obj)NamegetName()Returns theNameof the property.NodeIdgetParentId()Returns the identifier of the parent node.inthashCode()Returns the hash code of this property identifier.StringtoString()Returns the same asthis.getParentId() + "/" + this.getName()static PropertyIdvalueOf(String s)Returns a property identifier instance holding the value of the specified string.
-
-
-
Method Detail
-
denotesNode
public boolean denotesNode()
Returnsfalseas this class represents a property identifier, not a node identifier.- Specified by:
denotesNodein interfaceItemId- Returns:
- always
false - See Also:
ItemId.denotesNode()
-
getParentId
public NodeId getParentId()
Returns the identifier of the parent node.- Returns:
- id of parent node
-
getName
public Name getName()
Returns theNameof the property.- Returns:
Nameof the property.
-
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 thetoString()method of this class.- Parameters:
s- aStringcontaining thePropertyIdrepresentation to be parsed.- Returns:
- the
PropertyIdrepresented by the argument - Throws:
IllegalArgumentException- if the specified string can not be parsed as aPropertyId.- See Also:
toString()
-
toString
public String toString()
Returns the same asthis.getParentId() + "/" + this.getName()
-
-