|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
E - the entity type linked with the daopublic interface TopiaDAO<E extends TopiaEntity>
TopiaDAO is used to manipulate entities corresponding to E type :
create, delete, update or find entities using properties of TopiaQuery.
TopiaDAOImpl overridden by generation
from DAOTransformer for specific entity interface, DAOAbstractTransformer for abstract implementation and DAOImplTransformer for final implementation class.
TODO-fdesbois-20100508 : Need translation of javadoc.
| Method Summary | ||
|---|---|---|
void |
addTopiaEntityListener(TopiaEntityListener listener)
|
|
void |
addTopiaEntityVetoable(TopiaEntityVetoable vetoable)
|
|
int |
count()
Count the number of existing entities. |
|
int |
countByQuery(TopiaQuery query)
Count the number of entities based on query. |
|
E |
create(E e)
Permet de sauver un object instancié sans le DAO. |
|
E |
create(Map<String,Object> properties)
Construit une nouvelle instance de l'objet géré par ce DAO |
|
E |
create(Object... properties)
Construit une nouvelle instance de l'objet géré par ce DAO |
|
TopiaQuery |
createQuery()
Crée une requete basé sur l'entité lié au DAO. |
|
TopiaQuery |
createQuery(String entityAlias)
Crée une requête basé sur l'entité lié au DAO et lui assigne un alias valable dans la requête.. |
|
void |
delete(E e)
Permet de supprimer une entite. |
|
boolean |
existByProperties(String propertyName,
Object propertyValue,
Object... others)
Check the existence of an entity with propertyName with propertyValue. |
|
boolean |
existByQuery(TopiaQuery query)
Check the existence of an entity using a query. |
|
boolean |
existByTopiaId(String id)
Check the existence of an entity with technical id. |
|
List<E> |
findAll()
|
|
List<E> |
findAllByProperties(Map<String,Object> properties)
|
|
List<E> |
findAllByProperties(String propertyName,
Object value,
Object... others)
|
|
List<E> |
findAllByProperty(String propertyName,
Object value)
|
|
List<E> |
findAllByQuery(TopiaQuery query)
Execute une requête basé sur l'entité du DAO. |
|
List<String> |
findAllIds()
Recuperation de tous les ids en base pour le type d'entite du dao. |
|
Map<String,E> |
findAllMappedByQuery(TopiaQuery query)
Execute une requête basé sur l'entité du DAO. |
|
|
findAllMappedByQuery(TopiaQuery query,
String keyName,
Class<K> keyClass)
Execute une requête basé sur l'entité du DAO. |
|
Map<Class<? extends TopiaEntity>,List<? extends TopiaEntity>> |
findAllUsages(E entity)
Find all usages of the given entity. |
|
List<E> |
findAllWithOrder(String... propertyNames)
|
|
E |
findByPrimaryKey(Map<String,Object> keys)
Recherche la classe en utilisant la cle naturelle, chaque champs de la cle naturelle est une entre de la map passe en argument. |
|
E |
findByPrimaryKey(Object... k)
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 mapping |
|
E |
findByProperties(Map<String,Object> properties)
|
|
E |
findByProperties(String propertyName,
Object value,
Object... others)
|
|
E |
findByProperty(String propertyName,
Object value)
|
|
E |
findByQuery(TopiaQuery query)
Execute une requête basé sur l'entité du DAO. |
|
E |
findByTopiaId(String id)
Find an entity corresponding to the id. |
|
|
findUsages(Class<U> type,
E entity)
Find usages of the given entity in the entities of the given
type. |
|
TopiaContextImplementor |
getContext()
Return context used by this DAO. |
|
Class<E> |
getEntityClass()
Return class of entity managed by this DAO. |
|
List<Permission> |
getRequestPermission(String topiaId,
int actions)
Retourne les permissions a verifier pour l'acces a l'entite pour le service Taas. |
|
void |
init(TopiaContextImplementor context,
Class<E> entityClass)
When TopiaContextImpl create the TopiaDAOHibernate, it must call this method just after. |
|
E |
newInstance()
Create a new instance of managed entity. |
|
void |
removeTopiaEntityListener(TopiaEntityListener listener)
|
|
void |
removeTopiaEntityVetoable(TopiaEntityVetoable vetoable)
|
|
long |
size()
Deprecated. since 2.3.4 ambiguous name, use count() instead. |
|
E |
update(E e)
Permet d'ajouter ou de mettre a jour un objet. |
|
| Method Detail |
|---|
void init(TopiaContextImplementor context,
Class<E> entityClass)
throws TopiaException
context - contextentityClass - entity class
TopiaException - if any pb while init
E newInstance()
throws TopiaException
TopiaException - if any pb while creating the entityClass<E> getEntityClass()
TopiaContextImplementor getContext()
<U extends TopiaEntity> List<U> findUsages(Class<U> type,
E entity)
throws TopiaException
entity in the entities of the given
type.
U - tthe type of entity to searchtype - the type of entity to searchentity - the entity
TopiaException - if any problem while getting data
Map<Class<? extends TopiaEntity>,List<? extends TopiaEntity>> findAllUsages(E entity)
throws TopiaException
entity.
entity - the entity
TopiaException - if any pb while getting data
List<Permission> getRequestPermission(String topiaId,
int actions)
throws TopiaException
topiaId - topiaId d'une entiteactions - encoded actions
TopiaException - if any pb while getting datasvoid addTopiaEntityListener(TopiaEntityListener listener)
void addTopiaEntityVetoable(TopiaEntityVetoable vetoable)
void removeTopiaEntityListener(TopiaEntityListener listener)
void removeTopiaEntityVetoable(TopiaEntityVetoable vetoable)
E create(Object... properties)
throws TopiaException
properties - la liste des propriétés que doit avoir l'objet créé les
arguments vont par paire (propertyName, value)
TopiaException - si un problème est rencontré durant
l'instanciation
IllegalArgumentException - Si le nombre on le type des arguments
n'est pas bon ou que le type ou le nom
d'une propriété est fausse
E create(Map<String,Object> properties)
throws TopiaException
properties - la liste des propriétés que doit avoir l'objet créé
TopiaException - si un problème est rencontré durant
l'instanciation
IllegalArgumentException - Si le nombre on le type des arguments
n'est pas bon ou que le type ou le nom
d'une propriété est fausse
E create(E e)
throws TopiaException
create(Object...)
serait trop couteux.
e - l'entité instanciée à sauver
TopiaException - if any pb while creating datas
E update(E e)
throws TopiaException
e - l'entite a ajouter ou mettre a jour
TopiaException - if any pb while updating datas
void delete(E e)
throws TopiaException
e - l'entite a supprimer
TopiaException - if any pb while deleting datasTopiaQuery createQuery()
TopiaQuery createQuery(String entityAlias)
entityAlias - alias permettant de manipuler l'entité dans la
requête
E findByTopiaId(String id)
throws TopiaException
id. If the id is
null, nothing will be search.
id - topiaId of the entity to found
TopiaException - for Topia errors on query
E findByProperty(String propertyName,
Object value)
throws TopiaException
TopiaException
E findByProperties(String propertyName,
Object value,
Object... others)
throws TopiaException
propertyName - le nom de la propriétévalue - la valeur à testerothers - les autres proprietes doivent aller par 2
propertyName, value
TopiaException - if any pb while getting datas
E findByProperties(Map<String,Object> properties)
throws TopiaException
TopiaException
E findByQuery(TopiaQuery query)
throws TopiaException
query - la requête
TopiaException - if any pb while getting datasTopiaQuery.executeToEntity(TopiaContext, Class)
List<E> findAll()
throws TopiaException
TopiaException
List<String> findAllIds()
throws TopiaException
TopiaException - si pb en base
List<E> findAllByProperty(String propertyName,
Object value)
throws TopiaException
TopiaException
List<E> findAllByProperties(String propertyName,
Object value,
Object... others)
throws TopiaException
propertyName - le nom de la propriétévalue - la valeur à testerothers - les autres proprietes doivent aller par 2
propertyName, value
TopiaException - if any pb while getting datas
List<E> findAllByProperties(Map<String,Object> properties)
throws TopiaException
TopiaException
List<E> findAllByQuery(TopiaQuery query)
throws TopiaException
query - la requête
TopiaException - if any pb while getting datasTopiaQuery.executeToEntityList(TopiaContext, Class)
Map<String,E> findAllMappedByQuery(TopiaQuery query)
throws TopiaException
query - la requête
TopiaException - if any pb while getting datasTopiaQuery.executeToEntityMap(TopiaContext, Class)
<K> Map<K,E> findAllMappedByQuery(TopiaQuery query,
String keyName,
Class<K> keyClass)
throws TopiaException
K - type de la clé de la mapquery - la requêtekeyName - nom de la propriété de l'entité utilisée comme clékeyClass - type de la propriété de l'entité utilisée comme clé
TopiaException - if any pb while getting datasTopiaQuery.executeToEntityMap(TopiaContext, Class)
List<E> findAllWithOrder(String... propertyNames)
throws TopiaException
TopiaException
boolean existByTopiaId(String id)
throws TopiaException
id.
id - unique id of the entity to test existence.
TopiaException - for Topia errors
boolean existByProperties(String propertyName,
Object propertyValue,
Object... others)
throws TopiaException
propertyName with propertyValue. others properties can be added to test
existence.
propertyName - first property name to test existencepropertyValue - first property value to test existenceothers - altern propertyName and propertyValue
TopiaException - for Topia errors
boolean existByQuery(TopiaQuery query)
throws TopiaException
query.
query - query used to test existence
TopiaException
@Deprecated
long size()
throws TopiaException
count() instead.
TopiaException - if any pb while getting datas
int count()
throws TopiaException
TopiaException - if any pb while getting datas
int countByQuery(TopiaQuery query)
throws TopiaException
query.
query - query
TopiaException - if any pb while getting datas
E findByPrimaryKey(Map<String,Object> keys)
throws TopiaException
keys - la liste des champs de la cle naturelle avec leur valeur
TopiaException - if any pb while getting datas
E findByPrimaryKey(Object... k)
throws TopiaException
k - l'objet cle naturelle de la classe
TopiaException - if any pb while getting datas
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||