org.silverpeas.persistence.model.identifier
Class UuidIdentifier

java.lang.Object
  extended by org.silverpeas.persistence.model.identifier.UuidIdentifier
All Implemented Interfaces:
Serializable, EntityIdentifier

@Embeddable
public class UuidIdentifier
extends Object
implements EntityIdentifier

Author:
Yohann Chastagnier
See Also:
Serialized Form

Constructor Summary
UuidIdentifier()
           
 
Method Summary
 String asString()
          Gets the id value as a String.
 boolean equals(Object obj)
           
 UuidIdentifier fromString(String id)
          Sets the id value from a String.
 UuidIdentifier generateNewId(String tableName, String tableColumnIdName)
          Generate a new ID.
 String getId()
           
 int hashCode()
           
 void setId(String id)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UuidIdentifier

public UuidIdentifier()
Method Detail

getId

public String getId()

setId

public void setId(String id)

asString

public String asString()
Description copied from interface: EntityIdentifier
Gets the id value as a String.

Specified by:
asString in interface EntityIdentifier
Returns:

fromString

public UuidIdentifier fromString(String id)
Description copied from interface: EntityIdentifier
Sets the id value from a String.

Specified by:
fromString in interface EntityIdentifier
Returns:

generateNewId

public UuidIdentifier generateNewId(String tableName,
                                    String tableColumnIdName)
Description copied from interface: EntityIdentifier
Generate a new ID. "Auto-Increment" identifiers must to implement this method.

Specified by:
generateNewId in interface EntityIdentifier

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2016 Silverpeas. All Rights Reserved.