Package org.nuiton.topia.persistence
Class TopiaId
java.lang.Object
org.nuiton.topia.persistence.TopiaId
- All Implemented Interfaces:
Serializable
TODO-fdesbois-20100508 : Need translation of javadoc.
Classe representant un Id, utilisable par JDO. Cette classe contient aussi un ensemble de methode
static utile pour la manipulation des topiaId.
TODO-tchemit-2012-08-16 Rename this class to
TopiaIds.- Version:
- $Id$
- Author:
- poussin <poussin@codelutin.com>, tchemit <tchemit@codelutin.com>, chatellier <chatellier@codelutin.com>
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.google.common.base.Function<TopiaEntity,String> Function to obtainTopiaEntity.getTopiaId()from any entity. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringCree un topiaId pour une certaine classebooleanstatic ClassgetClassName(String topiaId) Extrait la classe du topiaId.static StringgetClassNameAsString(String topiaId) Return class name id topiaId is id, and empty string if topiaId is not an id.inthashCode()static booleanVerifie si l'id passé en paramètre est bien un Id topia, c-a-d si la forme est bien classname#timemillis#random et si le classname est celui d'une classe valide, c-a-d que le systeme arrive a trouver.toString()
-
Field Details
-
GET_TOPIA_ID
Function to obtainTopiaEntity.getTopiaId()from any entity.- Since:
- 2.6.12
-
topiaId
-
-
Constructor Details
-
TopiaId
public TopiaId() -
TopiaId
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
toString
-
create
Cree un topiaId pour une certaine classe- Parameters:
clazz-- Returns:
- a generated topiaId
-
getClassName
Extrait la classe du topiaId.- Parameters:
topiaId-- Returns:
- class
- Throws:
TopiaNotFoundException
-
getClassNameAsString
Return class name id topiaId is id, and empty string if topiaId is not an id.- Parameters:
topiaId-- Returns:
- class name
-
isValidId
Verifie si l'id passé en paramètre est bien un Id topia, c-a-d si la forme est bien classname#timemillis#random et si le classname est celui d'une classe valide, c-a-d que le systeme arrive a trouver.- Parameters:
topiaId-- Returns:
- is valid topiaId
-