Interface TopiaPersistenceContext

All Superinterfaces:
AutoCloseable, Closeable, TopiaDaoSupplier, TopiaReplicationDestination, TopiaReplicationSupport, TopiaTransaction
All Known Implementing Classes:
AbstractTopiaPersistenceContext

This contract represents a persistence context, which lifecycle is linked to the transaction lifecycle.

It extends contracts such as :

In addition to these contracts, there is some other methods :

  • Generic entity find
  • DAO factory
  • Schema management
Since:
3.0
Author:
Arnaud Thimel (Code Lutin)
  • Method Details

    • findByTopiaId

      <E extends TopiaEntity> E findByTopiaId(String topiaId)
      Retrieve TopiaEntity using its unique topiaId.
      Type Parameters:
      E - type of entity
      Parameters:
      topiaId - unique identifier of the entity in all the application.
      Returns:
      the entity found or null
    • update

      void update(TopiaEntity entity)
      Add into this TopiaContext an entity created by another TopiaContext
      Parameters:
      entity - the entity to add
    • delete

      void delete(TopiaEntity entity)
      Delete into this TopiaContext an entity created by another TopiaContext
      Parameters:
      entity - the entity to delete
    • deleteAll

      <E extends TopiaEntity> void deleteAll(Iterable<E> entities)
      Delete into this TopiaContext an entities created by another TopiaContext
      Type Parameters:
      E - type of entity
      Parameters:
      entities - the entities to delete
    • getTopiaIdFactory

      TopiaIdFactory getTopiaIdFactory()
      Get the currently configured TopiaIdFactory.
      Returns:
      the TopiaIdFactory in use
      Since:
      3.0
      See Also:
    • isClosed

      boolean isClosed()
      Tells if the context is closed
      Returns:
      true if the context is closed, false otherwise
    • close

      void close()
      Closes the PersistenceContext. After calling close, it's impossible to make any operation on the database.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getTopiaFiresSupport

      TopiaFiresSupport getTopiaFiresSupport()
      Get the currently configured TopiaFiresSupport.
      Returns:
      the TopiaFiresSupport in use
      Since:
      3.0
      See Also: