org.silverpeas.persistence.model
Interface EntityIdentifier

All Superinterfaces:
Serializable
All Known Implementing Classes:
UniqueLongIdentifier, UuidIdentifier

public interface EntityIdentifier
extends Serializable

All Silverpeas entities must use this interface for their identifier. By this way, all entities have a typed identifier that only the entity knows.

Author:
Yohann Chastagnier

Method Summary
 String asString()
          Gets the id value as a String.
 EntityIdentifier fromString(String id)
          Sets the id value from a String.
 EntityIdentifier generateNewId(String tableName, String tableColumnIdName)
          Generate a new ID.
 

Method Detail

asString

String asString()
Gets the id value as a String.

Returns:

fromString

EntityIdentifier fromString(String id)
Sets the id value from a String.

Returns:

generateNewId

EntityIdentifier generateNewId(String tableName,
                               String tableColumnIdName)
Generate a new ID. "Auto-Increment" identifiers must to implement this method.

Parameters:
tableName -
tableColumnIdName -


Copyright © 2016 Silverpeas. All Rights Reserved.