Package org.nuiton.topia.persistence
Class TopiaDAOLegacy<E extends TopiaEntity>
java.lang.Object
org.nuiton.topia.persistence.TopiaDAOImpl<E>
org.nuiton.topia.persistence.TopiaDAOLegacy<E>
- Type Parameters:
E- le type de l'entite
- All Implemented Interfaces:
Iterable<E>,TopiaDAO<E>,TopiaDAODeprecated<E>
Deprecated.
since 2.6.12 Using the hibernate Criteria api is not a good idea as we wants to use in ToPIA next generation (version 3.0) jpa api.
Surcharge du
TopiaDAOImpl pour utiliser l'api criteria au lieu du hql
pour tout ce qui est requétage.
Created: 31 déc. 2005 13:10:34- Author:
- bpoussin <poussin@codelutin.com>, tchemit <chemit@codelutin.com>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.nuiton.topia.persistence.TopiaDAOImpl
TopiaDAOImpl.FindAllIterator<E extends TopiaEntity,R> -
Field Summary
Fields inherited from class org.nuiton.topia.persistence.TopiaDAOImpl
context, entityClass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Construit une nouvelle instance de l'objet géré par ce DAODeprecated.Cette methode appelle fireVetoableCreate et fireOnCreated Si vous la surchargé, faites attention a appeler le super ou a appeler vous aussi ces deux methodes.findAll()Deprecated.Gets all entitys of the dao type in db.findAllByProperties(String propertyName, Object value, Object... others) Deprecated.Gets all entities of the dao type matching thevaluefor the givenpropertyNameandothers.findAllByProperties(Map<String, Object> properties) Deprecated.Gets all entities of the dao type matching all theproperties.findAllByProperty(String propertyName, Object value) Deprecated.Gets all entities of the dao type matching thevaluefor the givenpropertyName.Deprecated.Recuperation de tous les ids en base pour le type d'entite du dao.findAllWithOrder(String... propertyNames) Deprecated.Gets all entites for the dao entity type order by givenpropertyNames.findByPrimaryKey(Object... k) Deprecated.Recherche la classe en utilisant la cle naturelle, si la cle naturelle est composé de plusieurs champs alors les arguments passés doivent être dans l'ordre de declaration dans le fichier de mappingfindByPrimaryKey(Map<String, Object> keys) Deprecated.Recherche la classe en utilisant la cle naturelle, chaque champs de la cle naturelle est une entre de la map passe en argument.findByProperties(String propertyName, Object value, Object... others) Deprecated.findByProperties(Map<String, Object> properties) Deprecated.Find an entity matchingproperties.findByProperty(String propertyName, Object value) Deprecated.Find an entity matchingvaluefor the givenpropertyName.Deprecated.Find an entity corresponding to theid.protected EDeprecated.Methods inherited from class org.nuiton.topia.persistence.TopiaDAOImpl
addTopiaEntityListener, addTopiaEntityVetoable, computeAndAddRecordsToPager, count, countByQuery, countByQuery, create, createQuery, createQuery, createSimpleQuery, delete, deleteAll, existByProperties, existByQuery, existByTopiaId, existsByQuery, findAllByQuery, findAllByQuery, findAllByQuery, findAllByQueryAndPager, findAllByQueryAndPager, findAllByQueryWithBound, findAllByQueryWithBound, findAllContains, findAllLazyByQuery, findAllLazyByQuery, findAllLazyByQuery, findAllLazyByQuery, findAllMappedByQuery, findAllMappedByQuery, findAllUsages, findByQuery, findByQuery, findByQuery, findContains, findUsages, getBatchSize, getContext, getEntityClass, getId, getId, getRequestPermission, getTopiaEntityEnum, init, iterator, newInstance, removeTopiaEntityListener, removeTopiaEntityVetoable, setBatchSize, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TopiaDAOLegacy
public TopiaDAOLegacy()Deprecated.
-
-
Method Details
-
instanciateNew
Deprecated.- Throws:
TopiaException
-
create
Deprecated.Description copied from interface:TopiaDAOConstruit une nouvelle instance de l'objet géré par ce DAO- Specified by:
createin interfaceTopiaDAO<E extends TopiaEntity>- Overrides:
createin classTopiaDAOImpl<E extends TopiaEntity>- Parameters:
properties- la liste des propriétés que doit avoir l'objet créé les arguments vont par paire (propertyName, value)- Returns:
- un nouvel objet
- Throws:
TopiaException- si un problème est rencontré durant l'instanciation
-
findByPrimaryKey
Deprecated.Description copied from interface:TopiaDAORecherche la classe en utilisant la cle naturelle, chaque champs de la cle naturelle est une entre de la map passe en argument.- Specified by:
findByPrimaryKeyin interfaceTopiaDAO<E extends TopiaEntity>- Overrides:
findByPrimaryKeyin classTopiaDAOImpl<E extends TopiaEntity>- Parameters:
keys- la liste des champs de la cle naturelle avec leur valeur- Returns:
- l'entite trouvé
- Throws:
TopiaException- if any pb while getting datas
-
findByPrimaryKey
Deprecated.Description copied from interface:TopiaDAORecherche la classe en utilisant la cle naturelle, si la cle naturelle est composé de plusieurs champs alors les arguments passés doivent être dans l'ordre de declaration dans le fichier de mapping- Specified by:
findByPrimaryKeyin interfaceTopiaDAO<E extends TopiaEntity>- Overrides:
findByPrimaryKeyin classTopiaDAOImpl<E extends TopiaEntity>- Parameters:
k- l'objet cle naturelle de la classe- Returns:
- l'entité trouvé
- Throws:
TopiaException- if any pb while getting datas
-
findByProperties
public E findByProperties(String propertyName, Object value, Object... others) throws TopiaException Deprecated.- Specified by:
findByPropertiesin interfaceTopiaDAO<E extends TopiaEntity>- Overrides:
findByPropertiesin classTopiaDAOImpl<E extends TopiaEntity>- Parameters:
propertyName- le nom de la propriétévalue- la valeur à testerothers- les autres proprietes doivent aller par 2 propertyName, value- Returns:
- l'entité trouvé
- Throws:
TopiaException- if any pb while getting datas
-
findAllByProperties
public List<E> findAllByProperties(String propertyName, Object value, Object... others) throws TopiaException Deprecated.Description copied from interface:TopiaDAOGets all entities of the dao type matching thevaluefor the givenpropertyNameandothers.- Specified by:
findAllByPropertiesin interfaceTopiaDAO<E extends TopiaEntity>- Overrides:
findAllByPropertiesin classTopiaDAOImpl<E extends TopiaEntity>- Parameters:
propertyName- le nom de la propriétévalue- la valeur à testerothers- les autres proprietes doivent aller par 2 propertyName, value- Returns:
- matching entities
- Throws:
TopiaException- if any pb while getting datas
-
findAllByProperty
Deprecated.Description copied from interface:TopiaDAOGets all entities of the dao type matching thevaluefor the givenpropertyName.- Specified by:
findAllByPropertyin interfaceTopiaDAO<E extends TopiaEntity>- Overrides:
findAllByPropertyin classTopiaDAOImpl<E extends TopiaEntity>- Parameters:
propertyName- property name to filtervalue- value to match- Returns:
- matching entities
- Throws:
TopiaException- if any pb while getting datas
-
findByProperty
Deprecated.Description copied from interface:TopiaDAOFind an entity matchingvaluefor the givenpropertyName.- Specified by:
findByPropertyin interfaceTopiaDAO<E extends TopiaEntity>- Overrides:
findByPropertyin classTopiaDAOImpl<E extends TopiaEntity>- Parameters:
propertyName- property name to filtervalue- value of the property to math- Returns:
- the first entity matching the request
- Throws:
TopiaException
-
create
Deprecated.Cette methode appelle fireVetoableCreate et fireOnCreated Si vous la surchargé, faites attention a appeler le super ou a appeler vous aussi ces deux methodes.- Specified by:
createin interfaceTopiaDAO<E extends TopiaEntity>- Overrides:
createin classTopiaDAOImpl<E extends TopiaEntity>- Parameters:
properties- la liste des propriétés que doit avoir l'objet créé- Returns:
- un nouvel objet
- Throws:
TopiaException- si un problème est rencontré durant l'instanciation
-
findByTopiaId
Deprecated.Description copied from interface:TopiaDAOFind an entity corresponding to theid. If theidis null, nothing will be searched.- Specified by:
findByTopiaIdin interfaceTopiaDAO<E extends TopiaEntity>- Overrides:
findByTopiaIdin classTopiaDAOImpl<E extends TopiaEntity>- Parameters:
k- topiaId of the entity to found- Returns:
- the entity found or null if not
- Throws:
TopiaException- for Topia errors on query
-
findAll
Deprecated.Description copied from interface:TopiaDAOGets all entitys of the dao type in db.- Specified by:
findAllin interfaceTopiaDAO<E extends TopiaEntity>- Overrides:
findAllin classTopiaDAOImpl<E extends TopiaEntity>- Returns:
- all entities of the dao type in db
- Throws:
TopiaException
-
findAllIds
Deprecated.Description copied from interface:TopiaDAORecuperation de tous les ids en base pour le type d'entite du dao.- Specified by:
findAllIdsin interfaceTopiaDAO<E extends TopiaEntity>- Overrides:
findAllIdsin classTopiaDAOImpl<E extends TopiaEntity>- Returns:
- la liste de tous les ids
- Throws:
TopiaException- si pb en base
-
findAllWithOrder
Deprecated.Description copied from interface:TopiaDAOGets all entites for the dao entity type order by givenpropertyNames. You can add on eachpropertyASCouDESCto fix order way (by default isASC).- Specified by:
findAllWithOrderin interfaceTopiaDAO<E extends TopiaEntity>- Overrides:
findAllWithOrderin classTopiaDAOImpl<E extends TopiaEntity>- Parameters:
propertyNames- property names of order to apply- Returns:
- all entities of the dao entity type with given order
- Throws:
TopiaException- if any pb while getting datas
-
findByProperties
Deprecated.Description copied from interface:TopiaDAOFind an entity matchingproperties.- Specified by:
findByPropertiesin interfaceTopiaDAO<E extends TopiaEntity>- Overrides:
findByPropertiesin classTopiaDAOImpl<E extends TopiaEntity>- Parameters:
properties- les propriétés à matcher- Returns:
- l'entité trouvé
- Throws:
TopiaException- if any pb while getting datas
-
findAllByProperties
Deprecated.Description copied from interface:TopiaDAOGets all entities of the dao type matching all theproperties.- Specified by:
findAllByPropertiesin interfaceTopiaDAO<E extends TopiaEntity>- Overrides:
findAllByPropertiesin classTopiaDAOImpl<E extends TopiaEntity>- Parameters:
properties- properties to match- Returns:
- matching entities
- Throws:
TopiaException- if any pb while getting datas
-