Author: bleny Date: 2014-09-04 10:05:26 +0200 (Thu, 04 Sep 2014) New Revision: 2235 Url: http://forge.codelutin.com/projects/wao/repository/revisions/2235 Log: Suppression de code mort Removed: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleMonthTopiaDao.java Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsService.java Deleted: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleMonthTopiaDao.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleMonthTopiaDao.java 2014-09-03 16:01:17 UTC (rev 2234) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleMonthTopiaDao.java 2014-09-04 08:05:26 UTC (rev 2235) @@ -1,48 +0,0 @@ -package fr.ifremer.wao.entity; - -/* - * #%L - * Wao :: Persistence - * %% - * Copyright (C) 2009 - 2014 Ifremer - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ - -import com.google.common.collect.ImmutableMap; -import org.nuiton.topia.persistence.HqlAndParametersBuilder; -import org.nuiton.topia.persistence.TopiaNoResultException; -import org.nuiton.util.PeriodDates; - -import java.util.Date; - -public class SampleMonthTopiaDao extends AbstractSampleMonthTopiaDao<SampleMonth> { - - public SampleMonth getExistingSampleMonth(SampleRow sampleRow, Date tideBeginDate) throws TopiaNoResultException { - - PeriodDates period = new PeriodDates(tideBeginDate, tideBeginDate); - period.initDayOfMonthExtremities(); - - HqlAndParametersBuilder<SampleMonth> query = newHqlAndParametersBuilder(); - query.addEquals(SampleMonth.PROPERTY_SAMPLE_ROW, sampleRow); - query.addWhereClause(SampleMonth.PROPERTY_PERIOD_DATE + " >= :beforeDate", ImmutableMap.of("beforeDate", (Object) period.getFromDate())); - query.addWhereClause(SampleMonth.PROPERTY_PERIOD_DATE + " <= :endDate", ImmutableMap.of("endDate", (Object) period.getThruDate())); - - - SampleMonth result = findUnique(query.getHql(), query.getHqlParameters()); - return result; - } - -} Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsService.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsService.java 2014-09-03 16:01:17 UTC (rev 2234) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/BoatsService.java 2014-09-04 08:05:26 UTC (rev 2235) @@ -259,16 +259,6 @@ } - public Collection<Boat> getBoats(BoatsFilter boatsFilter, int pageSize) { - - PaginationParameter pager = newBoatsPaginationParameter(0, pageSize); - - PaginationResult<Boat> boats = getBoatDao().find(boatsFilter, pager); - - return boats.getElements(); - - } - public void changeBoatElligibility(AuthenticatedWaoUser authenticatedWaoUser, String boatId, String sampleRowId, boolean active) { ElligibleBoatTopiaDao dao = getElligibleBoatDao();