org.nuiton.topia.persistence
Class TopiaId

java.lang.Object
  extended by org.nuiton.topia.persistence.TopiaId
All Implemented Interfaces:
Serializable

public class TopiaId
extends Object
implements 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

Version:
$Id: TopiaId.java 2142 2010-11-18 16:17:42Z tchemit $
Author:
poussin , tchemit , chatellier
See Also:
Serialized Form

Field Summary
 String topiaId
           
 
Constructor Summary
TopiaId()
           
TopiaId(String topiaId)
           
 
Method Summary
static String create(Class clazz)
          Cree un topiaId pour une certaine classe
 boolean equals(Object o)
           
static Class getClassName(String topiaId)
          Extrait la classe du topiaId.
static String getClassNameAsString(String topiaId)
          Return class name id topiaId is id, and empty string if topiaId is not an id.
 int hashCode()
           
static boolean isValidId(String topiaId)
          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.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

topiaId

public String topiaId
Constructor Detail

TopiaId

public TopiaId()

TopiaId

public TopiaId(String topiaId)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

toString

public String toString()
Overrides:
toString in class Object

create

public static String create(Class clazz)
Cree un topiaId pour une certaine classe

Parameters:
clazz -
Returns:
a generated topiaId

getClassName

public static Class getClassName(String topiaId)
                          throws TopiaNotFoundException
Extrait la classe du topiaId.

Parameters:
topiaId -
Returns:
class
Throws:
TopiaNotFoundException

getClassNameAsString

public static String getClassNameAsString(String topiaId)
Return class name id topiaId is id, and empty string if topiaId is not an id.

Parameters:
topiaId -
Returns:
class name

isValidId

public static boolean isValidId(String topiaId)
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


Copyright © 2004-2010 CodeLutin. All Rights Reserved.