org.silverpeas.persistence.model.identifier
Class UniqueLongIdentifier

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

@Embeddable
public class UniqueLongIdentifier
extends Object
implements EntityIdentifier

Author:
Yohann Chastagnier
See Also:
Serialized Form

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

Constructor Detail

UniqueLongIdentifier

public UniqueLongIdentifier()
Method Detail

getId

public Long getId()

setId

public UniqueLongIdentifier setId(Long 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 UniqueLongIdentifier fromString(String id)
Description copied from interface: EntityIdentifier
Sets the id value from a String.

Specified by:
fromString in interface EntityIdentifier
Returns:

generateNewId

public UniqueLongIdentifier 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.