org.jboss.dna.connector.store.jpa.model.basic
Class LargeValueId

java.lang.Object
  extended by org.jboss.dna.connector.store.jpa.model.basic.LargeValueId
All Implemented Interfaces:
Serializable

@Immutable
public class LargeValueId
extends Object
implements Serializable

A unique identifer for a large value, which is the 160-bit SHA-1 hash of this value, in hex form (40-bytes). The SHA-1 algorithm is fast and has not yet proven to have any duplicates. Even if SHA-2 and SHA-3 are better for cryptographically secure purposes, it is doubtful whether a repository needs more than SHA-1 for identity purposes.

See Also:
Serialized Form

Constructor Summary
LargeValueId()
           
LargeValueId(String hash)
           
 
Method Summary
 boolean equals(Object obj)
          
 String getHash()
           
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LargeValueId

public LargeValueId()

LargeValueId

public LargeValueId(String hash)
Method Detail

getHash

public String getHash()
Returns:
hash

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2008-2009 JBoss, a division of Red Hat. All Rights Reserved.