Interface TopiaContextImplementor

All Superinterfaces:
TopiaContext
All Known Implementing Classes:
TopiaContextImpl

public interface TopiaContextImplementor extends TopiaContext
Technical contract of a TopiaContext. Any implementation of the TopiaContext should also implements this contract.
Version:
$Id$
Author:
poussin <poussin@codelutin.com>
  • Method Details

    • getChildContext

      Set<TopiaContextImplementor> getChildContext()
      Retrieve a thread-safe copy of children context set.
      Returns:
      Returns the childContext.
    • getParentContext

      TopiaContextImplementor getParentContext()
      Returns:
      Returns the parentContext.
    • getRootContext

      TopiaContextImplementor getRootContext()
    • getConfig

      Properties getConfig()
      Returns:
      Returns the config.
    • getServiceRegistry

      org.hibernate.service.ServiceRegistry getServiceRegistry()
      Service registry bootstrap.
    • getMetadata

      org.hibernate.boot.Metadata getMetadata()
      Proprietes de mapping de la base de données.
    • getHibernate

      org.hibernate.Session getHibernate() throws TopiaException
      Returns:
      Returns the hibernate.
      Throws:
      TopiaException - si aucune transaction n'est ouverte
    • getHibernateFactory

      org.hibernate.SessionFactory getHibernateFactory() throws TopiaNotFoundException
      Returns:
      Returns the hibernateFactory.
      Throws:
      TopiaNotFoundException
    • setUseFlushMode

      void setUseFlushMode(boolean useFlushMode)
      Tells to the context if it has to use a flush mode before each query. By default, we use a flush mode, but in some case it costs to much doing this, that's why you can desactivate it setting the value to false.
      Parameters:
      useFlushMode - the new value to set
      Since:
      2.5
    • isSchemaExist

      boolean isSchemaExist(Class<?> clazz) throws TopiaException
      Detect if the table is created on storage for a given persistant class.
      Parameters:
      clazz - the researched class
      Returns:
      Returns the hibernate.
      Throws:
      TopiaException - si aucune transaction n'est ouverte
    • getDAO

      <E extends TopiaEntity> TopiaDAO<E> getDAO(Class<E> entityClass) throws TopiaException
      Get DAO for specified class. If Specialized DAO exists then it returned otherwize TopiaDAO<entityClass> is returned
      Type Parameters:
      E - type of entity
      Parameters:
      entityClass - type of entity
      Returns:
      the required dao
      Throws:
      TopiaException - if any error
    • getDAO

      <E extends TopiaEntity, D extends TopiaDAO<E>> D getDAO(Class<E> entityClass, Class<D> daoClass) throws TopiaException
      Get DAO for specified class. If Specialized DAO exists then it returned otherwize TopiaDAO<entityClass> is returned
      Type Parameters:
      E - type of entity
      Parameters:
      entityClass - type of entity
      daoClass - the concrete dao class to use
      Returns:
      the required dao
      Throws:
      TopiaException - if any error
    • getFiresSupport

      TopiaFiresSupport getFiresSupport()
    • removeChildContext

      void removeChildContext(TopiaContextImplementor child)
    • getServices

      Map<String,TopiaService> getServices()
    • getAllServices

      Deprecated.
      since 2.3.4 : useless method, use getServices() instead
      Returns:
      a collection of TopiaService
    • getPersistenceClasses

      List<Class<?>> getPersistenceClasses()