Interface TopiaEntity

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
TopiaEntityContextable
All Known Implementing Classes:
TopiaEntityAbstract

public interface TopiaEntity
extends java.io.Serializable
The TopiaEntity is the main interface for each entities generated with TopiaMetaTransformer. An entity is simply a persistent bean mapped with hibernate. The manipulation on entities (create, update, delete, find) is made by the dao associated. The corresponding dao interface is TopiaDAO. Setter methods have to be used only in internal. They are in the interface to make easier their usages in internal.
Version:
$Id$
Author:
poussin <poussin@codelutin.com>, fdesbois <fdesbois@codelutin.com>
See Also:
EntityHibernateMappingGenerator, EntityTransformer
  • Field Details

  • Method Details

    • getTopiaId

      java.lang.String getTopiaId()
      Unique technical Id of the entity. This id contains the full qualified name of the entity interface. This id has also an index and his used to identify uniquely the entity in the database.
      Returns:
      the technical Id of the entity
    • setTopiaId

      void setTopiaId​(java.lang.String id)
      Set the technical id of the entity. Careful, use this method only for copy. The technical id is generated by ToPIA when entity is created using TopiaDAO.create(Object...).
      Parameters:
      id - technical id to set
    • getTopiaVersion

      long getTopiaVersion()
      Technical property to keep versionning of the entity. The version is incremented on each change of the entity.
      Returns:
      the current version of the entity
    • setTopiaVersion

      void setTopiaVersion​(long version)
      Set the technical version of the entity. Careful, use this method only for copy. The version is automatically incremented on entity changes.
      Parameters:
      version - technical version to set
    • getTopiaCreateDate

      java.util.Date getTopiaCreateDate()
      Technical date creation of the entity. This date doesn't change through time and was initialized on entity creation when using TopiaDAO.create(Object...).
      Returns:
      the creation date of the entity
    • setTopiaCreateDate

      void setTopiaCreateDate​(java.util.Date date)
      Set the technical creation date of the entity. Careful, use this method only for copy. This date is immutable and was created on entity creation.
      Parameters:
      date - technical create date to set
    • getComposite

      java.util.List<TopiaEntity> getComposite() throws TopiaException
      Returns:
      all object that must be deleted if this object is deleted
      Throws:
      TopiaException - if any pb
    • getAggregate

      java.util.List<TopiaEntity> getAggregate() throws TopiaException
      Returns:
      all object that are aggregate with this instance, aggreate object are not removed automaticaly
      Throws:
      TopiaException - if any pb
    • addPropertyChangeListener

      void addPropertyChangeListener​(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
      Add listener for property writing.
      Parameters:
      propertyName - name of property to listen
      listener - the listener to register
    • addPropertyChangeListener

      void addPropertyChangeListener​(java.beans.PropertyChangeListener listener)
      Add listener for property writing.
      Parameters:
      listener - the listener to register
    • addVetoableChangeListener

      void addVetoableChangeListener​(java.lang.String propertyName, java.beans.VetoableChangeListener vetoable)
    • addVetoableChangeListener

      void addVetoableChangeListener​(java.beans.VetoableChangeListener vetoable)
    • removePropertyChangeListener

      void removePropertyChangeListener​(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
    • removePropertyChangeListener

      void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)
    • removeVetoableChangeListener

      void removeVetoableChangeListener​(java.lang.String propertyName, java.beans.VetoableChangeListener vetoable)
    • removeVetoableChangeListener

      void removeVetoableChangeListener​(java.beans.VetoableChangeListener vetoable)
    • addPropertyListener

      void addPropertyListener​(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
      Add listener for property reading.
      Parameters:
      propertyName - the property name to listen
      listener - the listener to register
    • addPropertyListener

      void addPropertyListener​(java.beans.PropertyChangeListener listener)
      Add listener for property reading.
      Parameters:
      listener - the listener to register
    • addVetoableListener

      void addVetoableListener​(java.lang.String propertyName, java.beans.VetoableChangeListener vetoable)
    • addVetoableListener

      void addVetoableListener​(java.beans.VetoableChangeListener vetoable)
    • removePropertyListener

      void removePropertyListener​(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
    • removePropertyListener

      void removePropertyListener​(java.beans.PropertyChangeListener listener)
    • removeVetoableListener

      void removeVetoableListener​(java.lang.String propertyName, java.beans.VetoableChangeListener vetoable)
    • removeVetoableListener

      void removeVetoableListener​(java.beans.VetoableChangeListener vetoable)
    • accept

      void accept​(EntityVisitor visitor) throws TopiaException
      Route the entity using a visitor.
      Parameters:
      visitor - to used
      Throws:
      TopiaException - for all type of error