org.apache.jackrabbit.core.data
Class DataIdentifier

java.lang.Object
  extended by org.apache.jackrabbit.core.data.DataIdentifier
All Implemented Interfaces:
Serializable

public final class DataIdentifier
extends Object
implements Serializable

Opaque data identifier used to identify records in a data store. All identifiers must be serializable and implement the standard object equality and hash code methods.

See Also:
Serialized Form

Constructor Summary
DataIdentifier(byte[] identifier)
          Creates a data identifier from the hexadecimal string representation of the given bytes.
DataIdentifier(String identifier)
          Creates a data identifier from the given string.
 
Method Summary
 boolean equals(Object object)
          Checks if the given object is a data identifier and has the same string representation as this one.
 int hashCode()
          Returns the hash code of the identifier string.
 String toString()
          Returns the identifier string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataIdentifier

public DataIdentifier(String identifier)
Creates a data identifier from the given string.

Parameters:
identifier - data identifier

DataIdentifier

public DataIdentifier(byte[] identifier)
Creates a data identifier from the hexadecimal string representation of the given bytes.

Parameters:
identifier - data identifier
Method Detail

toString

public String toString()
Returns the identifier string.

Overrides:
toString in class Object
Returns:
identifier string

equals

public boolean equals(Object object)
Checks if the given object is a data identifier and has the same string representation as this one.

Overrides:
equals in class Object
Parameters:
object - other object
Returns:
true if the given object is the same identifier, false otherwise

hashCode

public int hashCode()
Returns the hash code of the identifier string.

Overrides:
hashCode in class Object
Returns:
hash code


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