Class UniqueLongIdentifier
- java.lang.Object
-
- org.silverpeas.core.persistence.datasource.model.identifier.UniqueLongIdentifier
-
- All Implemented Interfaces:
Serializable
,Comparable<EntityIdentifier>
,EntityIdentifier
,ResourceIdentifier
@Embeddable public class UniqueLongIdentifier extends Object implements EntityIdentifier
- Author:
- Yohann Chastagnier
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UniqueLongIdentifier()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
asString()
Gets the value of this identifier as a String.boolean
equals(Object obj)
static UniqueLongIdentifier
from(long value)
static UniqueLongIdentifier
from(String value)
static List<UniqueLongIdentifier>
fromLongs(Collection<Long> values)
UniqueLongIdentifier
fromString(String id)
Sets the identifier's value from its given String representation.UniqueLongIdentifier
generateNewId(String... parameters)
Generates a new numeric identifier encoded in 64 bits.Long
getId()
int
hashCode()
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.persistence.datasource.model.EntityIdentifier
compareTo
-
-
-
-
Method Detail
-
from
public static UniqueLongIdentifier from(String value)
-
from
public static UniqueLongIdentifier from(long value)
-
fromLongs
public static List<UniqueLongIdentifier> fromLongs(Collection<Long> values)
-
getId
public Long getId()
-
asString
public String asString()
Description copied from interface:ResourceIdentifier
Gets the value of this identifier as a String.- Specified by:
asString
in interfaceResourceIdentifier
- Returns:
- the String representation of this identifier.
-
fromString
public UniqueLongIdentifier fromString(String id)
Description copied from interface:EntityIdentifier
Sets the identifier's value from its given String representation.- Specified by:
fromString
in interfaceEntityIdentifier
- Parameters:
id
- the encoded value of the identifier.- Returns:
- the identifier decoded from the specified String representation.
-
generateNewId
public UniqueLongIdentifier generateNewId(String... parameters)
Generates a new numeric identifier encoded in 64 bits.- Specified by:
generateNewId
in interfaceEntityIdentifier
- Parameters:
parameters
- the name of the SQL table in which are stored the entities and the name of the SQL column in the SQL table that stores the identifier values.- Returns:
- a new numeric identifier encoded in 64 bits.
-
-