org.nuiton.topia.persistence
Interface TopiaEntity

All Superinterfaces:
Serializable
All Known Implementing Classes:
TopiaEntityAbstract

public interface TopiaEntity
extends 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: TopiaEntity.java 2142 2010-11-18 16:17:42Z tchemit $
Author:
poussin , fdesbois
See Also:
EntityHibernateMappingGenerator, EntityTransformer

Field Summary
static String TOPIA_CREATE_DATE
           
static String TOPIA_ID
           
static String TOPIA_VERSION
           
 
Method Summary
 void accept(EntityVisitor visitor)
          Route the entity using a visitor.
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add listener for property writing.
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Add listener for property writing.
 void addPropertyListener(PropertyChangeListener listener)
          Add listener for property reading.
 void addPropertyListener(String propertyName, PropertyChangeListener listener)
          Add listener for property reading.
 void addVetoableChangeListener(String propertyName, VetoableChangeListener vetoable)
           
 void addVetoableChangeListener(VetoableChangeListener vetoable)
           
 void addVetoableListener(String propertyName, VetoableChangeListener vetoable)
           
 void addVetoableListener(VetoableChangeListener vetoable)
           
 List<TopiaEntity> getAggregate()
           
 List<TopiaEntity> getComposite()
           
 Date getTopiaCreateDate()
          Technical date creation of the entity.
 String getTopiaId()
          Unique technical Id of the entity.
 long getTopiaVersion()
          Technical property to keep versionning of the entity.
 void removePropertyChangeListener(PropertyChangeListener listener)
           
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
           
 void removePropertyListener(PropertyChangeListener listener)
           
 void removePropertyListener(String propertyName, PropertyChangeListener listener)
           
 void removeVetoableChangeListener(String propertyName, VetoableChangeListener vetoable)
           
 void removeVetoableChangeListener(VetoableChangeListener vetoable)
           
 void removeVetoableListener(String propertyName, VetoableChangeListener vetoable)
           
 void removeVetoableListener(VetoableChangeListener vetoable)
           
 void setTopiaCreateDate(Date date)
          Set the technical creation date of the entity.
 void setTopiaId(String id)
          Set the technical id of the entity.
 void setTopiaVersion(long version)
          Set the technical version of the entity.
 

Field Detail

TOPIA_ID

static final String TOPIA_ID
See Also:
Constant Field Values

TOPIA_CREATE_DATE

static final String TOPIA_CREATE_DATE
See Also:
Constant Field Values

TOPIA_VERSION

static final String TOPIA_VERSION
See Also:
Constant Field Values
Method Detail

getTopiaId

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(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

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(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

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

getAggregate

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(String propertyName,
                               PropertyChangeListener listener)
Add listener for property writing.

Parameters:
propertyName - name of property to listen
listener - the listener to register

addPropertyChangeListener

void addPropertyChangeListener(PropertyChangeListener listener)
Add listener for property writing.

Parameters:
listener - the listener to register

addVetoableChangeListener

void addVetoableChangeListener(String propertyName,
                               VetoableChangeListener vetoable)

addVetoableChangeListener

void addVetoableChangeListener(VetoableChangeListener vetoable)

removePropertyChangeListener

void removePropertyChangeListener(String propertyName,
                                  PropertyChangeListener listener)

removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener listener)

removeVetoableChangeListener

void removeVetoableChangeListener(String propertyName,
                                  VetoableChangeListener vetoable)

removeVetoableChangeListener

void removeVetoableChangeListener(VetoableChangeListener vetoable)

addPropertyListener

void addPropertyListener(String propertyName,
                         PropertyChangeListener listener)
Add listener for property reading.

Parameters:
propertyName - the property name to listen
listener - the listener to register

addPropertyListener

void addPropertyListener(PropertyChangeListener listener)
Add listener for property reading.

Parameters:
listener - the listener to register

addVetoableListener

void addVetoableListener(String propertyName,
                         VetoableChangeListener vetoable)

addVetoableListener

void addVetoableListener(VetoableChangeListener vetoable)

removePropertyListener

void removePropertyListener(String propertyName,
                            PropertyChangeListener listener)

removePropertyListener

void removePropertyListener(PropertyChangeListener listener)

removeVetoableListener

void removeVetoableListener(String propertyName,
                            VetoableChangeListener vetoable)

removeVetoableListener

void removeVetoableListener(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


Copyright © 2004-2010 CodeLutin. All Rights Reserved.