Bonjour;
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 public List findByProperty22(String table, String propertyName, String S1) { try { String queryString = "from " + table + " as model where model." + propertyName + " = '" + S1 + "'"; Query queryObject = getSession().createQuery(queryString); return queryObject.list(); } catch (RuntimeException re) { throw re; }
Voici ma méthode dans le DAO.Java, qui me retourne une liste
la méthode execute un Select * from ...... automatiquement, je voudrai préciser les attributs qui rentre dans le SELECT
select X from.....
Partager