Class TopiaId

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

public class TopiaId
extends java.lang.Object
implements java.io.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:
Serialized Form
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static com.google.common.base.Function<TopiaEntity,​java.lang.String> GET_TOPIA_ID
    Function to obtain TopiaEntity.getTopiaId() from any entity.
    java.lang.String topiaId  
  • Constructor Summary

    Constructors 
    Constructor Description
    TopiaId()  
    TopiaId​(java.lang.String topiaId)  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String create​(java.lang.Class clazz)
    Cree un topiaId pour une certaine classe
    boolean equals​(java.lang.Object o)  
    static java.lang.Class getClassName​(java.lang.String topiaId)
    Extrait la classe du topiaId.
    static java.lang.String getClassNameAsString​(java.lang.String topiaId)
    Return class name id topiaId is id, and empty string if topiaId is not an id.
    int hashCode()  
    static boolean isValidId​(java.lang.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.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • TopiaId

      public TopiaId()
    • TopiaId

      public TopiaId​(java.lang.String topiaId)
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • create

      public static java.lang.String create​(java.lang.Class clazz)
      Cree un topiaId pour une certaine classe
      Parameters:
      clazz -
      Returns:
      a generated topiaId
    • getClassName

      public static java.lang.Class getClassName​(java.lang.String topiaId) throws TopiaNotFoundException
      Extrait la classe du topiaId.
      Parameters:
      topiaId -
      Returns:
      class
      Throws:
      TopiaNotFoundException
    • getClassNameAsString

      public static java.lang.String getClassNameAsString​(java.lang.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​(java.lang.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