Package org.nuiton.topia.framework
Interface TopiaContextImplementor
- All Superinterfaces:
TopiaContext
- All Known Implementing Classes:
TopiaContextImpl
Technical contract of a
TopiaContext.
Any implementation of the TopiaContext should also implements this
contract.- Version:
- $Id$
- Author:
- poussin <poussin@codelutin.com>
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Retrieve a thread-safe copy of children context set.<E extends TopiaEntity>
TopiaDAO<E>Get DAO for specified class.<E extends TopiaEntity,D extends TopiaDAO<E>>
DGet DAO for specified class.org.hibernate.Sessionorg.hibernate.SessionFactoryorg.hibernate.boot.MetadataProprietes de mapping de la base de données.org.hibernate.service.ServiceRegistryService registry bootstrap.booleanisSchemaExist(Class<?> clazz) Detect if the table is created on storage for a given persistant class.voidvoidsetUseFlushMode(boolean useFlushMode) Tells to the context if it has to use a flush mode before each query.Methods inherited from interface org.nuiton.topia.TopiaContext
add, addPropertyChangeListener, addTopiaContextListener, addTopiaEntitiesVetoable, addTopiaEntityListener, addTopiaEntityListener, addTopiaEntityVetoable, addTopiaEntityVetoable, addTopiaTransactionListener, addTopiaTransactionVetoable, backup, beginTransaction, clear, clearCache, closeContext, commitTransaction, createQuery, createSchema, execute, executeSQL, find, findAll, findByQuery, findByTopiaId, findUnique, getService, isClosed, removePropertyChangeListener, removeTopiaContextListener, removeTopiaEntitiesVetoable, removeTopiaEntityListener, removeTopiaEntityListener, removeTopiaEntityVetoable, removeTopiaEntityVetoable, removeTopiaTransactionListener, removeTopiaTransactionVetoable, replicate, replicateEntities, replicateEntity, restore, rollbackTransaction, serviceEnabled, showCreateSchema, updateSchema
-
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
- Returns:
- Returns the hibernate.
- Throws:
TopiaException- si aucune transaction n'est ouverte
-
getHibernateFactory
- 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 tofalse.- Parameters:
useFlushMode- the new value to set- Since:
- 2.5
-
isSchemaExist
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
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 entitydaoClass- the concrete dao class to use- Returns:
- the required dao
- Throws:
TopiaException- if any error
-
getFiresSupport
TopiaFiresSupport getFiresSupport() -
removeChildContext
-
getServices
Map<String,TopiaService> getServices() -
getAllServices
Deprecated.since 2.3.4 : useless method, usegetServices()instead- Returns:
- a collection of
TopiaService
-
getPersistenceClasses
-
getServices()instead