Interface TopiaEntityContextable

All Superinterfaces:
Serializable, TopiaEntity

public interface TopiaEntityContextable extends 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 Details

  • Method Details

    • update

      void update()
      Update entity in persistence context.
    • delete

      void delete()
      Delete entity in persistence context.
    • setTopiaDaoSupplier

      void setTopiaDaoSupplier(TopiaDaoSupplier topiaDaoSupplier)
      Injects into this entity the given TopiaDaoSupplier, which can be used to get any Dao instance. This is used to make update() and delete() implementation possible.
      Parameters:
      topiaDaoSupplier - an initialized TopiaDaoSupplier instance
    • 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 List<TopiaEntity> 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 List<TopiaEntity> 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