Package org.nuiton.topia.persistence
Interface TopiaEntityContextable
- All Superinterfaces:
Serializable,TopiaEntity
TopiaEntity with TopiaDaoSupplier support (injected by
AbstractTopiaDao into entities).
WARNING, it is not recommended to use this mechanism as it breaks the POJO's Hibernate approach.- Author:
- chatellier
-
Field Summary
FieldsFields inherited from interface org.nuiton.topia.persistence.TopiaEntity
AGGREGATE, COMPOSITE, PROPERTY_TOPIA_CREATE_DATE, PROPERTY_TOPIA_ID, PROPERTY_TOPIA_VERSION, TOPIA_CREATE_DATE, TOPIA_ID, TOPIA_VERSION -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Delete entity in persistence context.Deprecated.from 3.0, method will be moved to entity's generated Dao (cf http://nuiton.org/issues/2776)Deprecated.from 3.0, method will be moved to entity's generated Dao(cf http://nuiton.org/issues/2776)TopiaDao<?>voidsetTopiaDaoSupplier(TopiaDaoSupplier topiaDaoSupplier) Injects into this entity the givenTopiaDaoSupplier, which can be used to get any Dao instance.voidupdate()Update entity in persistence context.Methods inherited from interface org.nuiton.topia.persistence.TopiaEntity
accept, getTopiaCreateDate, getTopiaId, getTopiaVersion, isDeleted, isPersisted, notifyDeleted, setTopiaCreateDate, setTopiaId, setTopiaVersion
-
Field Details
-
PROPERTY_COMPOSITE
- Since:
- 3.0
- See Also:
-
PROPERTY_AGGREGATE
- Since:
- 3.0
- See Also:
-
PROPERTY_TOPIA_DAO_SUPPLIER
- Since:
- 3.0
- See Also:
-
-
Method Details
-
update
void update()Update entity in persistence context. -
delete
void delete()Delete entity in persistence context. -
setTopiaDaoSupplier
Injects into this entity the givenTopiaDaoSupplier, which can be used to get any Dao instance. This is used to makeupdate()anddelete()implementation possible.- Parameters:
topiaDaoSupplier- an initializedTopiaDaoSupplierinstance
-
getTopiaDaoSupplier
TopiaDaoSupplier getTopiaDaoSupplier()- Returns:
- the currently injected
TopiaDaoSupplier
-
getGenericEntityDao
TopiaDao<?> getGenericEntityDao()- Returns:
- the TopiaDao managing the current entity. It may be null if the current entity isn't managed by ToPIA.
- Since:
- 3.0
-
getComposite
Deprecated.from 3.0, method will be moved to entity's generated Dao(cf http://nuiton.org/issues/2776)- Returns:
- all objects that must be deleted if this object is deleted
-
getAggregate
Deprecated.from 3.0, method will be moved to entity's generated Dao (cf http://nuiton.org/issues/2776)- Returns:
- all objects that are aggregate with this instance, aggregate object are not removed automatically
-