Package org.nuiton.topia.persistence
Interface TopiaEntity
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
TopiaEntityContextable
- All Known Implementing Classes:
TopiaEntityAbstract
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:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(EntityVisitor visitor) Route the entity using avisitor.voidAdd listener for property writing.voidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener) Add listener for property writing.voidaddPropertyListener(PropertyChangeListener listener) Add listener for property reading.voidaddPropertyListener(String propertyName, PropertyChangeListener listener) Add listener for property reading.voidvoidaddVetoableChangeListener(String propertyName, VetoableChangeListener vetoable) voidaddVetoableListener(VetoableChangeListener vetoable) voidaddVetoableListener(String propertyName, VetoableChangeListener vetoable) Technical date creation of the entity.Unique technical Id of the entity.longTechnical property to keep versionning of the entity.voidvoidremovePropertyChangeListener(String propertyName, PropertyChangeListener listener) voidremovePropertyListener(PropertyChangeListener listener) voidremovePropertyListener(String propertyName, PropertyChangeListener listener) voidvoidremoveVetoableChangeListener(String propertyName, VetoableChangeListener vetoable) voidremoveVetoableListener(VetoableChangeListener vetoable) voidremoveVetoableListener(String propertyName, VetoableChangeListener vetoable) voidsetTopiaCreateDate(Date date) Set the technical creationdateof the entity.voidsetTopiaId(String id) Set the technicalidof the entity.voidsetTopiaVersion(long version) Set the technicalversionof the entity.
-
Field Details
-
TOPIA_ID
- See Also:
-
TOPIA_CREATE_DATE
- See Also:
-
TOPIA_VERSION
- See Also:
-
COMPOSITE
- See Also:
-
AGGREGATE
- See Also:
-
-
Method Details
-
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
Set the technicalidof the entity. Careful, use this method only for copy. The technical id is generated by ToPIA when entity is created usingTopiaDAO.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 technicalversionof 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 usingTopiaDAO.create(Object...).- Returns:
- the creation date of the entity
-
setTopiaCreateDate
Set the technical creationdateof 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
- Returns:
- all object that must be deleted if this object is deleted
- Throws:
TopiaException- if any pb
-
getAggregate
- Returns:
- all object that are aggregate with this instance, aggreate object are not removed automaticaly
- Throws:
TopiaException- if any pb
-
addPropertyChangeListener
Add listener for property writing.- Parameters:
propertyName- name of property to listenlistener- the listener to register
-
addPropertyChangeListener
Add listener for property writing.- Parameters:
listener- the listener to register
-
addVetoableChangeListener
-
addVetoableChangeListener
-
removePropertyChangeListener
-
removePropertyChangeListener
-
removeVetoableChangeListener
-
removeVetoableChangeListener
-
addPropertyListener
Add listener for property reading.- Parameters:
propertyName- the property name to listenlistener- the listener to register
-
addPropertyListener
Add listener for property reading.- Parameters:
listener- the listener to register
-
addVetoableListener
-
addVetoableListener
-
removePropertyListener
-
removePropertyListener
-
removeVetoableListener
-
removeVetoableListener
-
accept
Route the entity using avisitor.- Parameters:
visitor- to used- Throws:
TopiaException- for all type of error
-