|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.topia.persistence.TopiaDAOImpl<E>
org.nuiton.topia.persistence.TopiaDAOLegacy<E>
E - le type de l'entitepublic class TopiaDAOLegacy<E extends TopiaEntity>
Cette classe permet d'avoir un ensemble de méthode implantée de façon standard et plus spécifiquement pour Hibernate. Certains accès à Hibernate sont tout de même fait ici, car on a pris le choix de se baser entièrement sur hibernate pour la persistence, et il est ainsi possible d'accèder au meta information hibernate sur les classes lorque l'on en a besoin. Created: 31 déc. 2005 13:10:34
| Field Summary | |
|---|---|
protected TopiaContextImplementor |
context
|
protected Class<E> |
entityClass
|
| Constructor Summary | |
|---|---|
TopiaDAOLegacy()
|
|
| Method Summary | |
|---|---|
void |
addTopiaEntityListener(TopiaEntityListener listener)
|
void |
addTopiaEntityVetoable(TopiaEntityVetoable vetoable)
|
E |
create(Map<String,Object> properties)
Cette methode appelle fireVetoableCreate et fireOnCreated Si vous la surchargé, faites attention a appeler le super ou a appeler vous aussi ces deux methodes. |
E |
create(Object... properties)
Construit une nouvelle instance de l'objet géré par ce DAO |
void |
delete(E e)
Permet de supprimer une entite. |
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<String> |
findAllIds()
Recuperation de tous les ids en base pour le type d'entite du dao. |
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 |
findByTopiaId(String k)
Find an entity corresponding to the id. |
TopiaContextImplementor |
getContext()
Return context used by this DAO. |
Class<E> |
getEntityClass()
Return class of entity managed by this DAO. |
protected Serializable |
getId(E e)
Retourne l'id de l'entity |
protected Serializable |
getId(Map map)
Retourne l'id de l'entity representer comme une map |
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 |
protected E |
instanciateNew()
|
void |
removeTopiaEntityListener(TopiaEntityListener listener)
|
void |
removeTopiaEntityVetoable(TopiaEntityVetoable vetoable)
|
E |
update(E e)
Permet d'ajouter ou de mettre a jour un objet. |
| Methods inherited from class org.nuiton.topia.persistence.TopiaDAOImpl |
|---|
count, countByQuery, create, createQuery, createQuery, existByProperties, existByQuery, existByTopiaId, findAllByQuery, findAllContains, findAllMappedByQuery, findAllMappedByQuery, findAllUsages, findByQuery, findContains, findUsages, newInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Class<E extends TopiaEntity> entityClass
protected TopiaContextImplementor context
| Constructor Detail |
|---|
public TopiaDAOLegacy()
| Method Detail |
|---|
public Class<E> getEntityClass()
TopiaDAO
getEntityClass in interface TopiaDAO<E extends TopiaEntity>getEntityClass in class TopiaDAOImpl<E extends TopiaEntity>
protected Serializable getId(E e)
throws TopiaException
getId in class TopiaDAOImpl<E extends TopiaEntity>e - l'entity
TopiaException - Si une erreur survient durant la recherche
protected Serializable getId(Map map)
throws TopiaException
getId in class TopiaDAOImpl<E extends TopiaEntity>map - l'entity en representation map
TopiaException - Si une erreur survient durant la recherche
public void init(TopiaContextImplementor context,
Class<E> entityClass)
throws TopiaException
init in interface TopiaDAO<E extends TopiaEntity>init in class TopiaDAOImpl<E extends TopiaEntity>entityClass - context - context
TopiaException - if any pb while initpublic TopiaContextImplementor getContext()
TopiaDAO
getContext in interface TopiaDAO<E extends TopiaEntity>getContext in class TopiaDAOImpl<E extends TopiaEntity>
protected E instanciateNew()
throws TopiaException
TopiaException
public E create(Object... properties)
throws TopiaException
TopiaDAO
create in interface TopiaDAO<E extends TopiaEntity>create in class TopiaDAOImpl<E extends TopiaEntity>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
public E findByPrimaryKey(Map<String,Object> keys)
throws TopiaException
TopiaDAO
findByPrimaryKey in interface TopiaDAO<E extends TopiaEntity>findByPrimaryKey in class TopiaDAOImpl<E extends TopiaEntity>keys - la liste des champs de la cle naturelle avec leur valeur
TopiaException - if any pb while getting datas
public E findByPrimaryKey(Object... k)
throws TopiaException
TopiaDAO
findByPrimaryKey in interface TopiaDAO<E extends TopiaEntity>findByPrimaryKey in class TopiaDAOImpl<E extends TopiaEntity>k - l'objet cle naturelle de la classe
TopiaException - if any pb while getting datas
public E findByProperties(String propertyName,
Object value,
Object... others)
throws TopiaException
findByProperties in interface TopiaDAO<E extends TopiaEntity>findByProperties in class TopiaDAOImpl<E extends TopiaEntity>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
public List<E> findAllByProperties(String propertyName,
Object value,
Object... others)
throws TopiaException
findAllByProperties in interface TopiaDAO<E extends TopiaEntity>findAllByProperties in class TopiaDAOImpl<E extends TopiaEntity>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
public List<E> findAllByProperty(String propertyName,
Object value)
throws TopiaException
findAllByProperty in interface TopiaDAO<E extends TopiaEntity>findAllByProperty in class TopiaDAOImpl<E extends TopiaEntity>TopiaException
public E findByProperty(String propertyName,
Object value)
throws TopiaException
findByProperty in interface TopiaDAO<E extends TopiaEntity>findByProperty in class TopiaDAOImpl<E extends TopiaEntity>TopiaExceptionpublic void addTopiaEntityListener(TopiaEntityListener listener)
addTopiaEntityListener in interface TopiaDAO<E extends TopiaEntity>addTopiaEntityListener in class TopiaDAOImpl<E extends TopiaEntity>public void addTopiaEntityVetoable(TopiaEntityVetoable vetoable)
addTopiaEntityVetoable in interface TopiaDAO<E extends TopiaEntity>addTopiaEntityVetoable in class TopiaDAOImpl<E extends TopiaEntity>public void removeTopiaEntityListener(TopiaEntityListener listener)
removeTopiaEntityListener in interface TopiaDAO<E extends TopiaEntity>removeTopiaEntityListener in class TopiaDAOImpl<E extends TopiaEntity>public void removeTopiaEntityVetoable(TopiaEntityVetoable vetoable)
removeTopiaEntityVetoable in interface TopiaDAO<E extends TopiaEntity>removeTopiaEntityVetoable in class TopiaDAOImpl<E extends TopiaEntity>
public E create(Map<String,Object> properties)
throws TopiaException
create in interface TopiaDAO<E extends TopiaEntity>create in class TopiaDAOImpl<E extends TopiaEntity>properties - la liste des propriétés que doit avoir l'objet créé
TopiaException - si un problème est rencontré durant
l'instanciation
public E update(E e)
throws TopiaException
TopiaDAO
update in interface TopiaDAO<E extends TopiaEntity>update in class TopiaDAOImpl<E extends TopiaEntity>e - l'entite a ajouter ou mettre a jour
TopiaException - if any pb while updating datas
public void delete(E e)
throws TopiaException
TopiaDAO
delete in interface TopiaDAO<E extends TopiaEntity>delete in class TopiaDAOImpl<E extends TopiaEntity>e - l'entite a supprimer
TopiaException - if any pb while deleting datas
public E findByTopiaId(String k)
throws TopiaException
TopiaDAOid. If the id is
null, nothing will be search.
findByTopiaId in interface TopiaDAO<E extends TopiaEntity>findByTopiaId in class TopiaDAOImpl<E extends TopiaEntity>k - topiaId of the entity to found
TopiaException - for Topia errors on query
public List<E> findAll()
throws TopiaException
findAll in interface TopiaDAO<E extends TopiaEntity>findAll in class TopiaDAOImpl<E extends TopiaEntity>TopiaException
public List<String> findAllIds()
throws TopiaException
TopiaDAO
findAllIds in interface TopiaDAO<E extends TopiaEntity>findAllIds in class TopiaDAOImpl<E extends TopiaEntity>TopiaException - si pb en base
public List<E> findAllWithOrder(String... propertyNames)
throws TopiaException
findAllWithOrder in interface TopiaDAO<E extends TopiaEntity>findAllWithOrder in class TopiaDAOImpl<E extends TopiaEntity>TopiaException
public E findByProperties(Map<String,Object> properties)
throws TopiaException
findByProperties in interface TopiaDAO<E extends TopiaEntity>findByProperties in class TopiaDAOImpl<E extends TopiaEntity>TopiaException
public List<E> findAllByProperties(Map<String,Object> properties)
throws TopiaException
findAllByProperties in interface TopiaDAO<E extends TopiaEntity>findAllByProperties in class TopiaDAOImpl<E extends TopiaEntity>TopiaException
public List<Permission> getRequestPermission(String topiaId,
int actions)
throws TopiaException
TopiaDAO
getRequestPermission in interface TopiaDAO<E extends TopiaEntity>getRequestPermission in class TopiaDAOImpl<E extends TopiaEntity>topiaId - topiaId d'une entiteactions - encoded actions
TopiaException - if any pb while getting datas
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||