|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Entity - public interface TopiaDAO<Entity extends TopiaEntity>
| Method Summary | |
|---|---|
void |
addTopiaEntityListener(TopiaEntityListener listener)
|
void |
addTopiaEntityVetoable(TopiaEntityVetoable vetoable)
|
void |
commitTransaction()
Appelé lorsque le context a eu un commit de fait. |
Entity |
create(Map<String,Object> properties)
Construit une nouvelle instance de l'objet géré par ce DAO |
Entity |
create(Object... properties)
Construit une nouvelle instance de l'objet géré par ce DAO |
TopiaQuery<Entity> |
createQuery()
Crée une requete basé sur l'entité lié au DAO. |
TopiaQuery<Entity> |
createQuery(String entityAlias)
Crée une requete basé sur l'entité lié au DAO et lui assigne un alias valable dans la requête. |
void |
delete(Entity e)
|
List<Entity> |
findAll()
|
List<Entity> |
findAllByProperties(Map<String,Object> properties)
|
List<Entity> |
findAllByProperties(String propertyName,
Object value,
Object... others)
|
List<Entity> |
findAllByProperty(String propertyName,
Object value)
|
List<Entity> |
findAllContainsProperties(Map<String,Collection> properties)
Cherche et renvoie la première entité trouvée dont les propriétés en clé de Map contiennent toutes les valeurs de la Collection. |
List<Entity> |
findAllContainsProperties(String propertyName,
Collection values,
Object... others)
Cherche et renvoie toutes les entités trouvées dont la propriété propertyName contient values, ainsi de suite avec others. |
List<String> |
findAllIds()
Recuperation de tous les ids en base pour le type d'entite du dao. |
List<Entity> |
findAllWithOrder(String... propertyNames)
|
Entity |
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. |
Entity |
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 |
Entity |
findByProperties(Map<String,Object> properties)
|
Entity |
findByProperties(String propertyName,
Object value,
Object... others)
|
Entity |
findByProperty(String propertyName,
Object value)
|
Entity |
findByTopiaId(String k)
|
Entity |
findContainsProperties(Map<String,Collection> properties)
Cherche et renvoie la première entité trouvée dont les propriétés en clé de Map contiennent toutes les valeurs de la Collection. |
Entity |
findContainsProperties(String propertyName,
Collection values,
Object... others)
Cherche et renvoie la première entité trouvée dont la propriété propertyName contient values, ainsi de suite avec others. |
TopiaContextImplementor |
getContext()
|
Class<Entity> |
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<Entity> entityClass)
When TopiaContextImpl create the TopiaDAOHibernate, it must call this method just after. |
void |
removeTopiaEntityListener(TopiaEntityListener listener)
|
void |
removeTopiaEntityVetoable(TopiaEntityVetoable vetoable)
|
void |
rollbackTransaction()
Appelé lorsque le context a eu un rollback de fait. |
long |
size()
Compte le nombre d'entites en base |
Entity |
update(Entity e)
Permet d'ajouter ou de mettre a jour un objet. |
| Method Detail |
|---|
void init(TopiaContextImplementor context,
Class<Entity> entityClass)
throws TopiaException
context - contextentityClass - entity class
TopiaExceptionClass<Entity> getEntityClass()
TopiaContextImplementor getContext()
void commitTransaction()
throws TopiaException
TopiaException
void rollbackTransaction()
throws TopiaException
TopiaException
Entity 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
Entity 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
Entity update(Entity e)
throws TopiaException
e - l'entite a ajouter ou mettre a jour
TopiaException
void delete(Entity e)
throws TopiaException
TopiaException
Entity findByTopiaId(String k)
throws TopiaException
TopiaException
List<Entity> findAll()
throws TopiaException
TopiaException
List<String> findAllIds()
throws TopiaException
TopiaException - si pb en base
List<Entity> findAllWithOrder(String... propertyNames)
throws TopiaException
TopiaException
long size()
throws TopiaException
TopiaExceptionTopiaQuery<Entity> createQuery()
TopiaQuery<Entity> createQuery(String entityAlias)
entityAlias - alias permettant de manipuler l'entité dans la requête
Entity findByPrimaryKey(Map<String,Object> keys)
throws TopiaException
keys - la liste des champs de la cle naturelle avec leur valeur
TopiaException
Entity findByPrimaryKey(Object... k)
throws TopiaException
k - l'objet cle naturelle de la classe
TopiaException
Entity findByProperty(String propertyName,
Object value)
throws TopiaException
TopiaException
Entity findByProperties(String propertyName,
Object value,
Object... others)
throws TopiaException
propertyName - value - others - les autres proprietes doivent aller par 2 propertyName,
value
TopiaException
Entity findByProperties(Map<String,Object> properties)
throws TopiaException
TopiaException
List<Entity> findAllByProperty(String propertyName,
Object value)
throws TopiaException
TopiaException
List<Entity> findAllByProperties(String propertyName,
Object value,
Object... others)
throws TopiaException
propertyName - value - others - les autres proprietes doivent aller par 2 propertyName,
value
TopiaException
List<Entity> findAllByProperties(Map<String,Object> properties)
throws TopiaException
TopiaException
Entity findContainsProperties(Map<String,Collection> properties)
throws TopiaException
properties -
TopiaException
Entity findContainsProperties(String propertyName,
Collection values,
Object... others)
throws TopiaException
propertyName - values - others -
TopiaException
List<Entity> findAllContainsProperties(Map<String,Collection> properties)
throws TopiaException
properties -
TopiaException
List<Entity> findAllContainsProperties(String propertyName,
Collection values,
Object... others)
throws TopiaException
propertyName - values - others -
TopiaException
List<Permission> getRequestPermission(String topiaId,
int actions)
throws TopiaException
topiaId - topiaId d'une entiteactions -
TopiaExceptionvoid addTopiaEntityListener(TopiaEntityListener listener)
void addTopiaEntityVetoable(TopiaEntityVetoable vetoable)
void removeTopiaEntityListener(TopiaEntityListener listener)
void removeTopiaEntityVetoable(TopiaEntityVetoable vetoable)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||