Author: mallon Date: 2012-07-24 16:56:32 +0200 (Tue, 24 Jul 2012) New Revision: 3552 Url: http://chorem.org/repositories/revision/lima/3552 Log: Modification de la requete de selection de la derniere lettre : utilisation de distinct, afin de ne pas avoir a utiliser un hashSet. Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryDAOImpl.java Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryDAOImpl.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryDAOImpl.java 2012-07-24 14:47:00 UTC (rev 3551) +++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryDAOImpl.java 2012-07-24 14:56:32 UTC (rev 3552) @@ -25,20 +25,15 @@ package org.chorem.lima.entity; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.beans.LetteringFilter; import org.nuiton.topia.TopiaException; +import java.util.ArrayList; import java.util.Date; -import java.util.HashSet; import java.util.List; -import java.util.Set; public class EntryDAOImpl<E extends Entry> extends EntryDAOAbstract<Entry> { - private static final Log log = LogFactory.getLog(EntryDAOImpl.class); - /** * Requete generique qui recupere les entrees equilibrées portant entre * deux dates. @@ -124,12 +119,12 @@ return entries; } - public Set<String> findLetters() throws TopiaException{ - String query = "Select E.lettering FROM " + Entry.class.getName() + " E" + + public List<String> findLetters() throws TopiaException{ + String query = "Select distinct E.lettering FROM " + Entry.class.getName() + " E" + " where E.lettering <> null" + " order by E.lettering desc"; - Set<String> result = new HashSet<String>(context.findAll(query)); + List<String> result = new ArrayList<String>(context.findAll(query)); return result; }
participants (1)
-
mallon@users.chorem.org