Tutti-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- 4130 discussions
r181 - in trunk/tutti-persistence-adagio: . src/main/java/fr/ifremer/tutti/persistence src/main/java/fr/ifremer/tutti/persistence/service src/main/resources src/main/site/rst src/test/java/fr/ifremer/tutti/persistence src/test/java/fr/ifremer/tutti/persistence/service src/test/resources
by tchemit@users.forge.codelutin.com 12 Jan '13
by tchemit@users.forge.codelutin.com 12 Jan '13
12 Jan '13
Author: tchemit
Date: 2013-01-12 18:59:34 +0100 (Sat, 12 Jan 2013)
New Revision: 181
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/181
Log:
- refs #1807: [Persistence] Adagio r?\195?\169f?\195?\169rentiel (implements new service)
- improve Spring usage (add a ServiceLocator)
- add request doc
- improve tests
Added:
trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiEnumerationFile.java
trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/
trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceImpl.java
trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/TuttiPersistenceServiceLocator.java
trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/service/
trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceTest.java
Removed:
trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ReferentialTest.java
Modified:
trunk/tutti-persistence-adagio/pom.xml
trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java
trunk/tutti-persistence-adagio/src/main/resources/applicationContext-service-tutti.xml
trunk/tutti-persistence-adagio/src/main/resources/beanRefFactory.xml
trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml
trunk/tutti-persistence-adagio/src/main/resources/tutti-db-enumerations.properties
trunk/tutti-persistence-adagio/src/main/site/rst/referential.rst
trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/CruiseTest.java
trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/DatabaseResource.java
trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ProgramTest.java
trunk/tutti-persistence-adagio/src/test/resources/tutti-test.properties
Modified: trunk/tutti-persistence-adagio/pom.xml
===================================================================
--- trunk/tutti-persistence-adagio/pom.xml 2013-01-12 17:57:25 UTC (rev 180)
+++ trunk/tutti-persistence-adagio/pom.xml 2013-01-12 17:59:34 UTC (rev 181)
@@ -57,14 +57,12 @@
<artifactId>nuiton-utils</artifactId>
</dependency>
- <!--dependency>
+ <dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
-
-
- <dependency>
+ <!--dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency-->
@@ -84,16 +82,18 @@
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </dependency>
<!--dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
+
<dependency>
<groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
Added: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiEnumerationFile.java
===================================================================
--- trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiEnumerationFile.java (rev 0)
+++ trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiEnumerationFile.java 2013-01-12 17:59:34 UTC (rev 181)
@@ -0,0 +1,156 @@
+package fr.ifremer.tutti.persistence;
+
+/*
+ * #%L
+ * Tutti :: Persistence Adagio (impl)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+import org.springframework.beans.factory.annotation.Value;
+
+/**
+ * Contains all constants usablevia the enumeration file.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class TuttiEnumerationFile {
+
+ @Value("${GearClassificationId.SCIENTIFIC_CRUISE}")
+ public final Integer GEAR_CLASSIFICIATION_ID_SCIENTIFIC = null;
+
+ @Value("${GearClassificationId.FAO}")
+ public final Integer GEAR_CLASSIFICIATION_ID_FISHING = null;
+
+ @Value("${LocationLevelId.PAYS_ISO3}")
+ public final Integer LOCATION_LEVEL_ID_COUNTRY = null;
+
+ @Value("${LocationLevelId.LOCALITE}")
+ public final Integer LOCATION_LEVEL_ID_LOCALITE = null;
+
+ @Value("${LocationLevelId.PROGRAM}")
+ public final Integer LOCATION_LEVEL_ID_PROGRAMM = null;
+
+ @Value("${LocationLevelId.STRATA}")
+ public final Integer LOCATION_LEVEL_ID_STRATA = null;
+
+ @Value("${LocationLevelId.SUBSTRATA}")
+ public final Integer LOCATION_LEVEL_ID_SUB_STRATA = null;
+
+ @Value("${MatrixId.GEAR}")
+ public final Integer MATRIX_ID_GEAR = null;
+
+ @Value("${MatrixId.INDIVIDUAL}")
+ public final Integer MATRIX_ID_INDIVIDUAL = null;
+
+ @Value("${MethodId.DECLARATION}")
+ public final Integer METHOD_ID_DECLARATION = null;
+
+ @Value("${ParameterCode.AGE}")
+ public final String PARAMETER_CODE_AGE = null;
+
+ @Value("${ParameterCode.WEIGHT}")
+ public final String PARAMETER_CODE_WEIGHT = null;
+
+ @Value("${ParameterGroupId.ENVIRONEMENT_MEASUREMENT}")
+ public final Integer PARAMETER_GROUP_ENVIRONEMENT_MEASUREMENT = null;
+
+ @Value("${ParameterGroupId.HYDROLOGIC_MEASUREMENT}")
+ public final Integer PARAMETER_GROUP_HYDROLOGIC = null;
+
+ @Value("${PmfmId.SIZE_CATEGORY}")
+ public final Integer PMFM_ID_SIZE_CATEGORY = null;
+
+ @Value("${PmfmId.SEX}")
+ public final Integer PMFM_ID_SEX = null;
+
+ @Value("${PmfmId.SORTED_UNSORTED}")
+ public final Integer PMFM_ID_SORTED_UNSORTED = null;
+
+ @Value("${PmfmId.MATURITY}")
+ public final Integer PMFM_ID_MATURITY = null;
+
+ @Value("${PmfmId.MACRO_WASTE_CATEGORY}")
+ public final Integer PMFM_ID_MACRO_WASTE_CATEGORY = null;
+
+ @Value("${PmfmId.MACRO_WASTE_SIZE_CATEGORY}")
+ public final Integer PMFM_ID_MACRO_WASTE_SIZE_CATEGORY = null;
+
+ @Value("${UnitId.NONE}")
+ public final Integer UNIT_ID_NONE = null;
+
+ @Value("${UserProfilId.OBSERVER}")
+ public final Integer USER_PROFIL_ID_OBSERVER = null;
+
+ @Value("${UserProfilId.PROJECT_MEMBER}")
+ public final Integer USER_PROFIL_ID_PROJECT_MEMBER = null;
+
+ @Value("${UserProfilId.USER}")
+ public final Integer USER_PROFIL_ID_USER = null;
+
+ @Value("${VesselTypeId.SCIENTIFIC_RESEARCH_VESSEL}")
+ public final Integer VESSEL_TYPE_ID_SCIENTIFIC = null;
+
+ @Value("${VesselTypeId.FISHING_VESSEL}")
+ public final Integer VESSEL_TYPE_ID_FISHING = null;
+
+ @Value("${LocationLevelId.RECTANGLE_STATISTIQUE_MED}")
+ public final Integer RECTANGLE_STATISTIQUE_MED = null;
+
+ @Value("${StatusCode.ENABLE}")
+ public final Integer STATUS_VALID_CODE = null;
+
+ @Value("${StatusCode.TEMPORARY}")
+ public final Integer STATUS_TEMPORARY_CODE = null;
+
+ public void init() {
+ Preconditions.checkNotNull(GEAR_CLASSIFICIATION_ID_SCIENTIFIC, "GEAR_CLASSIFICIATION_ID_SCIENTIFIC constant not found");
+ Preconditions.checkNotNull(GEAR_CLASSIFICIATION_ID_FISHING, "GEAR_CLASSIFICIATION_ID_FISHING constant not found");
+ Preconditions.checkNotNull(LOCATION_LEVEL_ID_COUNTRY, "LOCATION_LEVEL_ID_COUNTRY constant not found");
+ Preconditions.checkNotNull(LOCATION_LEVEL_ID_LOCALITE, "LOCATION_LEVEL_ID_LOCALITE constant not found");
+ Preconditions.checkNotNull(LOCATION_LEVEL_ID_PROGRAMM, "LOCATION_LEVEL_ID_PROGRAMM constant not found");
+ Preconditions.checkNotNull(LOCATION_LEVEL_ID_STRATA, "LOCATION_LEVEL_ID_STRATA constant not found");
+ Preconditions.checkNotNull(LOCATION_LEVEL_ID_SUB_STRATA, "LOCATION_LEVEL_ID_SUB_STRATA constant not found");
+ Preconditions.checkNotNull(MATRIX_ID_GEAR, "MATRIX_ID_GEAR constant not found");
+ Preconditions.checkNotNull(MATRIX_ID_INDIVIDUAL, "MATRIX_ID_INDIVIDUAL constant not found");
+ Preconditions.checkNotNull(METHOD_ID_DECLARATION, "METHOD_ID_DECLARATION constant not found");
+ Preconditions.checkNotNull(PARAMETER_CODE_AGE, "PARAMETER_CODE_AGE constant not found");
+ Preconditions.checkNotNull(PARAMETER_CODE_WEIGHT, "PARAMETER_CODE_WEIGHT constant not found");
+ Preconditions.checkNotNull(PARAMETER_GROUP_ENVIRONEMENT_MEASUREMENT, "PARAMETER_GROUP_ENVIRONEMENT_MEASUREMENT constant not found");
+ Preconditions.checkNotNull(PARAMETER_GROUP_HYDROLOGIC, "PARAMETER_GROUP_HYDROLOGIC constant not found");
+ Preconditions.checkNotNull(PMFM_ID_SIZE_CATEGORY, "PMFM_ID_SIZE_CATEGORY constant not found");
+ Preconditions.checkNotNull(PMFM_ID_SEX, "PMFM_ID_SEX constant not found");
+ Preconditions.checkNotNull(PMFM_ID_SORTED_UNSORTED, "PMFM_ID_SORTED_UNSORTED constant not found");
+ Preconditions.checkNotNull(PMFM_ID_MATURITY, "PMFM_ID_MATURITY constant not found");
+ Preconditions.checkNotNull(PMFM_ID_MACRO_WASTE_CATEGORY, "PMFM_ID_MACRO_WASTE_CATEGORY constant not found");
+ Preconditions.checkNotNull(PMFM_ID_MACRO_WASTE_SIZE_CATEGORY, "PMFM_ID_MACRO_WASTE_SIZE_CATEGORY constant not found");
+ Preconditions.checkNotNull(UNIT_ID_NONE, "UNIT_ID_NONE constant not found");
+ Preconditions.checkNotNull(USER_PROFIL_ID_OBSERVER, "USER_PROFIL_ID_OBSERVER constant not found");
+ Preconditions.checkNotNull(USER_PROFIL_ID_PROJECT_MEMBER, "USER_PROFIL_ID_PROJECT_MEMBER constant not found");
+ Preconditions.checkNotNull(USER_PROFIL_ID_USER, "USER_PROFIL_ID_USER constant not found");
+ Preconditions.checkNotNull(VESSEL_TYPE_ID_SCIENTIFIC, "VESSEL_TYPE_ID_SCIENTIFIC constant not found");
+ Preconditions.checkNotNull(VESSEL_TYPE_ID_FISHING, "VESSEL_TYPE_ID_FISHING constant not found");
+ Preconditions.checkNotNull(RECTANGLE_STATISTIQUE_MED, "LocationLevelId.RECTANGLE_STATISTIQUE_MED constant not found");
+ Preconditions.checkNotNull(STATUS_VALID_CODE, "StatusCode.ENABLE constant not found");
+ Preconditions.checkNotNull(STATUS_TEMPORARY_CODE, "StatusCode.TEMPORARY constant not found");
+ }
+}
Property changes on: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiEnumerationFile.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java
===================================================================
--- trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java 2013-01-12 17:57:25 UTC (rev 180)
+++ trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java 2013-01-12 17:59:34 UTC (rev 181)
@@ -37,25 +37,24 @@
import fr.ifremer.tutti.persistence.entities.data.SpeciesBatch;
import fr.ifremer.tutti.persistence.entities.data.SpeciesBatchFrequency;
import fr.ifremer.tutti.persistence.entities.protocol.TuttiProtocol;
-import fr.ifremer.tutti.persistence.entities.referential.AbstractTuttiReferentialEntity;
import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
-import fr.ifremer.tutti.persistence.entities.referential.CaracteristicQualitativeValue;
import fr.ifremer.tutti.persistence.entities.referential.Country;
import fr.ifremer.tutti.persistence.entities.referential.FishingOperationLocation;
import fr.ifremer.tutti.persistence.entities.referential.Gear;
import fr.ifremer.tutti.persistence.entities.referential.Person;
import fr.ifremer.tutti.persistence.entities.referential.Species;
-import fr.ifremer.tutti.persistence.entities.referential.Status;
import fr.ifremer.tutti.persistence.entities.referential.Vessel;
import fr.ifremer.tutti.persistence.entities.referential.Zone;
+import fr.ifremer.tutti.persistence.service.ReferentialPersistenceService;
+import fr.ifremer.tutti.persistence.service.TuttiPersistenceServiceLocator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Query;
import org.hibernate.SessionFactory;
-import org.hibernate.type.DateType;
import org.hibernate.type.IntegerType;
import org.hibernate.type.StringType;
import org.hibernate.type.Type;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
@@ -63,13 +62,11 @@
import java.util.Date;
import java.util.Iterator;
import java.util.List;
-import java.util.Properties;
/**
* @author tchemit <chemit(a)codelutin.com>
* @since 0.2
*/
-//@TransactionConfiguration(transactionManager = "transactionManager")
@Transactional(readOnly = true)
public class TuttiPersistenceAdagioImpl implements TuttiPersistence {
@@ -82,21 +79,18 @@
*
* @since 0.3
*/
+ @Autowired(required = true)
protected SessionFactory sessionFactory;
@Resource(name = "programDao")
protected ProgramDao programDao;
- protected Properties enumerations;
+ @Autowired(required = true)
+ protected ReferentialPersistenceService referentielService;
- public void setSessionFactory(SessionFactory sessionFactory) {
- this.sessionFactory = sessionFactory;
- }
+ @Autowired(required = true)
+ protected TuttiEnumerationFile enumeration;
- public void setEnumerations(Properties enumerations) {
- this.enumerations = enumerations;
- }
-
@Override
public String getImplementationName() {
return "Persistence Adagio implementation";
@@ -104,8 +98,9 @@
@Override
public void open() throws IOException {
- Preconditions.checkNotNull(sessionFactory, " No sessionFactory property setted");
- Preconditions.checkNotNull(enumerations, " No enumerations property setted");
+ if (log.isInfoEnabled()) {
+ log.info("Open persistence driver " + getImplementationName());
+ }
}
@Override
@@ -114,8 +109,7 @@
if (log.isInfoEnabled()) {
log.info("Close persistence driver " + getImplementationName());
}
-
- sessionFactory.close();
+ TuttiPersistenceServiceLocator.close();
}
//------------------------------------------------------------------------//
@@ -124,322 +118,127 @@
@Override
public List<Zone> getAllProgramZone() {
- Iterator<Object[]> list = queryList(
- "allProgramZones",
- "locationLevelId", IntegerType.INSTANCE, getEnumerationIntegerCode("LocationLevelId.PROGRAM"));
-
- List<Zone> result = Lists.newArrayList();
- while (list.hasNext()) {
- Object[] source = list.next();
- Zone target = new Zone();
- target.setId((String) source[0]);
- target.setName((String) source[1]);
- target.setDescription((String) source[2]);
- setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[3], target);
- result.add(target);
- }
- return result;
+ return referentielService.getAllProgramZone();
}
@Override
public List<Country> getAllCountry() {
- Iterator<Object[]> list = queryList(
- "allCountries",
- "locationLevelId", IntegerType.INSTANCE, getEnumerationIntegerCode("LocationLevelId.PAYS_ISO3"));
-
- List<Country> result = Lists.newArrayList();
- while (list.hasNext()) {
- Object[] source = list.next();
- Country target = new Country();
- target.setId(String.valueOf(source[0]));
- target.setName((String) source[1]);
- target.setDescription((String) source[2]);
- setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[3], target);
- result.add(target);
- }
- return result;
+ return referentielService.getAllCountry();
}
@Override
public List<Vessel> getAllScientificVessel() {
-
- Iterator<Object[]> list = queryList(
- "allVessels",
- "refDate", DateType.INSTANCE, new Date(),
- "vesselTypeId", IntegerType.INSTANCE, getEnumerationIntegerCode("VesselTypeId.SCIENTIFIC_RESEARCH_VESSEL"));
-
- List<Vessel> result = Lists.newArrayList();
- while (list.hasNext()) {
- Object[] source = list.next();
- Vessel target = loadVessel(source);
- result.add(target);
- }
- return result;
+ return referentielService.getAllScientificVessel();
}
@Override
public List<Vessel> getAllFishingVessel() {
- Iterator<Object[]> list = queryList(
- "allVessels",
- "refDate", DateType.INSTANCE, new Date(),
- "vesselTypeId", IntegerType.INSTANCE, getEnumerationIntegerCode("VesselTypeId.FISHING_VESSEL"));
-
- List<Vessel> result = Lists.newArrayList();
- while (list.hasNext()) {
- Object[] source = list.next();
- Vessel target = loadVessel(source);
- result.add(target);
- }
- return result;
+ return referentielService.getAllFishingVessel();
}
@Override
- public List<Gear> getAllScientificGear() {
-
- Iterator<Object[]> sources = queryList(
- "allGears",
- "gearClassificiationId", IntegerType.INSTANCE, getEnumerationIntegerCode("GearClassificationId.SCIENTIFIC_CRUISE"));
- List<Gear> result = Lists.newArrayList();
- while (sources.hasNext()) {
- Object[] source = sources.next();
- Gear target = loadGear(source);
- result.add(target);
- }
- return result;
+ public List<Species> getAllSpecies() {
+ return referentielService.getAllSpecies();
}
@Override
- public List<Gear> getAllFishingGear() {
- Iterator<Object[]> sources = queryList(
- "allGears",
- "gearClassificiationId", IntegerType.INSTANCE, getEnumerationIntegerCode("GearClassificationId.FAO"));
- List<Gear> result = Lists.newArrayList();
- while (sources.hasNext()) {
- Object[] source = sources.next();
- Gear target = loadGear(source);
- result.add(target);
- }
- return result;
+ public List<Species> getAllBenthosSpecies() {
+ return referentielService.getAllBenthosSpecies();
}
@Override
- public List<Person> getAllPerson() {
- Iterator<Object[]> list = queryList(
- "allPersons",
- "observerProfilId", IntegerType.INSTANCE, getEnumerationIntegerCode("UserProfilId.OBSERVER"),
- "projectMemberProfilId", IntegerType.INSTANCE, getEnumerationIntegerCode("UserProfilId.PROJECT_MEMBER"),
- "userProfilId", IntegerType.INSTANCE, getEnumerationIntegerCode("UserProfilId.USER")
- );
-
- List<Person> result = Lists.newArrayList();
- while (list.hasNext()) {
- Object[] source = list.next();
- Person target = loadPerson(source);
- result.add(target);
- }
- return result;
+ public List<Species> getAllPlanktonSpecies() {
+ return referentielService.getAllPlanktonSpecies();
}
@Override
- public List<Species> getAllSpecies() {
- Iterator<Object[]> sources = queryList(
- "allSpecies",
- "taxonGroupCode", IntegerType.INSTANCE, getEnumerationIntegerCode("TaxonGroupTypeCode.METIER_SPECIES"));
-
- List<Species> result = Lists.newArrayList();
- while (sources.hasNext()) {
- Object[] source = sources.next();
- Species target = loadSpecies(source);
- result.add(target);
- }
- return result;
+ public Species getSpecies(String speciesId) {
+ return referentielService.getSpecies(speciesId);
}
@Override
- public Species getSpecies(String speciesId) {
- Object[] source = queryUnique("species",
- "taxonGroupCode", IntegerType.INSTANCE, Integer.valueOf(speciesId));
-
- Species target = loadSpecies(source);
- return target;
+ public List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId) {
+ return referentielService.getAllFishingOperationStrata(zoneId);
}
@Override
- public List<Species> getAllBenthosSpecies() {
- Iterator<Object[]> sources = queryList(
- "allBenthosSpecies",
- "taxonGroupCode", IntegerType.INSTANCE, getEnumerationIntegerCode("TaxonGroupTypeCode.METIER_SPECIES"));
-
- List<Species> result = Lists.newArrayList();
- while (sources.hasNext()) {
- Object[] source = sources.next();
- Species target = loadSpecies(source);
- result.add(target);
- }
- return result;
+ public List<FishingOperationLocation> getAllFishingOperationSubStrata(String locationId) {
+ return referentielService.getAllFishingOperationSubStrata(locationId);
}
@Override
- public List<Species> getAllPlanktonSpecies() {
- Iterator<Object[]> sources = queryList(
- "allPlanktonSpecies",
- "taxonGroupCode", IntegerType.INSTANCE, getEnumerationIntegerCode("TaxonGroupTypeCode.METIER_SPECIES"));
-
- List<Species> result = Lists.newArrayList();
- while (sources.hasNext()) {
- Object[] source = sources.next();
- Species target = loadSpecies(source);
- result.add(target);
- }
- return result;
+ public List<FishingOperationLocation> getAllFishingOperationLocation(String locationId) {
+ return referentielService.getAllFishingOperationLocation(locationId);
}
@Override
- public List<Caracteristic> getAllSpeciesLengthStepCaracteristic() {
- Iterator<Object[]> sources = queryList(
- "allLengthStepCaracteristics",
- "matrixId", IntegerType.INSTANCE, getEnumerationIntegerCode("MatrixId.INDIVIDUAL"),
- "ageParameterCode", StringType.INSTANCE, getEnumerationStringCode("ParameterCode.AGE"),
- "weightParameterCode", StringType.INSTANCE, getEnumerationStringCode("ParameterCode.WEIGHT"),
- "methodDeclarationId", IntegerType.INSTANCE, getEnumerationIntegerCode("MethodId.DECLARATION"));
- List<Caracteristic> result = Lists.newArrayList();
- while (sources.hasNext()) {
- Object[] source = sources.next();
- Caracteristic target = loadCaracteristic(source);
- result.add(target);
- }
- return result;
+ public List<Caracteristic> getAllFishingOperationEnvironmentCaracteristic() {
+ return referentielService.getAllFishingOperationEnvironmentCaracteristic();
}
@Override
public List<Caracteristic> getAllFishingOperationGearCaracteristic() {
- Iterator<Object[]> sources = queryList(
- "allPmfmsByMatrixId",
- "matrixId", IntegerType.INSTANCE, getEnumerationIntegerCode("MatrixId.GEAR"));
- List<Caracteristic> result = Lists.newArrayList();
- while (sources.hasNext()) {
- Object[] source = sources.next();
- Caracteristic target = loadCaracteristic(source);
- result.add(target);
- }
- return result;
+ return referentielService.getAllFishingOperationGearCaracteristic();
}
@Override
- public List<Caracteristic> getAllFishingOperationEnvironmentCaracteristic() {
- Iterator<Object[]> sources = queryList(
- "allPmfmsByParameterGroudId",
- "parameterGroupId", IntegerType.INSTANCE, getEnumerationIntegerCode("ParameterGroupId.ENVIRONEMENT_MEASUREMENT"));
- List<Caracteristic> result = Lists.newArrayList();
- while (sources.hasNext()) {
- Object[] source = sources.next();
- Caracteristic target = loadCaracteristic(source);
- result.add(target);
- }
- return result;
+ public List<Caracteristic> getAllFishingOperationHydrologicCaracteristic() {
+ return referentielService.getAllFishingOperationHydrologicCaracteristic();
}
@Override
- public List<Caracteristic> getAllFishingOperationHydrologicCaracteristic() {
- Iterator<Object[]> sources = queryList(
- "allPmfmsByParameterGroudId",
- "parameterGroupId", IntegerType.INSTANCE, getEnumerationIntegerCode("ParameterGroupId.HYDROLOGIC_MEASUREMENT"));
- List<Caracteristic> result = Lists.newArrayList();
- while (sources.hasNext()) {
- Object[] source = sources.next();
- Caracteristic target = loadCaracteristic(source);
- result.add(target);
- }
- return result;
+ public List<Caracteristic> getAllSpeciesLengthStepCaracteristic() {
+ return referentielService.getAllSpeciesLengthStepCaracteristic();
}
@Override
- public List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId) {
- Iterator<Object[]> sources = queryList(
- "allFishingOperationStratas",
- "locationLevel", IntegerType.INSTANCE, getEnumerationIntegerCode("LocationLevelId.STRATA"));
- List<FishingOperationLocation> result = Lists.newArrayList();
- while (sources.hasNext()) {
- Object[] source = sources.next();
- FishingOperationLocation target = loadFishingOperationLocation(source);
- result.add(target);
- }
- return result;
+ public Caracteristic getSizeCategoryCaracteristic() {
+ return referentielService.getSizeCategoryCaracteristic();
}
@Override
- public List<FishingOperationLocation> getAllFishingOperationSubStrata(String locationId) {
- Iterator<Object[]> sources = queryList(
- "allFishingOperationSubStratas",
- "locationLevel", IntegerType.INSTANCE, getEnumerationIntegerCode("LocationLevelId.SUBSTRATA"));
- List<FishingOperationLocation> result = Lists.newArrayList();
- while (sources.hasNext()) {
- Object[] source = sources.next();
- FishingOperationLocation target = loadFishingOperationLocation(source);
- result.add(target);
- }
- return result;
+ public Caracteristic getSexCaracteristic() {
+ return referentielService.getSexCaracteristic();
}
@Override
- public List<FishingOperationLocation> getAllFishingOperationLocation(String locationId) {
- Iterator<Object[]> sources = queryList(
- "allFishingOperationLocalites",
- "locationLevel", IntegerType.INSTANCE, getEnumerationIntegerCode("LocationLevelId.LOCALITE"));
- List<FishingOperationLocation> result = Lists.newArrayList();
- while (sources.hasNext()) {
- Object[] source = sources.next();
- FishingOperationLocation target = loadFishingOperationLocation(source);
- result.add(target);
- }
- return result;
+ public Caracteristic getSortedUnsortedCaracteristic() {
+ return referentielService.getSortedUnsortedCaracteristic();
}
@Override
- public Caracteristic getSizeCategoryCaracteristic() {
- Integer pmfmId = getEnumerationIntegerCode("PmfmId.SIZE_CATEGORY");
- Caracteristic result = loadCaracteristic(pmfmId);
- return result;
+ public Caracteristic getMaturityCaracteristic() {
+ return referentielService.getMaturityCaracteristic();
}
@Override
- public Caracteristic getSexCaracteristic() {
- Integer pmfmId = getEnumerationIntegerCode("PmfmId.SEX");
- Caracteristic result = loadCaracteristic(pmfmId);
- return result;
+ public Caracteristic getMacroWasteCategoryCaracteristic() {
+ return referentielService.getMacroWasteCategoryCaracteristic();
}
@Override
- public Caracteristic getSortedUnsortedCaracteristic() {
- Integer pmfmId = getEnumerationIntegerCode("PmfmId.SORTED_UNSORTED");
- Caracteristic result = loadCaracteristic(pmfmId);
- return result;
+ public Caracteristic getMacroWasteSizeCategoryCaracteristic() {
+ return referentielService.getMacroWasteSizeCategoryCaracteristic();
}
@Override
- public Caracteristic getMaturityCaracteristic() {
- Integer pmfmId = getEnumerationIntegerCode("PmfmId.MATURITY");
- Caracteristic result = loadCaracteristic(pmfmId);
- return result;
+ public List<Gear> getAllScientificGear() {
+ return referentielService.getAllScientificGear();
}
@Override
- public Caracteristic getMacroWasteCategoryCaracteristic() {
- Integer pmfmId = getEnumerationIntegerCode("PmfmId.MACRO_WASTE_CATEGORY");
- Caracteristic result = loadCaracteristic(pmfmId);
- return result;
+ public List<Gear> getAllFishingGear() {
+ return referentielService.getAllFishingGear();
}
@Override
- public Caracteristic getMacroWasteSizeCategoryCaracteristic() {
- Integer pmfmId = getEnumerationIntegerCode("PmfmId.MACRO_WASTE_SIZE_CATEGORY");
- Caracteristic result = loadCaracteristic(pmfmId);
- return result;
+ public List<Person> getAllPerson() {
+ return referentielService.getAllPerson();
}
+ //------------------------------------------------------------------------//
//-- Program methods --//
//------------------------------------------------------------------------//
- //------------------------------------------------------------------------//
@Override
public List<Program> getAllProgram() {
@@ -524,7 +323,7 @@
Object[] source = queryUnique(
"cruise",
"cruiseId", StringType.INSTANCE, id,
- "locationLevelId", IntegerType.INSTANCE, getEnumerationIntegerCode("LocationLevelId.PAYS_ISO3"));
+ "locationLevelId", IntegerType.INSTANCE, enumeration.LOCATION_LEVEL_ID_LOCALITE);
Cruise result = new Cruise();
result.setId(id);
@@ -549,11 +348,11 @@
result.setEndDate((Date) source[7]);
String vesselCode = (String) source[8];
- Vessel vessel = getVessel(vesselCode);
+ Vessel vessel = referentielService.getVessel(vesselCode);
result.setVessel(Lists.newArrayList(vessel));
Integer managerId = (Integer) source[9];
- Person manager = getPerson(managerId);
+ Person manager = referentielService.getPerson(managerId);
result.setHeadOfMission(Lists.newArrayList(manager));
result.setComment((String) source[10]);
@@ -576,33 +375,6 @@
return result;
}
- protected Vessel getVessel(String vesselCode) {
- Object[] source = queryUnique(
- "vessel",
- "vesselCode", StringType.INSTANCE, vesselCode,
- "refDate", DateType.INSTANCE, new Date());
- Vessel result = loadVessel(source);
- return result;
- }
-
- protected Person getPerson(Integer personId) {
- Object[] source = queryUnique(
- "person",
- "personId", IntegerType.INSTANCE, personId);
- Person result = loadPerson(source);
- return result;
- }
-
- protected Person loadPerson(Object[] source) {
- Person target = new Person();
- target.setId(String.valueOf(source[0]));
- target.setFirstName((String) source[1]);
- target.setLastName((String) source[2]);
- target.setDepartment((String) source[3]);
- setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[4], target);
- return target;
- }
-
@Override
public Cruise createCruise(Cruise bean) {
throw new UnsupportedOperationException();
@@ -833,26 +605,6 @@
//-- Internal methods --//
//------------------------------------------------------------------------//
- protected <E extends AbstractTuttiReferentialEntity> void setStatus(fr.ifremer.adagio.core.dao.referential.Status status, E entity) {
- Status newStatus = new Status();
- newStatus.setId(status.getCode());
- newStatus.setName(status.getName());
- entity.setStatus(newStatus);
- }
-
- protected String getEnumerationStringCode(String key) {
- String result = enumerations.getProperty(key);
- Preconditions.checkNotNull(
- result,
- "Could not find enumeration code for key [" + key + ']');
- return result;
- }
-
- protected Integer getEnumerationIntegerCode(String key) {
- String value = getEnumerationStringCode(key);
- return Integer.valueOf(value);
- }
-
protected Iterator<Object[]> queryList(String queryName, Object... params) {
Query query = sessionFactory.getCurrentSession().getNamedQuery(queryName);
@@ -907,99 +659,4 @@
return (Object[]) result;
}
- protected void loadCaracteristicQualitativeValues(Caracteristic caracteristic,
- Integer pmfmId) {
- Preconditions.checkNotNull(caracteristic, "Caracteristic can not be null");
- Preconditions.checkNotNull(pmfmId, "pmfmId can not be null");
- Preconditions.checkArgument(caracteristic.isQualitativeType(),
- "Caracteristic must be a qualitativeValue type");
-
- Iterator<Object[]> sources = queryList(
- "pmfmQualitativeValues",
- "pmfmId", IntegerType.INSTANCE, pmfmId);
-
- List<CaracteristicQualitativeValue> values = Lists.newArrayList();
- while (sources.hasNext()) {
- Object[] source = sources.next();
- CaracteristicQualitativeValue target = new CaracteristicQualitativeValue();
- target.setId(String.valueOf(source[0]));
- target.setName(String.valueOf(source[1]));
- setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[2], target);
- values.add(target);
- }
- caracteristic.setQualitativeValue(values);
- }
-
- protected Caracteristic loadCaracteristic(Integer pmfmId) {
-
- Object[] source = queryUnique("pmfmById",
- "pmfmId", IntegerType.INSTANCE, pmfmId);
-
- Caracteristic target = loadCaracteristic(source);
-
- if (target.isQualitativeType()) {
-
- // load qualititative values
- loadCaracteristicQualitativeValues(target, pmfmId);
- }
- return target;
- }
-
- protected Caracteristic loadCaracteristic(Object[] source) {
-
- Caracteristic target = new Caracteristic();
- target.setId(String.valueOf(source[0]));
- target.setParameterName((String)source[1]);
- target.setMatrixName((String)source[2]);
- target.setFractionName((String)source[3]);
- target.setMethodName((String)source[4]);
- target.setNumberType((Boolean)source[5]);
- target.setQualitativeType((Boolean)source[6]);
- target.setSignifFiguresNumber((Integer)source[7]);
- target.setMaximumNumberDecimals((Integer)source[8]);
- target.setPrecision((Float)source[9]);
- target.setUnit((String)source[10]);
- setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[11], target);
- return target;
- }
-
- protected FishingOperationLocation loadFishingOperationLocation(Object[] source) {
- FishingOperationLocation target = new FishingOperationLocation();
- target.setId(String.valueOf(source[0]));
- target.setName(String.valueOf(source[1]));
- target.setLabel(String.valueOf(source[2]));
- target.setDescription(String.valueOf(source[3]));
- target.setLocationLevel(Integer.valueOf(source[4].toString()));
-
- setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[5], target);
- return target;
- }
-
- protected Species loadSpecies(Object[] source) {
- Species target = new Species();
- target.setId(String.valueOf(source[0]));
- target.setCodeMemo(String.valueOf(source[1]));
- target.setName(String.valueOf(source[2]));
- setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[3], target);
- return target;
- }
-
- protected Vessel loadVessel(Object[] source) {
- Vessel target = new Vessel();
- target.setId((String) source[0]);
- target.setRegistrationCode((String) source[1]);
- target.setInternalRegistrationCode((String) source[2]);
- target.setName((String) source[3]);
- setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[4], target);
- return target;
- }
-
- protected Gear loadGear(Object[] source) {
- Gear result = new Gear();
- result.setId(String.valueOf(source[0]));
- result.setName(String.valueOf(source[1]));
- result.setLabel(String.valueOf(source[2]));
- setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[3], result);
- return result;
- }
}
Added: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceImpl.java
===================================================================
--- trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceImpl.java (rev 0)
+++ trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceImpl.java 2013-01-12 17:59:34 UTC (rev 181)
@@ -0,0 +1,597 @@
+package fr.ifremer.tutti.persistence.service;
+
+/*
+ * #%L
+ * Tutti :: Persistence Adagio (impl)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
+import fr.ifremer.adagio.core.dao.referential.taxon.TaxonRefTaxVO;
+import fr.ifremer.adagio.core.dao.referential.taxon.TaxonSpecificDao;
+import fr.ifremer.tutti.persistence.TuttiEnumerationFile;
+import fr.ifremer.tutti.persistence.entities.referential.AbstractTuttiReferentialEntity;
+import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
+import fr.ifremer.tutti.persistence.entities.referential.CaracteristicQualitativeValue;
+import fr.ifremer.tutti.persistence.entities.referential.Country;
+import fr.ifremer.tutti.persistence.entities.referential.FishingOperationLocation;
+import fr.ifremer.tutti.persistence.entities.referential.Gear;
+import fr.ifremer.tutti.persistence.entities.referential.Person;
+import fr.ifremer.tutti.persistence.entities.referential.Species;
+import fr.ifremer.tutti.persistence.entities.referential.Status;
+import fr.ifremer.tutti.persistence.entities.referential.Vessel;
+import fr.ifremer.tutti.persistence.entities.referential.Zone;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.hibernate.Query;
+import org.hibernate.SessionFactory;
+import org.hibernate.type.DateType;
+import org.hibernate.type.IntegerType;
+import org.hibernate.type.StringType;
+import org.hibernate.type.Type;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Implementation of the {@link ReferentialPersistenceService} using a adagio
+ * data-source.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+@Transactional(readOnly = true)
+public class ReferentialPersistenceServiceImpl implements ReferentialPersistenceService {
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(ReferentialPersistenceServiceImpl.class);
+
+ /**
+ * Session factory.
+ *
+ * @since 0.3
+ */
+ @Autowired(required = true)
+ protected SessionFactory sessionFactory;
+
+ @Resource(name = "taxonSpecificDao")
+ protected TaxonSpecificDao taxonSpecificDao;
+
+ @Autowired(required = true)
+ protected TuttiEnumerationFile enumeration;
+
+ //------------------------------------------------------------------------//
+ //-- ReferentialPersistenceService implentation --//
+ //------------------------------------------------------------------------//
+
+ @Override
+ public List<Zone> getAllProgramZone() {
+ Iterator<Object[]> list = queryListWithStatus(
+ "allProgramZones",
+ "locationLevelId", IntegerType.INSTANCE, enumeration.LOCATION_LEVEL_ID_PROGRAMM);
+
+ List<Zone> result = Lists.newArrayList();
+ while (list.hasNext()) {
+ Object[] source = list.next();
+ Zone target = new Zone();
+ target.setId((String) source[0]);
+ target.setName((String) source[1]);
+ target.setDescription((String) source[2]);
+ setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[3], target);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public List<Country> getAllCountry() {
+ Iterator<Object[]> list = queryListWithStatus(
+ "allCountries",
+ "locationLevelId", IntegerType.INSTANCE, enumeration.LOCATION_LEVEL_ID_COUNTRY);
+
+ List<Country> result = Lists.newArrayList();
+ while (list.hasNext()) {
+ Object[] source = list.next();
+ Country target = new Country();
+ target.setId(String.valueOf(source[0]));
+ target.setName((String) source[1]);
+ target.setDescription((String) source[2]);
+ setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[3], target);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public List<Vessel> getAllScientificVessel() {
+
+ Iterator<Object[]> list = queryListWithStatus(
+ "allVessels",
+ "refDate", DateType.INSTANCE, new Date(),
+ "vesselTypeId", IntegerType.INSTANCE, enumeration.VESSEL_TYPE_ID_SCIENTIFIC);
+
+ List<Vessel> result = Lists.newArrayList();
+ while (list.hasNext()) {
+ Object[] source = list.next();
+ Vessel target = loadVessel(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public List<Vessel> getAllFishingVessel() {
+ Iterator<Object[]> list = queryListWithStatus(
+ "allVessels",
+ "refDate", DateType.INSTANCE, new Date(),
+ "vesselTypeId", IntegerType.INSTANCE, enumeration.VESSEL_TYPE_ID_FISHING);
+
+ List<Vessel> result = Lists.newArrayList();
+ while (list.hasNext()) {
+ Object[] source = list.next();
+ Vessel target = loadVessel(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+
+ @Override
+ public Vessel getVessel(String vesselCode) {
+ Object[] source = queryUnique(
+ "vessel",
+ "vesselCode", StringType.INSTANCE, vesselCode,
+ "refDate", DateType.INSTANCE, new Date());
+ Vessel result = loadVessel(source);
+ return result;
+ }
+
+ @Override
+ public List<Gear> getAllScientificGear() {
+
+ Iterator<Object[]> sources = queryListWithStatus(
+ "allGears",
+ "gearClassificiationId", IntegerType.INSTANCE, enumeration.GEAR_CLASSIFICIATION_ID_SCIENTIFIC);
+ List<Gear> result = Lists.newArrayList();
+ while (sources.hasNext()) {
+ Object[] source = sources.next();
+ Gear target = loadGear(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public List<Gear> getAllFishingGear() {
+ Iterator<Object[]> sources = queryListWithStatus(
+ "allGears",
+ "gearClassificiationId", IntegerType.INSTANCE, enumeration.GEAR_CLASSIFICIATION_ID_FISHING);
+ List<Gear> result = Lists.newArrayList();
+ while (sources.hasNext()) {
+ Object[] source = sources.next();
+ Gear target = loadGear(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public List<Person> getAllPerson() {
+ Iterator<Object[]> list = queryListWithStatus(
+ "allPersons",
+ "observerProfilId", IntegerType.INSTANCE, enumeration.USER_PROFIL_ID_OBSERVER,
+ "projectMemberProfilId", IntegerType.INSTANCE, enumeration.USER_PROFIL_ID_PROJECT_MEMBER,
+ "userProfilId", IntegerType.INSTANCE, enumeration.USER_PROFIL_ID_USER);
+
+ List<Person> result = Lists.newArrayList();
+ while (list.hasNext()) {
+ Object[] source = list.next();
+ Person target = loadPerson(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public Person getPerson(Integer personId) {
+ Object[] source = queryUnique(
+ "person",
+ "personId", IntegerType.INSTANCE, personId);
+ Person result = loadPerson(source);
+ return result;
+ }
+
+ @Override
+ public List<Species> getAllSpecies() {
+
+ TaxonRefTaxVO[] sources = taxonSpecificDao.getAllTaxonRefTax();
+
+ List<Species> result = Lists.newArrayList();
+ for (TaxonRefTaxVO source : sources) {
+ Species target = loadSpecies(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public Species getSpecies(String speciesId) {
+ TaxonRefTaxVO source = taxonSpecificDao.getTaxonRefTax(
+ Integer.valueOf(speciesId));
+
+ Species target = loadSpecies(source);
+ return target;
+ }
+
+ @Override
+ public List<Species> getAllBenthosSpecies() {
+ TaxonRefTaxVO[] sources = taxonSpecificDao.getAllTaxonRefTax();
+
+ List<Species> result = Lists.newArrayList();
+ for (TaxonRefTaxVO source : sources) {
+ Species target = loadSpecies(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public List<Species> getAllPlanktonSpecies() {
+ TaxonRefTaxVO[] sources = taxonSpecificDao.getAllTaxonRefTax();
+
+ List<Species> result = Lists.newArrayList();
+ for (TaxonRefTaxVO source : sources) {
+ Species target = loadSpecies(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public List<Caracteristic> getAllSpeciesLengthStepCaracteristic() {
+ Iterator<Object[]> sources = queryListWithStatus(
+ "allLengthStepCaracteristics",
+ "matrixId", IntegerType.INSTANCE, enumeration.MATRIX_ID_INDIVIDUAL,
+ "ageParameterCode", StringType.INSTANCE, enumeration.PARAMETER_CODE_AGE,
+ "weightParameterCode", StringType.INSTANCE, enumeration.PARAMETER_CODE_WEIGHT,
+ "methodDeclarationId", IntegerType.INSTANCE, enumeration.METHOD_ID_DECLARATION);
+ List<Caracteristic> result = Lists.newArrayList();
+ while (sources.hasNext()) {
+ Object[] source = sources.next();
+ Caracteristic target = loadCaracteristic(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public List<Caracteristic> getAllFishingOperationGearCaracteristic() {
+ Iterator<Object[]> sources = queryListWithStatus(
+ "allPmfmsByMatrixId",
+ "matrixId", IntegerType.INSTANCE, enumeration.MATRIX_ID_GEAR,
+ "unitIdNone", IntegerType.INSTANCE, enumeration.UNIT_ID_NONE);
+ List<Caracteristic> result = Lists.newArrayList();
+ while (sources.hasNext()) {
+ Object[] source = sources.next();
+ Caracteristic target = loadCaracteristic(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public List<Caracteristic> getAllFishingOperationEnvironmentCaracteristic() {
+ Iterator<Object[]> sources = queryListWithStatus(
+ "allPmfmsByParameterGroudId",
+ "parameterGroupId", IntegerType.INSTANCE, enumeration.PARAMETER_GROUP_ENVIRONEMENT_MEASUREMENT,
+ "unitIdNone", IntegerType.INSTANCE, enumeration.UNIT_ID_NONE);
+ List<Caracteristic> result = Lists.newArrayList();
+ while (sources.hasNext()) {
+ Object[] source = sources.next();
+ Caracteristic target = loadCaracteristic(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public List<Caracteristic> getAllFishingOperationHydrologicCaracteristic() {
+ Iterator<Object[]> sources = queryListWithStatus(
+ "allPmfmsByParameterGroudId",
+ "parameterGroupId", IntegerType.INSTANCE, enumeration.PARAMETER_GROUP_HYDROLOGIC,
+ "unitIdNone", IntegerType.INSTANCE, enumeration.UNIT_ID_NONE);
+ List<Caracteristic> result = Lists.newArrayList();
+ while (sources.hasNext()) {
+ Object[] source = sources.next();
+ Caracteristic target = loadCaracteristic(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId) {
+ Iterator<Object[]> sources = queryListWithStatus(
+ "allFishingOperationStratas",
+ "locationLevel", IntegerType.INSTANCE, enumeration.LOCATION_LEVEL_ID_STRATA);
+ List<FishingOperationLocation> result = Lists.newArrayList();
+ while (sources.hasNext()) {
+ Object[] source = sources.next();
+ FishingOperationLocation target = loadFishingOperationLocation(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public List<FishingOperationLocation> getAllFishingOperationSubStrata(String locationId) {
+ Iterator<Object[]> sources = queryListWithStatus(
+ "allFishingOperationSubStratas",
+ "locationLevel", IntegerType.INSTANCE, enumeration.LOCATION_LEVEL_ID_SUB_STRATA);
+ List<FishingOperationLocation> result = Lists.newArrayList();
+ while (sources.hasNext()) {
+ Object[] source = sources.next();
+ FishingOperationLocation target = loadFishingOperationLocation(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public List<FishingOperationLocation> getAllFishingOperationLocation(String locationId) {
+ Iterator<Object[]> sources = queryListWithStatus(
+ "allFishingOperationLocalites",
+ "locationLevel", IntegerType.INSTANCE, enumeration.LOCATION_LEVEL_ID_LOCALITE);
+ List<FishingOperationLocation> result = Lists.newArrayList();
+ while (sources.hasNext()) {
+ Object[] source = sources.next();
+ FishingOperationLocation target = loadFishingOperationLocation(source);
+ result.add(target);
+ }
+ return result;
+ }
+
+ @Override
+ public Caracteristic getSizeCategoryCaracteristic() {
+ Integer pmfmId = enumeration.PMFM_ID_SIZE_CATEGORY;
+ Caracteristic result = loadCaracteristic(pmfmId);
+ return result;
+ }
+
+ @Override
+ public Caracteristic getSexCaracteristic() {
+ Integer pmfmId = enumeration.PMFM_ID_SEX;
+ Caracteristic result = loadCaracteristic(pmfmId);
+ return result;
+ }
+
+ @Override
+ public Caracteristic getSortedUnsortedCaracteristic() {
+ Integer pmfmId = enumeration.PMFM_ID_SORTED_UNSORTED;
+ Caracteristic result = loadCaracteristic(pmfmId);
+ return result;
+ }
+
+ @Override
+ public Caracteristic getMaturityCaracteristic() {
+ Integer pmfmId = enumeration.PMFM_ID_MATURITY;
+ Caracteristic result = loadCaracteristic(pmfmId);
+ return result;
+ }
+
+ @Override
+ public Caracteristic getMacroWasteCategoryCaracteristic() {
+ Integer pmfmId = enumeration.PMFM_ID_MACRO_WASTE_CATEGORY;
+ Caracteristic result = loadCaracteristic(pmfmId);
+ return result;
+ }
+
+ @Override
+ public Caracteristic getMacroWasteSizeCategoryCaracteristic() {
+ Integer pmfmId = enumeration.PMFM_ID_MACRO_WASTE_SIZE_CATEGORY;
+ Caracteristic result = loadCaracteristic(pmfmId);
+ return result;
+ }
+
+ //------------------------------------------------------------------------//
+ //-- Internal methods --//
+ //------------------------------------------------------------------------//
+
+ protected <E extends AbstractTuttiReferentialEntity> void setStatus(fr.ifremer.adagio.core.dao.referential.Status status, E entity) {
+ Status newStatus = new Status();
+ newStatus.setId(status.getCode());
+ newStatus.setName(status.getName());
+ entity.setStatus(newStatus);
+ }
+
+ protected void loadCaracteristicQualitativeValues(Caracteristic caracteristic,
+ Integer pmfmId) {
+ Preconditions.checkNotNull(caracteristic, "Caracteristic can not be null");
+ Preconditions.checkNotNull(pmfmId, "pmfmId can not be null");
+ Preconditions.checkArgument(caracteristic.isQualitativeType(),
+ "Caracteristic must be a qualitativeValue type");
+
+ Iterator<Object[]> sources = queryListWithStatus(
+ "pmfmQualitativeValues",
+ "pmfmId", IntegerType.INSTANCE, pmfmId);
+
+ List<CaracteristicQualitativeValue> values = Lists.newArrayList();
+ while (sources.hasNext()) {
+ Object[] source = sources.next();
+ CaracteristicQualitativeValue target = new CaracteristicQualitativeValue();
+ target.setId(String.valueOf(source[0]));
+ target.setName(String.valueOf(source[1]));
+ setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[2], target);
+ values.add(target);
+ }
+ caracteristic.setQualitativeValue(values);
+ }
+
+ protected Caracteristic loadCaracteristic(Integer pmfmId) {
+
+ Object[] source = queryUniqueWithStatus("pmfmById",
+ "pmfmId", IntegerType.INSTANCE, pmfmId,
+ "unitIdNone", IntegerType.INSTANCE, enumeration.UNIT_ID_NONE);
+
+ Caracteristic target = loadCaracteristic(source);
+
+ if (target.isQualitativeType()) {
+
+ // load qualititative values
+ loadCaracteristicQualitativeValues(target, pmfmId);
+ }
+ return target;
+ }
+
+ protected Caracteristic loadCaracteristic(Object[] source) {
+
+ Caracteristic target = new Caracteristic();
+ target.setId(String.valueOf(source[0]));
+ target.setParameterName((String) source[1]);
+ target.setMatrixName((String) source[2]);
+ target.setFractionName((String) source[3]);
+ target.setMethodName((String) source[4]);
+ target.setNumberType((Boolean) source[5]);
+ target.setQualitativeType((Boolean) source[6]);
+ target.setSignifFiguresNumber((Integer) source[7]);
+ target.setMaximumNumberDecimals((Integer) source[8]);
+ target.setPrecision((Float) source[9]);
+ target.setUnit((String) source[10]);
+ setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[11], target);
+ return target;
+ }
+
+ protected FishingOperationLocation loadFishingOperationLocation(Object[] source) {
+ FishingOperationLocation target = new FishingOperationLocation();
+ target.setId(String.valueOf(source[0]));
+ target.setName(String.valueOf(source[1]));
+ target.setLabel(String.valueOf(source[2]));
+ target.setDescription(String.valueOf(source[3]));
+ target.setLocationLevel(Integer.valueOf(source[4].toString()));
+
+ setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[5], target);
+ return target;
+ }
+
+ protected Species loadSpecies(TaxonRefTaxVO source) {
+ Species target = new Species();
+ target.setId(String.valueOf(source.getReferenceTaxonId()));
+ target.setName(source.getName());
+ target.setCodeMemo(source.getRefTaxCode());
+ setStatus(source.getStatus(), target);
+ return target;
+ }
+
+ protected Vessel loadVessel(Object[] source) {
+ Vessel target = new Vessel();
+ target.setId((String) source[0]);
+ target.setRegistrationCode((String) source[1]);
+ target.setInternalRegistrationCode((String) source[2]);
+ target.setName((String) source[3]);
+ setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[4], target);
+ return target;
+ }
+
+ protected Gear loadGear(Object[] source) {
+ Gear result = new Gear();
+ result.setId(String.valueOf(source[0]));
+ result.setName(String.valueOf(source[1]));
+ result.setLabel(String.valueOf(source[2]));
+ setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[3], result);
+ return result;
+ }
+
+ protected Person loadPerson(Object[] source) {
+ Person target = new Person();
+ target.setId(String.valueOf(source[0]));
+ target.setFirstName((String) source[1]);
+ target.setLastName((String) source[2]);
+ target.setDepartment((String) source[3]);
+ setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[4], target);
+ return target;
+ }
+
+ protected Iterator<Object[]> queryListWithStatus(String queryName,
+ Object... params) {
+ Query query = createQuery(queryName, params);
+ query.setString("statusValidCode", enumeration.STATUS_VALID_CODE.toString());
+ query.setString("statusTemporaryCode", enumeration.STATUS_TEMPORARY_CODE.toString());
+
+ Iterator result = query.iterate();
+ return result;
+ }
+
+ protected Iterator<Object[]> queryList(String queryName, Object... params) {
+ Query query = createQuery(queryName, params);
+ Iterator result = query.iterate();
+ return result;
+ }
+
+ protected Object[] queryUniqueWithStatus(String queryName, Object... params) {
+
+ Query query = createQuery(queryName, params);
+ query.setString("statusValidCode", enumeration.STATUS_VALID_CODE.toString());
+ query.setString("statusTemporaryCode", enumeration.STATUS_TEMPORARY_CODE.toString());
+
+ Object result = query.uniqueResult();
+ return (Object[]) result;
+ }
+
+ protected Object[] queryUnique(String queryName, Object... params) {
+
+ Query query = createQuery(queryName, params);
+ Object result = query.uniqueResult();
+ return (Object[]) result;
+ }
+
+ protected Query createQuery(String queryName, Object... params) {
+ Query query = sessionFactory.getCurrentSession().getNamedQuery(queryName);
+
+ if (params.length > 0) {
+
+ Preconditions.checkArgument(
+ params.length % 3 == 0,
+ "Params must be tuple (paramName, paramType, paramValue)");
+
+ int nbParams = params.length / 3;
+
+ for (int i = 0; i < nbParams; i++) {
+ String paramName = (String) params[3 * i];
+ Type paramType = (Type) params[3 * i + 1];
+ Object paramValue = params[3 * i + 2];
+ query.setParameter(paramName, paramValue, paramType);
+ if (log.isDebugEnabled()) {
+ log.debug("query [" + queryName + "] (param " + i
+ + " [" + paramName + '=' + paramValue + "])");
+ }
+ }
+ }
+ return query;
+ }
+
+
+}
Property changes on: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceImpl.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/TuttiPersistenceServiceLocator.java
===================================================================
--- trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/TuttiPersistenceServiceLocator.java (rev 0)
+++ trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/TuttiPersistenceServiceLocator.java 2013-01-12 17:59:34 UTC (rev 181)
@@ -0,0 +1,59 @@
+package fr.ifremer.tutti.persistence.service;
+
+/*
+ * #%L
+ * Tutti :: Persistence Adagio (impl)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.adagio.core.service.ServiceLocator;
+import fr.ifremer.tutti.persistence.TuttiPersistence;
+
+/**
+ * To obtain services from spring context.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class TuttiPersistenceServiceLocator extends ServiceLocator {
+
+ protected static final TuttiPersistenceServiceLocator INSTANCE =
+ new TuttiPersistenceServiceLocator();
+
+ protected TuttiPersistenceServiceLocator() {
+ super("beanRefFactory.xml",
+ "TuttiBeanRefFactory");
+ }
+
+ public static TuttiPersistence getPersistenceService() {
+ return INSTANCE.getService("adagioPersistenceService",
+ TuttiPersistence.class);
+ }
+
+ public static ReferentialPersistenceService getReferentialPersistenceService() {
+ return INSTANCE.getService("referentialPersistenceService",
+ ReferentialPersistenceService.class);
+ }
+
+ public static void close() {
+ INSTANCE.shutdown();
+ }
+}
Property changes on: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/service/TuttiPersistenceServiceLocator.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/tutti-persistence-adagio/src/main/resources/applicationContext-service-tutti.xml
===================================================================
--- trunk/tutti-persistence-adagio/src/main/resources/applicationContext-service-tutti.xml 2013-01-12 17:57:25 UTC (rev 180)
+++ trunk/tutti-persistence-adagio/src/main/resources/applicationContext-service-tutti.xml 2013-01-12 17:59:34 UTC (rev 181)
@@ -24,41 +24,44 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="
- http://www.springframework.org/schema/tx
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
- <!--<context:component-scan base-package="fr.ifremer.adagio.core.service" />-->
- <!-- Activates various annotations to be detected in bean classes: Spring's
- @Required and @Autowired, as well as JSR 250's @PostConstruct, @PreDestroy
- and @Resource (if available) and JPA's @PersistenceContext and @PersistenceUnit
- (if available). -->
- <!--<context:annotation-config />-->
+ <!-- Activates various annotations to be detected in bean classes: Spring's
+ @Required and @Autowired, as well as JSR 250's @PostConstruct, @PreDestroy
+ and @Resource (if available) and JPA's @PersistenceContext and @PersistenceUnit
+ (if available). -->
+ <context:annotation-config />
- <!--Platform Transaction Manager declared as "transactionManager" will be
- used. -->
- <!--"aspectj" mode enables load-time/compile-time weaving of transactional
- methods, which enables those methods to be intercepted even when called internally.
- (Unlike Spring generated proxies which will only be intercepted when called
- from outside) -->
- <tx:annotation-driven transaction-manager="transactionManager" />
+ <!--Platform Transaction Manager declared as "transactionManager" will be
+ used. -->
+ <!--"aspectj" mode enables load-time/compile-time weaving of transactional
+ methods, which enables those methods to be intercepted even when called internally.
+ (Unlike Spring generated proxies which will only be intercepted when called
+ from outside) -->
+ <tx:annotation-driven transaction-manager="transactionManager"/>
- <bean id="adagioPersistenceService" destroy-method="close"
- class="fr.ifremer.tutti.persistence.TuttiPersistenceAdagioImpl">
- <property name="sessionFactory" ref="sessionFactory" />
- </bean>
+ <bean id="locationService"
+ class="fr.ifremer.adagio.core.service.referential.location.impl.LocationServiceImpl"/>
- <!--Enables the use of @AspectJ style of aspects' declarations. AspectJ
- run-time isn't necessarily involved -->
- <!--<aop:aspectj-autoproxy />-->
+ <bean id="referentialPersistenceService"
+ class="fr.ifremer.tutti.persistence.service.ReferentialPersistenceServiceImpl"/>
+ <bean id="adagioPersistenceService" init-method="open" destroy-method="close"
+ class="fr.ifremer.tutti.persistence.TuttiPersistenceAdagioImpl"/>
+
+ <bean init-method="init"
+ class="fr.ifremer.tutti.persistence.TuttiEnumerationFile"/>
+
+ <!--Enables the use of @AspectJ style of aspects' declarations. AspectJ
+ run-time isn't necessarily involved -->
+ <!--<aop:aspectj-autoproxy />-->
+
<!--bean id="dataSource2"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
@@ -93,372 +96,372 @@
</props>
</property-->
- <!--property name="mappingResources">
+ <!--property name="mappingResources">
+ <list>
+ <value>queries-override2.hbm.xml</value>
+ <value>file:///home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/Author.hbm.xml</value>
+ </list>
+ </property-->
+ <!--property name="mappingLocations">
<list>
- <value>queries-override2.hbm.xml</value>
- <value>file:///home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/Author.hbm.xml</value>
+ <value>classpath:queries.hbm.xml</value>
+ <value>classpath:queries-override.hbm.xml</value>
+ <value>file:///home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/PersonSessionVessel.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/user/UserProfil.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/user/PersonSession.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/user/VesselManagePeriod.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/user/ManagedDataTransfer.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/user/ManagedDataType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/user/DepartmentPrivilegeTransfert.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/user/Person.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/user/ManagedData.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/user/ageReader/AgeReaderQualification.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/user/Department.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/Strategy.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/PmfmAppliedStrategy.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/ReferenceTaxonStrategy.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/AppliedStrategy.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/AppliedPeriod.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/Program2Person.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/Program.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/AcquisitionLevel.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/BatchModelAppliedStrategy.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/Program2Department.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/ProgramPrivilege.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/PmfmStrategy.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/technical/optimization/grouping/GroupingVesselHierarchy.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/technical/optimization/grouping/GroupingItemHierarchy.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/technical/optimization/location/LocationHierarchyException.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/technical/optimization/location/LocationHierarchy.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/DepthGradient.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/NearbySpecificArea.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/regulation/RegulationArea2RegulationLocation.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/regulation/RegulationArea.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/regulation/Corpus.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/regulation/CorpusType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/regulation/RightToProduce.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/regulation/MinimumSizeAllowed.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/regulation/Fishery.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/seller/SellerType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/seller/Seller.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/PrecisionType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingItem.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingSystem.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingItemType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingSide.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/ProcessingStatus.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/DistanceToCoastGradient.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/spatial/SpatialItem.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemLine.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemArea.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/spatial/SpatialItem2Location.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemPoint.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/SurveyQualification.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/VesselType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/ObjectType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/Status.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/ProcessingType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/LinkedItemType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/gear/GearClassification.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/gear/GearClassificationAssociation.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/gear/GearAssociation.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/gear/Gear.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/location/Location.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/location/LocationClassification.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/location/LocationLevel.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/location/LocationAssociation.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/samplingScheme/denormalized/DenormalizedSamplingStrata.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/buyer/Buyer.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/buyer/BuyerType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/grouping/GroupingClassification.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/grouping/GroupingItem.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/grouping/Grouping.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/grouping/GroupingLevel.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/PhotoType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/SaleType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroup.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroupHistoricalRecord.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/ReferenceDocument.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroupType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/Citation.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonInformation.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroupInformation.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonNameHistory.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/Author.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/ReferenceTaxon.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonInformationHistory.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonName.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonomicLevel.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/VirtualComponent.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/VesselOwner.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/EducationGrade.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/VesselFeatures.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/VesselRegistrationPeriod.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/VesselOwnerPeriod.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/VesselEngineType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/VesselMasterPeriod.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/Vessel.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/VesselMaster.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/metier/Metier.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/order/OrderItem.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/order/OrderType.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/conversion/UnitConversion.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/conversion/WeightLengthConversion.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/conversion/RoundWeightConversion.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/qualification/QualificationRule.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/Matrix.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/Unit.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/ParameterGroup.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/Fraction.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/Method.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/Pmfm.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/Parameter.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/AggregationLevel.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/QualitativeValue.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/NumericalPrecision.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/QualityFlag.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/referential/AnalysisInstrument.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/batch/BatchExhaustiveInventory.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/batch/BatchModel.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/batch/Batch.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/batch/denormalized/DenormalizedBatch.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/batch/denormalized/DenormalisedBatchSortingValue.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/qualification/AppliedQualificationRule.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/qualification/QualifiedItem.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/survey/takeOver/TakeOver.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/survey/physicalGear/PhysicalGearSurvey.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/survey/declaration/DeclaredDocumentReference.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/survey/economy/EconomicalSurvey.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/survey/activity/ActivityCalendar.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/survey/activity/DailyActivityCalendar.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/survey/sale/SaleOrigin.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/survey/sale/Sale.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/survey/fishingTrip/FishingTrip.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/survey/fishingTrip/FishingTripOrigin.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/survey/scientificCruise/ScientificCruise.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/survey/fishingEffort/FishingEffortCalendar.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/survey/landing/LandingOrigin.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/survey/landing/Landing.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/sale/ExpectedSale.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/fishingArea/FishingArea2RegulationLocation.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/fishingArea/FishingArea.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/operation/denormalized/DenormalizedOperation.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/operation/Operation.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/operation/OperationVesselAssociation.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/sample/Sample.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/transshipment/Transshipment.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/measure/LandingMeasurement.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/measure/VesselPhysicalMeasurement.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/measure/QuantificationMeasurement.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/measure/VesselUseMeasurement.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/measure/file/MeasurementFile.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/measure/VesselPositionMeasurement.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/measure/SaleMeasurement.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/measure/photo/Photo.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/measure/TakeOverMeasurement.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/measure/GearUseMeasurement.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/measure/SortingMeasurement.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/measure/SampleMeasurement.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/measure/SurveyMeasurement.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/measure/GearPhysicalMeasurement.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/link/LinkedItem.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/produce/Produce.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/history/UpdatedItemHistory.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/history/InsertedItemHistory.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/history/ProcessingHistory.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/history/DeletedItemHistory.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/position/VesselPosition.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/physical/GearPhysicalFeatures.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/physical/VesselPhysicalFeaturesOrigin.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/physical/VesselPhysicalFeatures.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/physical/GearPhysicalFeaturesOrigin.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/use/VesselUseFeaturesOrigin.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/use/GearUseFeaturesOrigin.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/use/VesselUseFeatures.hbm.xml</value>
+ <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/use/GearUseFeatures.hbm.xml</value>
</list>
- </property-->
- <!--property name="mappingLocations">
- <list>
- <value>classpath:queries.hbm.xml</value>
- <value>classpath:queries-override.hbm.xml</value>
- <value>file:///home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/PersonSessionVessel.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/user/UserProfil.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/user/PersonSession.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/user/VesselManagePeriod.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/user/ManagedDataTransfer.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/user/ManagedDataType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/user/DepartmentPrivilegeTransfert.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/user/Person.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/user/ManagedData.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/user/ageReader/AgeReaderQualification.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/user/Department.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/Strategy.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/PmfmAppliedStrategy.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/ReferenceTaxonStrategy.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/AppliedStrategy.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/AppliedPeriod.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/Program2Person.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/Program.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/AcquisitionLevel.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/BatchModelAppliedStrategy.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/Program2Department.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/ProgramPrivilege.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/administration/programStrategy/PmfmStrategy.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/technical/optimization/grouping/GroupingVesselHierarchy.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/technical/optimization/grouping/GroupingItemHierarchy.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/technical/optimization/location/LocationHierarchyException.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/technical/optimization/location/LocationHierarchy.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/DepthGradient.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/NearbySpecificArea.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/regulation/RegulationArea2RegulationLocation.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/regulation/RegulationArea.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/regulation/Corpus.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/regulation/CorpusType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/regulation/RightToProduce.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/regulation/MinimumSizeAllowed.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/regulation/Fishery.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/seller/SellerType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/seller/Seller.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/PrecisionType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingItem.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingSystem.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingItemType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingSide.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/ProcessingStatus.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/DistanceToCoastGradient.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/spatial/SpatialItem.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemLine.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemArea.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/spatial/SpatialItem2Location.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemPoint.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/SurveyQualification.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/VesselType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/ObjectType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/Status.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/ProcessingType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/LinkedItemType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/gear/GearClassification.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/gear/GearClassificationAssociation.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/gear/GearAssociation.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/gear/Gear.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/location/Location.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/location/LocationClassification.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/location/LocationLevel.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/location/LocationAssociation.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/samplingScheme/denormalized/DenormalizedSamplingStrata.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/buyer/Buyer.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/buyer/BuyerType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/grouping/GroupingClassification.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/grouping/GroupingItem.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/grouping/Grouping.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/grouping/GroupingLevel.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/PhotoType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/SaleType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroup.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroupHistoricalRecord.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/ReferenceDocument.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroupType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/Citation.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonInformation.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroupInformation.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonNameHistory.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/Author.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/ReferenceTaxon.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonInformationHistory.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonName.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/TaxonomicLevel.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/taxon/VirtualComponent.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/VesselOwner.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/EducationGrade.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/VesselFeatures.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/VesselRegistrationPeriod.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/VesselOwnerPeriod.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/VesselEngineType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/VesselMasterPeriod.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/Vessel.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/vessel/VesselMaster.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/metier/Metier.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/order/OrderItem.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/order/OrderType.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/conversion/UnitConversion.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/conversion/WeightLengthConversion.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/conversion/RoundWeightConversion.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/qualification/QualificationRule.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/Matrix.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/Unit.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/ParameterGroup.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/Fraction.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/Method.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/Pmfm.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/Parameter.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/AggregationLevel.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/pmfm/QualitativeValue.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/NumericalPrecision.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/QualityFlag.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/referential/AnalysisInstrument.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/batch/BatchExhaustiveInventory.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/batch/BatchModel.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/batch/Batch.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/batch/denormalized/DenormalizedBatch.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/batch/denormalized/DenormalisedBatchSortingValue.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/qualification/AppliedQualificationRule.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/qualification/QualifiedItem.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/survey/takeOver/TakeOver.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/survey/physicalGear/PhysicalGearSurvey.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/survey/declaration/DeclaredDocumentReference.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/survey/economy/EconomicalSurvey.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/survey/activity/ActivityCalendar.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/survey/activity/DailyActivityCalendar.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/survey/sale/SaleOrigin.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/survey/sale/Sale.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/survey/fishingTrip/FishingTrip.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/survey/fishingTrip/FishingTripOrigin.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/survey/scientificCruise/ScientificCruise.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/survey/fishingEffort/FishingEffortCalendar.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/survey/landing/LandingOrigin.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/survey/landing/Landing.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/sale/ExpectedSale.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/fishingArea/FishingArea2RegulationLocation.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/fishingArea/FishingArea.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/operation/denormalized/DenormalizedOperation.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/operation/Operation.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/operation/OperationVesselAssociation.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/sample/Sample.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/transshipment/Transshipment.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/measure/LandingMeasurement.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/measure/VesselPhysicalMeasurement.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/measure/QuantificationMeasurement.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/measure/VesselUseMeasurement.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/measure/file/MeasurementFile.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/measure/VesselPositionMeasurement.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/measure/SaleMeasurement.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/measure/photo/Photo.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/measure/TakeOverMeasurement.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/measure/GearUseMeasurement.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/measure/SortingMeasurement.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/measure/SampleMeasurement.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/measure/SurveyMeasurement.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/measure/GearPhysicalMeasurement.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/link/LinkedItem.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/produce/Produce.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/history/UpdatedItemHistory.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/history/InsertedItemHistory.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/history/ProcessingHistory.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/history/DeletedItemHistory.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/position/VesselPosition.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/physical/GearPhysicalFeatures.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/physical/VesselPhysicalFeaturesOrigin.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/physical/VesselPhysicalFeatures.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/physical/GearPhysicalFeaturesOrigin.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/use/VesselUseFeaturesOrigin.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/use/GearUseFeaturesOrigin.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/use/VesselUseFeatures.hbm.xml</value>
- <value>classpath:fr/ifremer/adagio/core/dao/data/vessel/feature/use/GearUseFeatures.hbm.xml</value>
- </list>
- </property-->
- <!--property name="mappingLocations">
- <list>
- <value>queries-override2.hbm.xml</value>
- <value>file:///home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/Author.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/PersonSessionVessel.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/UserProfil.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/PersonSession.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/VesselManagePeriod.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/ManagedDataTransfer.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/ManagedDataType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/DepartmentPrivilegeTransfert.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/Person.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/ManagedData.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/ageReader/AgeReaderQualification.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/Department.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/Strategy.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/PmfmAppliedStrategy.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/ReferenceTaxonStrategy.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/AppliedStrategy.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/AppliedPeriod.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/Program2Person.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/Program.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/AcquisitionLevel.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/BatchModelAppliedStrategy.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/Program2Department.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/ProgramPrivilege.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/PmfmStrategy.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/technical/optimization/grouping/GroupingVesselHierarchy.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/technical/optimization/grouping/GroupingItemHierarchy.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/technical/optimization/location/LocationHierarchyException.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/technical/optimization/location/LocationHierarchy.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/DepthGradient.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/NearbySpecificArea.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/regulation/RegulationArea2RegulationLocation.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/regulation/RegulationArea.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/regulation/Corpus.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/regulation/CorpusType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/regulation/RightToProduce.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/regulation/MinimumSizeAllowed.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/regulation/Fishery.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/seller/SellerType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/seller/Seller.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/PrecisionType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingItem.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingSystem.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingItemType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingSide.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/ProcessingStatus.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/DistanceToCoastGradient.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/spatial/SpatialItem.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemLine.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemArea.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/spatial/SpatialItem2Location.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemPoint.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/SurveyQualification.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/VesselType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/ObjectType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/Status.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/ProcessingType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/LinkedItemType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/gear/GearClassification.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/gear/GearClassificationAssociation.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/gear/GearAssociation.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/gear/Gear.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/location/Location.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/location/LocationClassification.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/location/LocationLevel.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/location/LocationAssociation.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/samplingScheme/denormalized/DenormalizedSamplingStrata.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/buyer/Buyer.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/buyer/BuyerType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/grouping/GroupingClassification.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/grouping/GroupingItem.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/grouping/Grouping.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/grouping/GroupingLevel.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/PhotoType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/SaleType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroup.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroupHistoricalRecord.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/ReferenceDocument.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroupType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/Citation.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonInformation.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroupInformation.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonNameHistory.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/Author.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/ReferenceTaxon.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonInformationHistory.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonName.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonomicLevel.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/VirtualComponent.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/VesselOwner.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/EducationGrade.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/VesselFeatures.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/VesselRegistrationPeriod.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/VesselOwnerPeriod.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/VesselEngineType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/VesselMasterPeriod.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/Vessel.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/VesselMaster.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/metier/Metier.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/order/OrderItem.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/order/OrderType.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/conversion/UnitConversion.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/conversion/WeightLengthConversion.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/conversion/RoundWeightConversion.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/qualification/QualificationRule.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/Matrix.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/Unit.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/ParameterGroup.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/Fraction.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/Method.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/Pmfm.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/Parameter.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/AggregationLevel.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/QualitativeValue.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/NumericalPrecision.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/QualityFlag.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/AnalysisInstrument.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/batch/BatchExhaustiveInventory.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/batch/BatchModel.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/batch/Batch.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/batch/denormalized/DenormalizedBatch.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/batch/denormalized/DenormalisedBatchSortingValue.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/qualification/AppliedQualificationRule.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/qualification/QualifiedItem.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/takeOver/TakeOver.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/physicalGear/PhysicalGearSurvey.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/declaration/DeclaredDocumentReference.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/economy/EconomicalSurvey.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/activity/ActivityCalendar.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/activity/DailyActivityCalendar.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/sale/SaleOrigin.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/sale/Sale.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/fishingTrip/FishingTrip.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/fishingTrip/FishingTripOrigin.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/scientificCruise/ScientificCruise.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/fishingEffort/FishingEffortCalendar.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/landing/LandingOrigin.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/landing/Landing.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/sale/ExpectedSale.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/fishingArea/FishingArea2RegulationLocation.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/fishingArea/FishingArea.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/operation/denormalized/DenormalizedOperation.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/operation/Operation.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/operation/OperationVesselAssociation.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/sample/Sample.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/transshipment/Transshipment.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/LandingMeasurement.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/VesselPhysicalMeasurement.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/QuantificationMeasurement.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/VesselUseMeasurement.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/file/MeasurementFile.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/VesselPositionMeasurement.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/SaleMeasurement.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/photo/Photo.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/TakeOverMeasurement.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/GearUseMeasurement.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/SortingMeasurement.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/SampleMeasurement.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/SurveyMeasurement.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/GearPhysicalMeasurement.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/link/LinkedItem.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/produce/Produce.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/history/UpdatedItemHistory.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/history/InsertedItemHistory.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/history/ProcessingHistory.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/history/DeletedItemHistory.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/position/VesselPosition.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/physical/GearPhysicalFeatures.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/physical/VesselPhysicalFeaturesOrigin.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/physical/VesselPhysicalFeatures.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/physical/GearPhysicalFeaturesOrigin.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/use/VesselUseFeaturesOrigin.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/use/GearUseFeaturesOrigin.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/use/VesselUseFeatures.hbm.xml</value>
- <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/use/GearUseFeatures.hbm.xml</value>
- </list>
- </property-->
+ </property-->
+ <!--property name="mappingLocations">
+ <list>
+ <value>queries-override2.hbm.xml</value>
+ <value>file:///home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/Author.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/PersonSessionVessel.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/UserProfil.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/PersonSession.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/VesselManagePeriod.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/ManagedDataTransfer.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/ManagedDataType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/DepartmentPrivilegeTransfert.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/Person.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/ManagedData.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/ageReader/AgeReaderQualification.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/user/Department.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/Strategy.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/PmfmAppliedStrategy.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/ReferenceTaxonStrategy.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/AppliedStrategy.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/AppliedPeriod.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/Program2Person.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/Program.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/AcquisitionLevel.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/BatchModelAppliedStrategy.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/Program2Department.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/ProgramPrivilege.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/administration/programStrategy/PmfmStrategy.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/technical/optimization/grouping/GroupingVesselHierarchy.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/technical/optimization/grouping/GroupingItemHierarchy.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/technical/optimization/location/LocationHierarchyException.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/technical/optimization/location/LocationHierarchy.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/DepthGradient.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/NearbySpecificArea.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/regulation/RegulationArea2RegulationLocation.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/regulation/RegulationArea.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/regulation/Corpus.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/regulation/CorpusType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/regulation/RightToProduce.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/regulation/MinimumSizeAllowed.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/regulation/Fishery.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/seller/SellerType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/seller/Seller.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/PrecisionType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingItem.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingSystem.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingItemType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/transcribing/TranscribingSide.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/ProcessingStatus.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/DistanceToCoastGradient.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/spatial/SpatialItem.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemLine.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemArea.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/spatial/SpatialItem2Location.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/spatial/SpatialItemPoint.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/SurveyQualification.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/VesselType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/ObjectType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/Status.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/ProcessingType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/LinkedItemType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/gear/GearClassification.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/gear/GearClassificationAssociation.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/gear/GearAssociation.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/gear/Gear.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/location/Location.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/location/LocationClassification.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/location/LocationLevel.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/location/LocationAssociation.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/samplingScheme/denormalized/DenormalizedSamplingStrata.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/buyer/Buyer.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/buyer/BuyerType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/grouping/GroupingClassification.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/grouping/GroupingItem.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/grouping/Grouping.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/grouping/GroupingLevel.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/PhotoType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/SaleType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroup.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroupHistoricalRecord.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/ReferenceDocument.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroupType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/Citation.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonInformation.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonGroupInformation.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonNameHistory.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/Author.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/ReferenceTaxon.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonInformationHistory.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonName.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/TaxonomicLevel.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/taxon/VirtualComponent.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/VesselOwner.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/EducationGrade.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/VesselFeatures.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/VesselRegistrationPeriod.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/VesselOwnerPeriod.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/VesselEngineType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/VesselMasterPeriod.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/Vessel.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/vessel/VesselMaster.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/metier/Metier.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/order/OrderItem.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/order/OrderType.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/conversion/UnitConversion.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/conversion/WeightLengthConversion.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/conversion/RoundWeightConversion.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/qualification/QualificationRule.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/Matrix.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/Unit.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/ParameterGroup.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/Fraction.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/Method.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/Pmfm.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/Parameter.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/AggregationLevel.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/pmfm/QualitativeValue.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/NumericalPrecision.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/QualityFlag.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/referential/AnalysisInstrument.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/batch/BatchExhaustiveInventory.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/batch/BatchModel.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/batch/Batch.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/batch/denormalized/DenormalizedBatch.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/batch/denormalized/DenormalisedBatchSortingValue.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/qualification/AppliedQualificationRule.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/qualification/QualifiedItem.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/takeOver/TakeOver.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/physicalGear/PhysicalGearSurvey.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/declaration/DeclaredDocumentReference.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/economy/EconomicalSurvey.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/activity/ActivityCalendar.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/activity/DailyActivityCalendar.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/sale/SaleOrigin.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/sale/Sale.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/fishingTrip/FishingTrip.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/fishingTrip/FishingTripOrigin.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/scientificCruise/ScientificCruise.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/fishingEffort/FishingEffortCalendar.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/landing/LandingOrigin.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/survey/landing/Landing.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/sale/ExpectedSale.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/fishingArea/FishingArea2RegulationLocation.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/fishingArea/FishingArea.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/operation/denormalized/DenormalizedOperation.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/operation/Operation.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/operation/OperationVesselAssociation.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/sample/Sample.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/transshipment/Transshipment.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/LandingMeasurement.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/VesselPhysicalMeasurement.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/QuantificationMeasurement.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/VesselUseMeasurement.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/file/MeasurementFile.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/VesselPositionMeasurement.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/SaleMeasurement.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/photo/Photo.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/TakeOverMeasurement.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/GearUseMeasurement.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/SortingMeasurement.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/SampleMeasurement.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/SurveyMeasurement.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/measure/GearPhysicalMeasurement.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/link/LinkedItem.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/produce/Produce.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/history/UpdatedItemHistory.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/history/InsertedItemHistory.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/history/ProcessingHistory.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/history/DeletedItemHistory.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/position/VesselPosition.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/physical/GearPhysicalFeatures.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/physical/VesselPhysicalFeaturesOrigin.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/physical/VesselPhysicalFeatures.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/physical/GearPhysicalFeaturesOrigin.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/use/VesselUseFeaturesOrigin.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/use/GearUseFeaturesOrigin.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/use/VesselUseFeatures.hbm.xml</value>
+ <value>file:/home/tchemit/projets/ifremer/adagio/core/target/generated-sources/java/fr/ifremer/adagio/core/dao/data/vessel/feature/use/GearUseFeatures.hbm.xml</value>
+ </list>
+ </property-->
<!--</bean>-->
</beans>
\ No newline at end of file
Modified: trunk/tutti-persistence-adagio/src/main/resources/beanRefFactory.xml
===================================================================
--- trunk/tutti-persistence-adagio/src/main/resources/beanRefFactory.xml 2013-01-12 17:57:25 UTC (rev 180)
+++ trunk/tutti-persistence-adagio/src/main/resources/beanRefFactory.xml 2013-01-12 17:59:34 UTC (rev 181)
@@ -29,9 +29,9 @@
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
- <import resource="applicationContext-conf.xml"/>
+ <import resource="classpath:applicationContext-conf.xml"/>
- <bean id="beanRefFactory"
+ <bean id="TuttiBeanRefFactory"
class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<list>
Modified: trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml
===================================================================
--- trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml 2013-01-12 17:57:25 UTC (rev 180)
+++ trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml 2013-01-12 17:59:34 UTC (rev 181)
@@ -31,7 +31,11 @@
<!--TODO Create fetch profile to avoid eager loading -->
<!--</fetch-profile>-->
- <!-- Get all programs (to list with no detail) [DAT-01] -->
+ <!-- ===================================================================== -->
+ <!-- === Requete sur données thématiques [DAT-XXX] === -->
+ <!-- ===================================================================== -->
+
+ <!-- [DAT-01] Get all programs (to list with no detail) -->
<query cacheable="true" name="allPrograms">
<![CDATA[
SELECT
@@ -42,7 +46,7 @@
]]>
</query>
- <!-- Get all cruises for a given program (to list with no detail) [DAT-02] -->
+ <!-- [DAT-02] Get all cruises for a given program (to list with no detail) -->
<query cacheable="true" name="allCruises">
<![CDATA[
SELECT
@@ -56,7 +60,7 @@
<query-param name="programCode" type="java.lang.String"/>
</query>
- <!-- Get a detail program [DAT-03] -->
+ <!-- [DAT-03] Get a detail program -->
<query cacheable="true" name="program">
<![CDATA[
SELECT
@@ -69,7 +73,7 @@
<query-param name="programCode" type="java.lang.String"/>
</query>
- <!-- Get a program locations [DAT-03-1] -->
+ <!-- [DAT-03-1] Get a program locations -->
<query cacheable="true" name="allProgramLocations">
<![CDATA[
SELECT
@@ -83,7 +87,7 @@
<query-param name="programCode" type="java.lang.String"/>
</query>
- <!-- Get a detail cruise [DAT-04] -->
+ <!-- [DAT-04] Get a detail cruise -->
<query cacheable="true" name="cruise">
<![CDATA[
SELECT
@@ -112,125 +116,242 @@
<query-param name="countryLocationLevel" type="java.lang.Integer"/>
</query>
- <!-- Get all program zones [REF-01] -->
+ <!-- ===================================================================== -->
+ <!-- === Requete techniques sur référentiels [REF-TXXX] === -->
+ <!-- ===================================================================== -->
+
+ <!-- [REF-T01] Get a pmfm caracteristics by this id -->
+ <query cacheable="true" name="pmfmById">
+ <![CDATA[
+ SELECT
+ p.id AS pmfmId,
+ p.parameter.name AS parameterName,
+ p.matrix.name AS matrixName,
+ p.fraction.name AS fractionName,
+ p.method.name AS methodName,
+ p.parameter.isAlphanumeric AS isAlphanumeric,
+ p.parameter.isQualitative AS isQualitative,
+ p.signifFiguresNumber,
+ p.maximumNumberDecimals,
+ p.precision,
+ case when (p.unit.id = :unitIdNone) then '' else p.unit.symbol end AS symbol,
+ p.status AS status
+ FROM PmfmImpl p
+ WHERE
+ p.status.code IN (:statusValidCode, :statusTemporaryCode)
+ AND p.id= :pmfmId
+ ]]>
+ <query-param name="pmfmId" type="java.lang.Integer"/>
+ <query-param name="unitIdNone" type="java.lang.Integer"/>
+ <query-param name="statusValidCode" type="java.lang.String"/>
+ <query-param name="statusTemporaryCode" type="java.lang.String"/>
+ </query>
+
+ <!-- [REF-T02] Get a pmfm qualitative values from his id -->
+ <query cacheable="true" name="pmfmQualitativeValues">
+ <![CDATA[
+ SELECT
+ qv.id AS id,
+ case when (qv.name = qv.description) then qv.name else concat(qv.name, ' - ', qv.description) end AS name,
+ qv.status AS status
+ FROM
+ PmfmImpl p JOIN p.qualitativeValues qv
+ WHERE
+ p.id= :pmfmId
+ AND qv.status.code IN (:statusValidCode, :statusTemporaryCode)
+ ]]>
+ <query-param name="pmfmId" type="java.lang.Integer"/>
+ <query-param name="statusValidCode" type="java.lang.String"/>
+ <query-param name="statusTemporaryCode" type="java.lang.String"/>
+ </query>
+
+ <!-- [REF-T03] Get all pmfms using a same matrix Id -->
+ <query cacheable="true" name="allPmfmsByMatrixId">
+ <![CDATA[
+ SELECT
+ p.id AS pmfmId,
+ p.parameter.name AS parameterName,
+ p.matrix.name AS matrixName,
+ p.fraction.name AS fractionName,
+ p.method.name AS methodName,
+ p.parameter.isAlphanumeric AS isAlphanumeric,
+ p.parameter.isQualitative AS isQualitative,
+ p.signifFiguresNumber,
+ p.maximumNumberDecimals,
+ p.precision,
+ case when (p.unit.id = :unitIdNone) then '' else p.unit.symbol end AS symbol,
+ p.status AS status
+ FROM PmfmImpl p
+ WHERE
+ p.status.code IN (:statusValidCode, :statusTemporaryCode)
+ AND p.matrix.id= :matrixId
+ ]]>
+ <query-param name="matrixId" type="java.lang.Integer"/>
+ <query-param name="unitIdNone" type="java.lang.Integer"/>
+ <query-param name="statusValidCode" type="java.lang.String"/>
+ <query-param name="statusTemporaryCode" type="java.lang.String"/>
+ </query>
+
+ <!-- [REF-T04] Get all pmfms using a same parameter group id -->
+ <query cacheable="true" name="allPmfmsByParameterGroudId">
+ <![CDATA[
+ SELECT
+ p.id AS pmfmId,
+ p.parameter.name AS parameterName,
+ p.matrix.name AS matrixName,
+ p.fraction.name AS fractionName,
+ p.method.name AS methodName,
+ p.parameter.isAlphanumeric AS isAlphanumeric,
+ p.parameter.isQualitative AS isQualitative,
+ p.signifFiguresNumber,
+ p.maximumNumberDecimals,
+ p.precision,
+ case when (p.unit.id = :unitIdNone) then '' else p.unit.symbol end AS symbol,
+ p.status AS status
+ FROM PmfmImpl p
+ WHERE
+ p.status.code IN (:statusValidCode, :statusTemporaryCode)
+ AND p.parameter.parameterGroup.id= :parameterGroupId
+ ]]>
+ <query-param name="parameterGroupId" type="java.lang.Integer"/>
+ <query-param name="unitIdNone" type="java.lang.Integer"/>
+ <query-param name="statusValidCode" type="java.lang.String"/>
+ <query-param name="statusTemporaryCode" type="java.lang.String"/>
+ </query>
+
+ <!-- ===================================================================== -->
+ <!-- === Requete sur référentiels [REF-XXX] === -->
+ <!-- ===================================================================== -->
+
+ <!-- [REF-01] Get all program zones -->
<query cacheable="true" name="allProgramZones">
<![CDATA[
- SELECT
+ SELECT
l.id,
l.label,
l.name,
l.status
- FROM LocationImpl l
- WHERE
+ FROM LocationImpl l
+ WHERE
l.locationLevel.id = :locationLevelId
- AND l.status.code IN (1, 2)
+ AND l.status.code IN (:statusValidCode, :statusTemporaryCode)
]]>
<query-param name="locationLevelId" type="java.lang.Integer"/>
</query>
- <!-- Get all countries [REF-02] -->
+ <!-- [REF-02] Get all countries -->
<query cacheable="true" name="allCountries">
<![CDATA[
- SELECT
+ SELECT
l.id,
l.label,
l.name,
l.status
- FROM LocationImpl l
- WHERE
+ FROM LocationImpl l
+ WHERE
l.locationLevel.id = :locationLevelId
- AND l.status.code IN (1, 2)
+ AND l.status.code IN (:statusValidCode, :statusTemporaryCode)
]]>
<query-param name="locationLevelId" type="java.lang.Integer"/>
</query>
- <!-- Get all vessel for a given vesselType [REF-03] et [REF-04]-->
+ <!-- [REF-03] et [REF-04] Get all vessel for a given vesselType -->
<query cacheable="true" name="allVessels">
<![CDATA[
SELECT
- v.code AS vesselCode,
- vrp.registrationCode AS nationalRegistrationCode,
- vrp.internationalRegistrationCode as internationalRegistrationCode,
- vf.name AS vesselName,
- v.status AS status
+ v.code AS vesselCode,
+ vrp.registrationCode AS nationalRegistrationCode,
+ vrp.internationalRegistrationCode as internationalRegistrationCode,
+ vf.name AS vesselName,
+ v.status AS status
FROM
- VesselImpl v
- INNER JOIN v.vesselRegistrationPeriods AS vrp
- LEFT OUTER JOIN v.vesselFeatures AS vf
- WHERE v.vesselType.id = :vesselTypeId
- AND v.status.code IN (1, 2)
- AND vrp.vesselRegistrationPeriodPk.startDateTime =
- (
- SELECT MAX(vrp2.vesselRegistrationPeriodPk.startDateTime)
- FROM VesselRegistrationPeriodImpl vrp2 WHERE
- vrp2.vesselRegistrationPeriodPk.vessel.code = v.code
- AND (vrp2.vesselRegistrationPeriodPk.startDateTime <= :refDate OR :refDate IS NULL)
- GROUP BY vrp2.vesselRegistrationPeriodPk.vessel.code
- )
- AND vf.startDateTime =
- (
- SELECT MAX(vf2.startDateTime)
- FROM VesselFeaturesImpl vf2 WHERE
- vf2.vessel.code = v.code
- AND (vf2.startDateTime <= :refDate OR :refDate IS NULL)
- GROUP BY vf2.vessel.code
- )]]>
+ VesselImpl v
+ INNER JOIN v.vesselRegistrationPeriods AS vrp
+ LEFT OUTER JOIN v.vesselFeatures AS vf
+ WHERE
+ v.vesselType.id = :vesselTypeId
+ AND v.status.code IN (:statusValidCode, :statusTemporaryCode)
+ AND vrp.vesselRegistrationPeriodPk.startDateTime =
+ (
+ SELECT MAX(vrp2.vesselRegistrationPeriodPk.startDateTime)
+ FROM VesselRegistrationPeriodImpl vrp2 WHERE
+ vrp2.vesselRegistrationPeriodPk.vessel.code = v.code
+ AND (vrp2.vesselRegistrationPeriodPk.startDateTime <= :refDate OR :refDate IS NULL)
+ GROUP BY vrp2.vesselRegistrationPeriodPk.vessel.code
+ )
+ AND vf.startDateTime =
+ (
+ SELECT MAX(vf2.startDateTime)
+ FROM VesselFeaturesImpl vf2 WHERE
+ vf2.vessel.code = v.code
+ AND (vf2.startDateTime <= :refDate OR :refDate IS NULL)
+ GROUP BY vf2.vessel.code
+ )
+ ]]>
<query-param name="vesselTypeId" type="java.lang.Integer"/>
<query-param name="refDate" type="java.util.Date"/>
+ <query-param name="statusValidCode" type="java.lang.String"/>
+ <query-param name="statusTemporaryCode" type="java.lang.String"/>
</query>
- <!-- Get a vessel for a given vesselType [REF-03] et [REF-04]-->
+ <!-- Get a vessel for a given vesselType -->
<query cacheable="true" name="vessel">
<![CDATA[
SELECT
- v.code AS vesselCode,
- vrp.registrationCode AS nationalRegistrationCode,
- vrp.internationalRegistrationCode as internationalRegistrationCode,
- vf.name AS vesselName,
- v.status AS status
+ v.code AS vesselCode,
+ vrp.registrationCode AS nationalRegistrationCode,
+ vrp.internationalRegistrationCode as internationalRegistrationCode,
+ vf.name AS vesselName,
+ v.status AS status
FROM
- VesselImpl v
- INNER JOIN v.vesselRegistrationPeriods AS vrp
- LEFT OUTER JOIN v.vesselFeatures AS vf
- WHERE v.code = :vesselCode
- AND v.status.code IN (1, 2)
- AND vrp.vesselRegistrationPeriodPk.startDateTime =
- (
- SELECT MAX(vrp2.vesselRegistrationPeriodPk.startDateTime)
- FROM VesselRegistrationPeriodImpl vrp2 WHERE
- vrp2.vesselRegistrationPeriodPk.vessel.code = v.code
- AND (vrp2.vesselRegistrationPeriodPk.startDateTime <= :refDate OR :refDate IS NULL)
- GROUP BY vrp2.vesselRegistrationPeriodPk.vessel.code
- )
- AND vf.startDateTime =
- (
- SELECT MAX(vf2.startDateTime)
- FROM VesselFeaturesImpl vf2 WHERE
- vf2.vessel.code = v.code
- AND (vf2.startDateTime <= :refDate OR :refDate IS NULL)
- GROUP BY vf2.vessel.code
- )]]>
+ VesselImpl v
+ INNER JOIN v.vesselRegistrationPeriods AS vrp
+ LEFT OUTER JOIN v.vesselFeatures AS vf
+ WHERE
+ v.code = :vesselCode
+ AND v.status.code IN (:statusValidCode, :statusTemporaryCode)
+ AND vrp.vesselRegistrationPeriodPk.startDateTime =
+ (
+ SELECT MAX(vrp2.vesselRegistrationPeriodPk.startDateTime)
+ FROM VesselRegistrationPeriodImpl vrp2 WHERE
+ vrp2.vesselRegistrationPeriodPk.vessel.code = v.code
+ AND (vrp2.vesselRegistrationPeriodPk.startDateTime <= :refDate OR :refDate IS NULL)
+ GROUP BY vrp2.vesselRegistrationPeriodPk.vessel.code
+ )
+ AND vf.startDateTime =
+ (
+ SELECT MAX(vf2.startDateTime)
+ FROM VesselFeaturesImpl vf2 WHERE
+ vf2.vessel.code = v.code
+ AND (vf2.startDateTime <= :refDate OR :refDate IS NULL)
+ GROUP BY vf2.vessel.code
+ )
+ ]]>
<query-param name="vesselCode" type="java.lang.String"/>
<query-param name="refDate" type="java.util.Date"/>
+ <query-param name="statusValidCode" type="java.lang.String"/>
+ <query-param name="statusTemporaryCode" type="java.lang.String"/>
</query>
- <!-- Get all gears [REF-05] and [REF-06] -->
+ <!-- [REF-04] [REF-05] Get all gears -->
<query cacheable="true" name="allGears">
<![CDATA[
- SELECT
+ SELECT
g.id,
g.label,
g.name,
g.status AS status
- FROM GearImpl g
- WHERE
+ FROM GearImpl g
+ WHERE
g.gearClassification.id= :gearClassificiationId
- AND g.status.code IN (1, 2)
+ AND g.status.code IN (:statusValidCode, :statusTemporaryCode)
]]>
<query-param name="gearClassificiationId" type="java.lang.Integer"/>
+ <query-param name="statusValidCode" type="java.lang.String"/>
+ <query-param name="statusTemporaryCode" type="java.lang.String"/>
</query>
- <!-- Get all persons [REF-07] -->
+ <!-- [REF-07] Get all persons -->
<query cacheable="true" name="allPersons">
<![CDATA[
SELECT DISTINCT
@@ -243,7 +364,7 @@
PersonImpl p
LEFT OUTER JOIN p.profils pp
WHERE
- p.status.code in (1,2)
+ p.status.code IN (:statusValidCode, :statusTemporaryCode)
AND pp.id IN (
:observerProfilId,
:projectMemberProfilId,
@@ -254,55 +375,26 @@
<query-param name="observerProfilId" type="java.lang.Integer"/>
<query-param name="projectMemberProfilId" type="java.lang.Integer"/>
<query-param name="userProfilId" type="java.lang.Integer"/>
+ <query-param name="statusValidCode" type="java.lang.String"/>
+ <query-param name="statusTemporaryCode" type="java.lang.String"/>
</query>
- <!-- Get one persons [REF-07-1] -->
+ <!-- [REF-07-1] Get one person -->
<query cacheable="true" name="person">
<![CDATA[
- SELECT DISTINCT
+ SELECT DISTINCT
p.id,
p.firstname,
p.lastname,
p.department.code,
p.status
- FROM
- PersonImpl p
- WHERE p.id = :personId
+ FROM PersonImpl p
+ WHERE p.id = :personId
]]>
<query-param name="personId" type="java.lang.Integer"/>
</query>
- <!-- TODO Fix it! Get all species [REF-08] -->
- <query cacheable="true" name="allSpecies">
- <![CDATA[
- SELECT
- t.id,
- t.label,
- t.name,
- t.status
- FROM TaxonGroupImpl t
- WHERE t.taxonGroupType.code = :taxonGroupCode
- AND t.isChildGroupExclusive = false
- AND t.status.code IN (1, 2)
- ]]>
- <query-param name="taxonGroupCode" type="java.lang.Integer"/>
- </query>
-
- <!-- TODO Fix it! Get one species [REF-08-1] -->
- <query cacheable="true" name="species">
- <![CDATA[
- SELECT
- t.id,
- t.label,
- t.name,
- t.status
- FROM TaxonGroupImpl t
- WHERE t.id = :speciesId
- ]]>
- <query-param name="speciesId" type="java.lang.Integer"/>
- </query>
-
- <!-- Get all length step catacteristics [REF-09] -->
+ <!-- [REF-09] Get all length step catacteristics -->
<query cacheable="true" name="allLengthStepCaracteristics">
<![CDATA[
SELECT
@@ -319,7 +411,8 @@
p.unit.symbol AS symbol,
p.status AS status
FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
+ WHERE
+ p.status.code IN (:statusValidCode, :statusTemporaryCode)
AND p.matrix.id = :matrixId
AND p.parameter.isQualitative=false
AND p.parameter.isAlphanumeric=false
@@ -331,100 +424,48 @@
<query-param name="ageParameterCode" type="java.lang.String"/>
<query-param name="weightParameterCode" type="java.lang.String"/>
<query-param name="methodDeclarationId" type="java.lang.Integer"/>
+ <query-param name="statusValidCode" type="java.lang.String"/>
+ <query-param name="statusTemporaryCode" type="java.lang.String"/>
</query>
- <!-- Get all gear caracteristics [REF-10] (use allPmfmsByMatrixId) -->
- <!--query cacheable="true" name="allGearFeaturesCaracteristics">
- <![CDATA[
- SELECT
- p.id AS pmfmId,
- p.parameter.name AS parameterName,
- p.matrix.name AS matrixName,
- p.fraction.name AS fractionName,
- p.method.name AS methodName,
- p.parameter.isAlphanumeric AS isAlphanumeric,
- p.parameter.isQualitative AS isQualitative,
- p.unit.symbol AS symbol,
- p.status AS status
- FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
- AND p.matrix.id= :matrixId
- ]]>
- <query-param name="matrixId" type="java.lang.Integer"/>
- </query-->
-
- <!-- Get all environment caracteristics [REF-11] (use allPmfmsByParameterGroudId) -->
- <!--query cacheable="true" name="allEnvironmentCaracteristics">
- <![CDATA[
- SELECT
- p.id AS pmfmId,
- p.parameter.name AS parameterName,
- p.matrix.name AS matrixName,
- p.fraction.name AS fractionName,
- p.method.name AS methodName,
- p.parameter.isAlphanumeric AS isAlphanumeric,
- p.parameter.isQualitative AS isQualitative,
- p.unit.symbol AS symbol,
- p.status AS status
- FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
- AND p.parameter.parameterGroup.id= :parameterGroupId
- ]]>
- <query-param name="parameterGroupId" type="java.lang.Integer"/>
- </query-->
-
- <!-- TODO FIX IT! Get all hydrology caracteristics [REF-12] (use allPmfmsByParameterGroudId) -->
- <!--query cacheable="true" name="allHydrologyCaracteristics">
- <![CDATA[
- SELECT
- p.id AS pmfmId,
- p.parameter.name AS parameterName,
- p.matrix.name AS matrixName,
- p.fraction.name AS fractionName,
- p.method.name AS methodName,
- p.parameter.isAlphanumeric AS isAlphanumeric,
- p.parameter.isQualitative AS isQualitative,
- p.unit.symbol AS symbol,
- p.status AS status
- FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
- AND p.parameter.parameterGroup.id= :parameterGroupId
- ]]>
- <query-param name="parameterGroupId" type="java.lang.Integer"/>
- </query-->
-
- <!-- Get all fishing operation strates [REF-13] -->
+ <!-- [REF-13] Get all fishing operation strates -->
<query cacheable="true" name="allFishingOperationStratas">
<![CDATA[
- SELECT
+ SELECT
l.id as locationId,
l.label as locationLabel,
l.name as locationName,
l.locationLevel.id as locationLevelId,
l.status as status
- FROM LocationImpl l
- WHERE l.status.code IN (1, 2)
+ FROM LocationImpl l
+ WHERE
+ l.status.code IN (:statusValidCode, :statusTemporaryCode)
AND l.locationLevel.id = :locationLevelId
]]>
<query-param name="locationLevel" type="java.lang.Integer"/>
+ <query-param name="statusValidCode" type="java.lang.String"/>
+ <query-param name="statusTemporaryCode" type="java.lang.String"/>
</query>
- <!-- Get all fishing operation substrates [REF-14] -->
+ <!-- [REF-14] Get all fishing operation substrates -->
<query cacheable="true" name="allFishingOperationSubStratas">
<![CDATA[
- SELECT
+ SELECT
l.id as locationId,
l.label as locationLabel,
l.name as locationName,
l.locationLevel.id as locationLevelId,
l.status as status
- FROM LocationImpl l
- WHERE l.status.code IN (1, 2)
+ FROM LocationImpl l
+ WHERE
+ l.status.code IN (:statusValidCode, :statusTemporaryCode)
AND l.locationLevel.id = :locationLevelId
]]>
+ <query-param name="statusValidCode" type="java.lang.String"/>
+ <query-param name="statusTemporaryCode" type="java.lang.String"/>
</query>
- <!-- Get all fishing operation localites [REF-15] -->
+ <!-- [REF-15] Get all fishing operation localites -->
<query cacheable="true" name="allFishingOperationLocalites">
<![CDATA[
SELECT
@@ -434,143 +475,17 @@
l.locationLevel.id as locationLevelId,
l.status as status
FROM LocationImpl l
- WHERE l.status.code IN (1, 2)
- AND l.locationLevel.id = :locationLevelId
+ WHERE
+ l.status.code IN (:statusValidCode, :statusTemporaryCode)
+ AND l.locationLevel.id = :locationLevelId
]]>
+ <query-param name="statusValidCode" type="java.lang.String"/>
+ <query-param name="statusTemporaryCode" type="java.lang.String"/>
</query>
- <!-- TODO Fix it! Get all Length - Weight conversions [REF-16] -->
+ <!-- TODO [REF-16] Get all Length - Weight conversions -->
<!--query cacheable="true" name="allLengthWeightConvertions">
<![CDATA[]]>
</query-->
- <!-- TODO Fix it! Get all benthos species [REF-17] -->
- <query cacheable="true" name="allBenthosSpecies">
- <![CDATA[
- SELECT
- t.id,
- t.label,
- t.name,
- t.status
- FROM TaxonGroupImpl t
- WHERE t.taxonGroupType.code = :taxonGroupCode
- AND t.isChildGroupExclusive = false
- AND t.status.code IN (1, 2)
- ]]>
- <query-param name="taxonGroupCode" type="java.lang.Integer"/>
- </query>
-
- <!-- TODO Fix it! Get all plankton species [REF-18] TODO -->
- <query cacheable="true" name="allPlanktonSpecies">
- <![CDATA[
- SELECT
- t.id,
- t.label,
- t.name,
- t.status
- FROM TaxonGroupImpl t
- WHERE t.taxonGroupType.code = :taxonGroupCode
- AND t.isChildGroupExclusive = false
- AND t.status.code IN (1, 2)
- ]]>
- <query-param name="taxonGroupCode" type="java.lang.Integer"/>
- </query>
-
- <!-- Get all macroWaste categories [REF-19] (use pmfmById + pmfmQualitativeValues) -->
- <!--query cacheable="true" name="allMacroWasteCategories">
- <![CDATA[
- ]]>
- </query-->
-
- <!-- Get all macroWaste size categories [REF-20] (use pmfmById + pmfmQualitativeValues) -->
- <!--query cacheable="true" name="allMacroWasteSizeCategories">
- <![CDATA[
- ]]>
- </query-->
-
- <!-- Get a pmfm caracteristics by this id [REF-24] -->
- <query cacheable="true" name="pmfmById">
- <![CDATA[
- SELECT
- p.id AS pmfmId,
- p.parameter.name AS parameterName,
- p.matrix.name AS matrixName,
- p.fraction.name AS fractionName,
- p.method.name AS methodName,
- p.parameter.isAlphanumeric AS isAlphanumeric,
- p.parameter.isQualitative AS isQualitative,
- p.signifFiguresNumber,
- p.maximumNumberDecimals,
- p.precision,
- p.unit.symbol AS symbol,
- p.status AS status
- FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
- AND p.id= :pmfmId
- ]]>
- <query-param name="pmfmId" type="java.lang.Integer"/>
- </query>
-
- <!-- Get a pmfm qualitative values from his id [REF-25] -->
- <query cacheable="true" name="pmfmQualitativeValues">
- <![CDATA[
- SELECT
- qv.id AS id,
- case when (qv.name = qv.description) then qv.name else concat(qv.name, ' - ', qv.description) end AS name,
- qv.status AS status
- FROM
- PmfmImpl p JOIN p.qualitativeValues qv
- WHERE p.id= :pmfmId
- AND qv.status.code IN (1, 2)
- ]]>
- <query-param name="pmfmId" type="java.lang.Integer"/>
- </query>
-
- <!-- Get all pmfms using a same matrix Id -->
- <query cacheable="true" name="allPmfmsByMatrixId">
- <![CDATA[
- SELECT
- p.id AS pmfmId,
- p.parameter.name AS parameterName,
- p.matrix.name AS matrixName,
- p.fraction.name AS fractionName,
- p.method.name AS methodName,
- p.parameter.isAlphanumeric AS isAlphanumeric,
- p.parameter.isQualitative AS isQualitative,
- p.signifFiguresNumber,
- p.maximumNumberDecimals,
- p.precision,
- p.unit.symbol AS symbol,
- p.status AS status
- FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
- AND p.matrix.id= :matrixId
- ]]>
- <query-param name="matrixId" type="java.lang.Integer"/>
- </query>
-
- <!-- Get all pmfms using a same parameter group id -->
- <query cacheable="true" name="allPmfmsByParameterGroudId">
- <![CDATA[
- SELECT
- p.id AS pmfmId,
- p.parameter.name AS parameterName,
- p.matrix.name AS matrixName,
- p.fraction.name AS fractionName,
- p.method.name AS methodName,
- p.parameter.isAlphanumeric AS isAlphanumeric,
- p.parameter.isQualitative AS isQualitative,
- p.signifFiguresNumber,
- p.maximumNumberDecimals,
- p.precision,
- p.unit.symbol AS symbol,
- p.status AS status
- FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
- AND p.parameter.parameterGroup.id= :parameterGroupId
- ]]>
- <query-param name="parameterGroupId" type="java.lang.Integer"/>
- </query>
-
-
</hibernate-mapping>
Modified: trunk/tutti-persistence-adagio/src/main/resources/tutti-db-enumerations.properties
===================================================================
--- trunk/tutti-persistence-adagio/src/main/resources/tutti-db-enumerations.properties 2013-01-12 17:57:25 UTC (rev 180)
+++ trunk/tutti-persistence-adagio/src/main/resources/tutti-db-enumerations.properties 2013-01-12 17:59:34 UTC (rev 181)
@@ -297,6 +297,9 @@
ZoneCompetenceMapping.SEA=Corse|4022,Guadeloupe|4020,Guyanne|4020,La Réunion|4028,Martinique|4020,Mayotte|4028,Méditerranée|4022,Mer du nord manche atlantique|4018,Saint Pierre et Miquelon|4017
ZoneCompetenceMapping.DEFAULT_LOCATION_LEVEL=Corse|142,Guadeloupe|158;159,Guyanne|154;156,La Réunion|151;152,Martinique|158;159,Mayotte|,Méditerranée|142,Mer du nord manche atlantique|113;114,Saint Pierre et Miquelon|101
+# 10/01/2012 BLA Need to retrieve a Location from a given position (Lat/Long)
+LocationLevelId.RECTANGLE_STATISTIQUE_MED=145
+
# Ajoute pour Tutti
LocationLevelId.LOCALITE=22
LocationLevelId.STRATA=23
Modified: trunk/tutti-persistence-adagio/src/main/site/rst/referential.rst
===================================================================
--- trunk/tutti-persistence-adagio/src/main/site/rst/referential.rst 2013-01-12 17:57:25 UTC (rev 180)
+++ trunk/tutti-persistence-adagio/src/main/site/rst/referential.rst 2013-01-12 17:59:34 UTC (rev 181)
@@ -29,14 +29,87 @@
Présentation
~~~~~~~~~~~~
-Ce document décrit comment sont récupérer les données du référentiel.
+Ce document décrit comment sont récupérées les données du référentiel.
Chaque requète a un nom du style **[REF-XXX]**.
+Etat des lieux
+~~~~~~~~~~~~~~
+
++-----------------------------------------------------+-------------------------------------------------------------+
+| Nom requète | Etat | Commentaire |
++=====================================================+======+=====================================================+
+| [REF-01] Liste des zones d'une série de campagne | KO | Définir le niveau LocationLevel |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-02] Liste des pays | OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-03] Liste des navires (scientifique) | OK | Requète très longue il faut optimiser |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-04] Liste des navires (pro) | OK | Requète très longue il faut optimiser |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-05] Liste des engins (scientifique) | OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-06] Liste des engins (pro) | OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-07] Liste des utilisateurs | OK | Doit-on utliser limiter aux membres de l'Ifremer ? |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-08] Liste des espèces | OK | Utilisation de synonymes via import refTax ? |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-09] Liste des psfm mesure de classe de taille | OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-10] Liste des psfm (mise en oeuvre de l'engin) | OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-11] Liste des psfm (environnement) | OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-12] Liste des psfm (hydrologique) | KO | Données à regrouper en base avec un ParameterGroup ?|
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-13] Liste des strates | KO | Pouvoir les lier aux zones / rectangle statistique |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-14] Liste des sous-strates | KO | Pouvoir les lier aux zones / rectangle statistique / strates |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-15] Liste des localités | KO | Pouvoir les lier aux zones / rectangle statistique / strates / sous-strates |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-16] Conversion Taille-poids | TODO | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-17] Liste des espèces (écran benthos) | KO | Valider comment on filtre (sur le protocole ?) |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-18] Liste des espèces (écran plancton) | KO | Valider comment on filtre (sur le protocole ?) |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-19] Catégorie de macro-déchets | KO | Créer les données en base |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-20] Catégorie de taille macro-déchets | KO | Créer les données en base |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-21] Liste des espèces (écran accidentelles) | OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-22] Liste des psfm (écran accidentelles) | TODO | Définir ce qu'on peut mettre ici (protocole ?) |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-23] Catégorie H/VC | OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-24] Catégorie Classe. Tri | OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-25] Catégorie Sexe | OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-26] Catégorie Maturité | KO | Valider le psfm à utiliser (MATURITY ou MATURITY_STAGE_5_VISUAL)|
++=====================================================+======+=====================================================+
+| [REF-T01] Détail d'un psfm par son id | OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-T02] Valeurs qualitatives d'un psfm | OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-T03] Liste de psfm à partir d'un support | OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-T04] Liste de psfm à partir d'un parameterGroup| OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+| [REF-T05] Lieu statistique à partir de lat/long | OK | |
++-----------------------------------------------------+------+-----------------------------------------------------+
+
+Les requètes métier
+~~~~~~~~~~~~~~~~~~~~
+
[REF-01] Liste des zones d'une série de campagne
------------------------------------------------
::
+
SELECT
l.id,
l.label,
@@ -44,10 +117,9 @@
l.status
FROM LocationImpl l
WHERE
- l.locationLevel.id = :locationLevelId
- AND l.status.code IN (1, 2)
+ l.locationLevel.id = :locationLevelId
+ AND l.status.code IN (1, 2)
-
Paramètres :
- :locationLevelId = *LocationLevelId.PROGRAM*
@@ -66,8 +138,8 @@
l.status
FROM LocationImpl l
WHERE
- l.locationLevel.id = :locationLevelId
- AND l.status.code IN (1, 2)
+ l.locationLevel.id = :locationLevelId
+ AND l.status.code IN (1, 2)
Paramètres :
@@ -76,7 +148,7 @@
*État:* Valide.
-[REF-03] liste des navires (scientifique)
+[REF-03] Liste des navires (scientifique)
-----------------------------------------
::
@@ -110,7 +182,6 @@
GROUP BY vf2.vessel.code
)
-
Paramètres :
- :gearClassificiationId = *VesselTypeId.SCIENTIFIC_RESEARCH_VESSEL*
@@ -118,7 +189,7 @@
*État:* Valide mais à optimiser.
-[REF-04] liste des navires (pro)
+[REF-04] Liste des navires (pro)
--------------------------------
::
@@ -160,20 +231,20 @@
*État:* Valide mais à optimiser.
-[REF-05] liste des engins (scientifique)
+[REF-05] Liste des engins (scientifique)
----------------------------------------
::
SELECT
- g.id,
- g.label,
- g.name,
- g.status AS status
+ g.id,
+ g.label,
+ g.name,
+ g.status AS status
FROM GearImpl g
WHERE
- g.gearClassification.id= :gearClassificiationId
- AND g.status.code IN (1, 2)
+ g.gearClassification.id= :gearClassificiationId
+ AND g.status.code IN (1, 2)
Paramètres :
@@ -182,20 +253,20 @@
*État:* Valide.
-[REF-06] liste des engins (scientifique)
-----------------------------------------
+[REF-06] Liste des engins (pro)
+-------------------------------
::
SELECT
- g.id,
- g.label,
- g.name,
- g.status AS status
+ g.id,
+ g.label,
+ g.name,
+ g.status AS status
FROM GearImpl g
WHERE
- g.gearClassification.id= :gearClassificiationId
- AND g.status.code IN (1, 2)
+ g.gearClassification.id= :gearClassificiationId
+ AND g.status.code IN (1, 2)
Paramètres :
@@ -225,7 +296,7 @@
:projectMemberProfilId,
:userProfilId
)
- AND p.department.code LIKE 'PDG-%'
+ AND p.department.code LIKE 'PDG-%'
Paramètres :
@@ -245,8 +316,8 @@
*État:* Valide.
-[REF-09] liste des mesures de classes de taille
------------------------------------------------
+[REF-09] Liste des psfm mesure de classe de taille
+--------------------------------------------------
::
@@ -264,7 +335,8 @@
p.unit.symbol AS symbol,
p.status AS status
FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
+ WHERE
+ p.status.code IN (1, 2)
AND p.matrix.id = :matrixId
AND p.parameter.isQualitative=false
AND p.parameter.isAlphanumeric=false
@@ -281,65 +353,166 @@
*État:* Valide.
-[REF-10] Liste des pmfm (mise en oeuvre de l'engin)
+[REF-10] Liste des psfm (mise en oeuvre de l'engin)
---------------------------------------------------
+[REF-T03] avec :matrixId= *MatrixId.GEAR*
+
+*État:* Valide.
+
+[REF-11] Liste des psfm (environnement)
+---------------------------------------
+
+[REF-T03] avec :parameterGroupId= *ParameterGroupId.ENVIRONEMENT_MEASUREMENT*
+
+*État:* Valide.
+
+[REF-12] Liste des psfm (hydrologique)
+--------------------------------------
+
+[REF-T03] avec :parameterGroupId= *ParameterGroupId.HYDROLOGIC_MEASUREMENT*
+
+*État:* Données non présentes en base.
+
+[REF-13] Liste des strates
+--------------------------
+
::
SELECT
- p.id AS pmfmId,
- p.parameter.name AS parameterName,
- p.matrix.name AS matrixName,
- p.fraction.name AS fractionName,
- p.method.name AS methodName,
- p.parameter.isAlphanumeric AS isAlphanumeric,
- p.parameter.isQualitative AS isQualitative,
- p.signifFiguresNumber,
- p.maximumNumberDecimals,
- p.precision,
- p.unit.symbol AS symbol,
- p.status AS status
- FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
- AND p.matrix.id= :matrixId
+ l.id as locationId,
+ l.label as locationLabel,
+ l.name as locationName,
+ l.locationLevel.id as locationLevelId,
+ l.status as status
+ FROM LocationImpl l
+ WHERE
+ l.status.code IN (1, 2)
+ AND l.locationLevel.id = :locationLevelId
Paramètres :
-- :matrixId = *MatrixId.GEAR*
+- :locationLevelId = *LocationLevelId.STRATA*
-*État:* Valide.
+*État:* A lier aux zones de série de camapgnes et au rectangle statistique.
-[REF-11] liste des pmfm (environnement)
----------------------------------------
+[REF-14] Liste des sous-strates
+-------------------------------
::
SELECT
- p.id AS pmfmId,
- p.parameter.name AS parameterName,
- p.matrix.name AS matrixName,
- p.fraction.name AS fractionName,
- p.method.name AS methodName,
- p.parameter.isAlphanumeric AS isAlphanumeric,
- p.parameter.isQualitative AS isQualitative,
- p.signifFiguresNumber,
- p.maximumNumberDecimals,
- p.precision,
- p.unit.symbol AS symbol,
- p.status AS status
- FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
- AND p.parameter.parameterGroup.id= :parameterGroupId
+ l.id as locationId,
+ l.label as locationLabel,
+ l.name as locationName,
+ l.locationLevel.id as locationLevelId,
+ l.status as status
+ FROM LocationImpl l
+ WHERE
+ l.status.code IN (1, 2)
+ AND l.locationLevel.id = :locationLevelId
Paramètres :
-- :parameterGroupId = *ParameterGroupId.ENVIRONEMENT_MEASUREMENT*
+- :locationLevelId = *LocationLevelId.SUBSTRATA*
+*État:* Pouvoir les lier aux zones et rectangle statistique et strates.
+
+[REF-15] Liste des localités
+----------------------------
+
+::
+
+ SELECT
+ l.id as locationId,
+ l.label as locationLabel,
+ l.name as locationName,
+ l.locationLevel.id as locationLevelId,
+ l.status as status
+ FROM LocationImpl l
+ WHERE
+ l.status.code IN (1, 2)
+ AND l.locationLevel.id = :locationLevelId
+
+Paramètres :
+
+- :locationLevelId = *LocationLevelId.LOCALITE*
+
+*État:* Pouvoir les lier aux zones et rectangle statistique et strates .
+
+[REF-16] Conversion Taille-poids
+--------------------------------
+
+*État:* A faire.
+
+[REF-17] Liste des espèces (écran benthos)
+------------------------------------------
+
+*État:* Valider comment on filtre (sur le protocole ?).
+
+[REF-18] Liste des espèces (écran plancton)
+-------------------------------------------
+
+*État:* Valider comment on filtre (sur le protocole ?).
+
+[REF-19] Catégorie de macro-déchets
+-----------------------------------
+
+[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.MACRO_WASTE_CATEGORY*
+
+*État:* les données sont à créer en base.
+
+[REF-20] Catégorie de taille macro-déchets
+-------------------------------------------
+
+[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.MACRO_WASTE_SIZE_CATEGORY*
+
+*État:* les données sont à créer en base.
+
+[REF-21] Liste des espèces (écran capture accidentelles)
+--------------------------------------------------------
+
+*État:* Valide (on prend toutes les espèces).
+
+[REF-22] Liste des psfm pour les captures accidentelles
+-------------------------------------------------------
+
+*État:* A FAIRE.
+
+[REF-23] Catégorie H/VC
+-----------------------
+
+[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.SORTED_UNSORTED*
+
*État:* Valide.
-[REF-12] liste des pmfm (environnement)
----------------------------------------
+[REF-24] Catégorie Classe. Tri
+------------------------------
+[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.SIZE_CATEGORY*
+
+*État:* Valide.
+
+[REF-25] Catégorie Sexe
+-----------------------
+
+[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.SEX*
+
+*État:* Valide.
+
+[REF-26] Catégorie Maturité
+---------------------------
+
+[REF-T01] + [REF-T02] avec :pmfmId = *PmfmId.MATURITY*
+
+*État:* Valider l'id utilisé.
+
+Les requètes techniques
+~~~~~~~~~~~~~~~~~~~~~~~
+
+[REF-T01] Détail d'un psfm par son id
+-------------------------------------
+
::
SELECT
@@ -353,83 +526,104 @@
p.signifFiguresNumber,
p.maximumNumberDecimals,
p.precision,
- p.unit.symbol AS symbol,
+ case when (p.unit.id = :unitIdNone) then '' else p.unit.symbol end AS symbol,
p.status AS status
FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
- AND p.parameter.parameterGroup.id= :parameterGroupId
+ WHERE
+ p.status.code IN (1, 2)
+ AND p.id= :pmfmId
Paramètres :
-- :parameterGroupId = *ParameterGroupId.HYDROLOGIC_MEASUREMENT*
+- :pmfmId = id du psfm
+- :unitIdNone = *UnitId.NONE*
-*État:* Données non présentes en base.
+*État:* Valide.
-[REF-13] liste des strates
---------------------------
+[REF-T02] Valeurs qualitatives d'un psfm
+----------------------------------------
::
SELECT
- l.id as locationId,
- l.label as locationLabel,
- l.name as locationName,
- l.locationLevel.id as locationLevelId,
- l.status as status
- FROM LocationImpl l
- WHERE l.status.code IN (1, 2)
- AND l.locationLevel.id = :locationLevelId
+ qv.id AS id,
+ case when (qv.name = qv.description) then qv.name else concat(qv.name, ' - ', qv.description) end AS name,
+ qv.status AS status
+ FROM
+ PmfmImpl p JOIN p.qualitativeValues qv
+ WHERE
+ p.id= :pmfmId
+ AND qv.status.code IN (1, 2)
Paramètres :
-- :locationLevelId = *LocationLevelId.STRATA*
+- :pmfmId = id du psfm
*État:* Valide.
-[REF-14] liste des sous-strates
---------------------------------
+[REF-T03] Liste de psfm à partir d'un support
+---------------------------------------------
::
SELECT
- l.id as locationId,
- l.label as locationLabel,
- l.name as locationName,
- l.locationLevel.id as locationLevelId,
- l.status as status
- FROM LocationImpl l
- WHERE l.status.code IN (1, 2)
- AND l.locationLevel.id = :locationLevelId
+ p.id AS pmfmId,
+ p.parameter.name AS parameterName,
+ p.matrix.name AS matrixName,
+ p.fraction.name AS fractionName,
+ p.method.name AS methodName,
+ p.parameter.isAlphanumeric AS isAlphanumeric,
+ p.parameter.isQualitative AS isQualitative,
+ p.signifFiguresNumber,
+ p.maximumNumberDecimals,
+ p.precision,
+ case when (p.unit.id = :unitIdNone) then '' else p.unit.symbol end AS symbol,
+ p.status AS status
+ FROM PmfmImpl p
+ WHERE
+ p.status.code IN (1, 2)
+ AND p.matrix.id= :matrixId
Paramètres :
-- :locationLevelId = *LocationLevelId.SUBSTRATA*
+- :matrixId = id du support
+- :unitIdNone = *UnitId.NONE*
-*État:* A valider, il faut trouver comment récupérer les valeurs par rapport
-à une strate.
+*État:* Valide.
-[REF-15] liste des localités
-----------------------------
+[REF-T04] Liste de psfm à partir d'un groupe de paramètre
+---------------------------------------------------------
::
SELECT
- l.id as locationId,
- l.label as locationLabel,
- l.name as locationName,
- l.locationLevel.id as locationLevelId,
- l.status as status
- FROM LocationImpl l
- WHERE l.status.code IN (1, 2)
- AND l.locationLevel.id = :locationLevelId
+ p.id AS pmfmId,
+ p.parameter.name AS parameterName,
+ p.matrix.name AS matrixName,
+ p.fraction.name AS fractionName,
+ p.method.name AS methodName,
+ p.parameter.isAlphanumeric AS isAlphanumeric,
+ p.parameter.isQualitative AS isQualitative,
+ p.signifFiguresNumber,
+ p.maximumNumberDecimals,
+ p.precision,
+ case when (p.unit.id = :unitIdNone) then '' else p.unit.symbol end AS symbol,
+ p.status AS status
+ FROM PmfmImpl p
+ WHERE
+ p.status.code IN (1, 2)
+ AND p.parameter.parameterGroup.id= :parameterGroupId
Paramètres :
-- :locationLevelId = *LocationLevelId.LOCALITE*
+- :parameterGroupId = id du parameterGroup
+- :unitIdNone = *UnitId.NONE*
-*État:* A valider, il faut trouver comment récupérer les valeurs par rapport
-à une strate, sous-strate.
+*État:* Valide.
+[REF-T04] Lieu statistique (rectangle statistique) à partir de lat/long
+-----------------------------------------------------------------------
+Utiliser *LocationService.getLocationIdByLatLong()* (adagio-core)
-
+*État:* Valide.
Modified: trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/CruiseTest.java
===================================================================
--- trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/CruiseTest.java 2013-01-12 17:57:25 UTC (rev 180)
+++ trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/CruiseTest.java 2013-01-12 17:59:34 UTC (rev 181)
@@ -26,7 +26,9 @@
import fr.ifremer.tutti.persistence.entities.data.Cruise;
import fr.ifremer.tutti.persistence.entities.data.Program;
+import fr.ifremer.tutti.persistence.service.TuttiPersistenceServiceLocator;
import org.junit.Assert;
+import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Ignore;
import org.junit.Test;
@@ -45,10 +47,17 @@
@ClassRule
public static final DatabaseResource dbResource = new DatabaseResource();
+ protected TuttiPersistence service;
+
+ @Before
+ public void setUp() throws Exception {
+ service = TuttiPersistenceServiceLocator.getPersistenceService();
+ }
+
@Test
public void getAllCruise(/*String programId*/) {
String programCode = dbResource.getFixtures().programCode();
- List<Cruise> result = dbResource.getDriver().getAllCruise(programCode);
+ List<Cruise> result = service.getAllCruise(programCode);
Assert.assertNotNull(result);
Assert.assertEquals(1, result.size());
}
@@ -57,7 +66,7 @@
public void getCruise(/*String id*/) {
String cruiseId = dbResource.getFixtures().cruiseId();
- Cruise result = dbResource.getDriver().getCruise(cruiseId);
+ Cruise result = service.getCruise(cruiseId);
Assert.assertNotNull(result);
}
Modified: trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/DatabaseResource.java
===================================================================
--- trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/DatabaseResource.java 2013-01-12 17:57:25 UTC (rev 180)
+++ trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/DatabaseResource.java 2013-01-12 17:59:34 UTC (rev 181)
@@ -26,6 +26,7 @@
import fr.ifremer.tutti.persistence.config.TuttiPersistenceAdagioConfig;
import fr.ifremer.tutti.persistence.config.TuttiPersistenceAdagioConfigOption;
+import fr.ifremer.tutti.persistence.service.TuttiPersistenceServiceLocator;
import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -34,9 +35,6 @@
import org.junit.runner.Description;
import org.junit.runners.model.Statement;
import org.nuiton.util.ApplicationConfig;
-import org.nuiton.util.ArgumentsParserException;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
import java.io.File;
import java.io.IOException;
@@ -58,17 +56,12 @@
protected TuttiPersistenceAdagioConfig config;
- protected TuttiPersistence driver;
-
protected DatabaseFixtures fixtures;
public TuttiPersistenceAdagioConfig getConfig() {
return config;
}
- public TuttiPersistence getDriver() {
- return driver;
- }
public DatabaseFixtures getFixtures() {
return fixtures;
@@ -108,46 +101,9 @@
}
fixtures = new DatabaseFixtures();
- config = createConfig(testClass, "");
- if (log.isDebugEnabled()) {
- log.debug("Use conf.properties at " + config.getDbConfigurationPath());
- }
- ApplicationContext context = new ClassPathXmlApplicationContext(
- "applicationContext-conf.xml",
- "applicationContext-dataSource-local.xml",
- "applicationContext-entities.xml",
- "applicationContext-service-tutti.xml");
+ File resourceDirectory = getTestSpecificDirectory(testClass, "");
- driver = (TuttiPersistence) context.getBean("adagioPersistenceService");
-
- driver.setEnumerations(config.getDbEnumerations());
-
- driver.open();
- }
-
- protected void after(Description description) throws IOException {
- Class<?> testClass = description.getTestClass();
- if (log.isInfoEnabled()) {
- log.info("After test " + testClass);
- }
- // push back old classLoader
- if (oldClassLoader != null) {
- Thread.currentThread().setContextClassLoader(oldClassLoader);
- }
-
- // close hibernate session if was used
- if (driver != null) {
- driver.close();
- }
- }
-
-
- public static TuttiPersistenceAdagioConfig createConfig(Class<?> testClass,
- String name) throws ArgumentsParserException, IOException {
-
- File resourceDirectory = getTestSpecificDirectory(testClass, name);
-
RessourceClassLoader loader =
new RessourceClassLoader(testClass.getClassLoader());
@@ -162,13 +118,28 @@
resourceDirectory.getAbsolutePath());
applicationConfig.parse();
- TuttiPersistenceAdagioConfig result =
- new TuttiPersistenceAdagioConfig(applicationConfig);
+ config = new TuttiPersistenceAdagioConfig(applicationConfig);
- result.initConfig(loader);
- return result;
+ config.initConfig(loader);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Use conf.properties at " + config.getDbConfigurationPath());
+ }
}
+ protected void after(Description description) throws IOException {
+ Class<?> testClass = description.getTestClass();
+ if (log.isInfoEnabled()) {
+ log.info("After test " + testClass);
+ }
+ // push back old classLoader
+ if (oldClassLoader != null) {
+ Thread.currentThread().setContextClassLoader(oldClassLoader);
+ }
+
+ TuttiPersistenceServiceLocator.close();
+ }
+
public static File getTestSpecificDirectory(Class<?> testClass,
String name) throws IOException {
// Trying to look for the temporary folder to store data for the test
@@ -193,5 +164,4 @@
return databaseFile;
}
-
}
Modified: trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ProgramTest.java
===================================================================
--- trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ProgramTest.java 2013-01-12 17:57:25 UTC (rev 180)
+++ trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ProgramTest.java 2013-01-12 17:59:34 UTC (rev 181)
@@ -25,7 +25,9 @@
*/
import fr.ifremer.tutti.persistence.entities.data.Program;
+import fr.ifremer.tutti.persistence.service.TuttiPersistenceServiceLocator;
import org.junit.Assert;
+import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Ignore;
import org.junit.Test;
@@ -43,9 +45,16 @@
@ClassRule
public static final DatabaseResource dbResource = new DatabaseResource();
+ protected TuttiPersistence service;
+
+ @Before
+ public void setUp() throws Exception {
+ service = TuttiPersistenceServiceLocator.getPersistenceService();
+ }
+
@Test
public void getAllProgram() {
- List<Program> result = dbResource.getDriver().getAllProgram();
+ List<Program> result = service.getAllProgram();
Assert.assertNotNull(result);
Assert.assertEquals(1, result.size());
}
@@ -53,7 +62,7 @@
@Test
public void getProgram(/*String id*/) {
String programCode = dbResource.getFixtures().programCode();
- Program actual = dbResource.getDriver().getProgram(programCode);
+ Program actual = service.getProgram(programCode);
Assert.assertNotNull(actual);
Assert.assertNotNull(actual.getId());
Assert.assertNotNull(actual.getName());
Deleted: trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ReferentialTest.java
===================================================================
--- trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ReferentialTest.java 2013-01-12 17:57:25 UTC (rev 180)
+++ trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ReferentialTest.java 2013-01-12 17:59:34 UTC (rev 181)
@@ -1,224 +0,0 @@
-package fr.ifremer.tutti.persistence;
-
-/*
- * #%L
- * Tutti :: Persistence Adagio (impl)
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2012 - 2013 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU 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 General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-
-import fr.ifremer.tutti.persistence.entities.data.Program;
-import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
-import fr.ifremer.tutti.persistence.entities.referential.Country;
-import fr.ifremer.tutti.persistence.entities.referential.Gear;
-import fr.ifremer.tutti.persistence.entities.referential.Person;
-import fr.ifremer.tutti.persistence.entities.referential.Species;
-import fr.ifremer.tutti.persistence.entities.referential.Vessel;
-import fr.ifremer.tutti.persistence.entities.referential.Zone;
-import org.junit.Assert;
-import org.junit.ClassRule;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import java.util.List;
-
-/**
- * Test the referential service.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.3
- */
-public class ReferentialTest {
-
- @ClassRule
- public static final DatabaseResource dbResource = new DatabaseResource();
-
- @Test
- public void getAllProgramZone() {
- List<Zone> result = dbResource.getDriver().getAllProgramZone();
- Assert.assertNotNull(result);
- Assert.assertEquals(0, result.size());
- }
-
- @Test
- public void getAllCountry() {
- List<Country> result = dbResource.getDriver().getAllCountry();
- Assert.assertNotNull(result);
- Assert.assertEquals(240, result.size());
- }
-
- @Test
- public void getAllScientificVessel() {
- List<Vessel> result = dbResource.getDriver().getAllScientificVessel();
- Assert.assertNotNull(result);
- Assert.assertEquals(1, result.size());
- }
-
- //FIXME : requete trop longue (index manquant, trop de jointures?)
- @Test
- @Ignore
- public void getAllFishingVessel() {
- List<Vessel> result = dbResource.getDriver().getAllFishingVessel();
- Assert.assertNotNull(result);
- Assert.assertEquals(187, result.size());
- }
-
- @Test
- public void getAllScientificGear() {
- List<Gear> result = dbResource.getDriver().getAllScientificGear();
- Assert.assertNotNull(result);
- Assert.assertEquals(2, result.size());
- }
-
- @Test
- public void getAllFishingGear() {
- List<Gear> result = dbResource.getDriver().getAllFishingGear();
- Assert.assertNotNull(result);
- Assert.assertEquals(75, result.size());
- }
-
- @Test
- public void getAllPerson() {
- List<Person> result = dbResource.getDriver().getAllPerson();
- Assert.assertNotNull(result);
- Assert.assertEquals(123, result.size());
- }
-
-
- @Test
- public void getAllSpecies() {
- List<Species> result = dbResource.getDriver().getAllSpecies();
- Assert.assertNotNull(result);
- Assert.assertEquals(156, result.size());
- }
-
- @Test
- public void getAllBenthosSpecies() {
- List<Species> result = dbResource.getDriver().getAllBenthosSpecies();
- Assert.assertNotNull(result);
- Assert.assertEquals(156, result.size());
- }
-
- @Test
- public void getAllPlanktonSpecies() {
- List<Species> result = dbResource.getDriver().getAllPlanktonSpecies();
- Assert.assertNotNull(result);
- Assert.assertEquals(156, result.size());
- }
-
- @Test
- public void getSpecies(/*String speciesId*/) {
- }
-
- @Test
- public void getAllFishingOperationStrata(/*String zoneId*/) {
- }
-
- @Test
- public void getAllFishingOperationSubStrata(/*String locationId*/) {
- }
-
- @Test
- public void getAllFishingOperationLocation(/*String locationId*/) {
- }
-
- @Test
- public void getAllFishingOperationEnvironmentCaracteristic() {
- List<Caracteristic> result = dbResource.getDriver().getAllFishingOperationEnvironmentCaracteristic();
- Assert.assertNotNull(result);
- Assert.assertEquals(40, result.size());
- }
-
- @Test
- public void getAllFishingOperationGearCaracteristic() {
- List<Caracteristic> result = dbResource.getDriver().getAllFishingOperationGearCaracteristic();
- Assert.assertNotNull(result);
- Assert.assertEquals(155, result.size());
- }
-
- @Test
- public void getAllFishingOperationHydrologicCaracteristic() {
- List<Caracteristic> result = dbResource.getDriver().getAllFishingOperationHydrologicCaracteristic();
- Assert.assertNotNull(result);
- Assert.assertEquals(40, result.size());
- }
-
- @Test
- public void getAllSpeciesLengthStepCaracteristic() {
- List<Caracteristic> result = dbResource.getDriver().getAllSpeciesLengthStepCaracteristic();
- Assert.assertNotNull(result);
- Assert.assertEquals(24, result.size());
- }
-
- @Test
- public void getSizeCategoryCaracteristic() {
- Caracteristic result = dbResource.getDriver().getSizeCategoryCaracteristic();
- Assert.assertNotNull(result);
- Assert.assertTrue(result.isQualitativeType());
- Assert.assertNotNull(result.getQualitativeValue());
- Assert.assertEquals(6, result.sizeQualitativeValue());
- }
-
- @Test
- public void getSexCaracteristic() {
- Caracteristic result = dbResource.getDriver().getSexCaracteristic();
- Assert.assertNotNull(result);
- Assert.assertTrue(result.isQualitativeType());
- Assert.assertNotNull(result.getQualitativeValue());
- Assert.assertEquals(4, result.sizeQualitativeValue());
- }
-
- @Test
- public void getSortedUnsortedCaracteristic() {
- Caracteristic result = dbResource.getDriver().getSortedUnsortedCaracteristic();
- Assert.assertNotNull(result);
- Assert.assertTrue(result.isQualitativeType());
- Assert.assertNotNull(result.getQualitativeValue());
- Assert.assertEquals(2, result.sizeQualitativeValue());
- }
-
- @Test
- public void getMaturityCaracteristic() {
- Caracteristic result = dbResource.getDriver().getMaturityCaracteristic();
- Assert.assertNotNull(result);
- Assert.assertTrue(result.isQualitativeType());
- Assert.assertNotNull(result.getQualitativeValue());
- Assert.assertEquals(10, result.sizeQualitativeValue());
- }
-
- @Test
- public void getMacroWasteCategoryCaracteristic() {
- Caracteristic result = dbResource.getDriver().getMacroWasteCategoryCaracteristic();
- Assert.assertNotNull(result);
- Assert.assertTrue(result.isQualitativeType());
- Assert.assertNotNull(result.getQualitativeValue());
- Assert.assertEquals(10, result.sizeQualitativeValue());
- }
-
- @Test
- public void getMacroWasteSizeCategoryCaracteristic() {
- Caracteristic result = dbResource.getDriver().getMacroWasteSizeCategoryCaracteristic();
- Assert.assertNotNull(result);
- Assert.assertTrue(result.isQualitativeType());
- Assert.assertNotNull(result.getQualitativeValue());
- Assert.assertEquals(10, result.sizeQualitativeValue());
- }
-
-}
Copied: trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceTest.java (from rev 179, trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ReferentialTest.java)
===================================================================
--- trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceTest.java (rev 0)
+++ trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceTest.java 2013-01-12 17:59:34 UTC (rev 181)
@@ -0,0 +1,232 @@
+package fr.ifremer.tutti.persistence.service;
+
+/*
+ * #%L
+ * Tutti :: Persistence Adagio (impl)
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.tutti.persistence.DatabaseResource;
+import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
+import fr.ifremer.tutti.persistence.entities.referential.Country;
+import fr.ifremer.tutti.persistence.entities.referential.Gear;
+import fr.ifremer.tutti.persistence.entities.referential.Person;
+import fr.ifremer.tutti.persistence.entities.referential.Species;
+import fr.ifremer.tutti.persistence.entities.referential.Vessel;
+import fr.ifremer.tutti.persistence.entities.referential.Zone;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import java.util.List;
+
+/**
+ * Test the referential service.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public class ReferentialPersistenceServiceTest {
+
+ @ClassRule
+ public static final DatabaseResource dbResource = new DatabaseResource();
+
+ protected ReferentialPersistenceService service;
+
+ @Before
+ public void setUp() throws Exception {
+ service = TuttiPersistenceServiceLocator.getReferentialPersistenceService();
+ }
+
+ @Test
+ public void getAllProgramZone() {
+ List<Zone> result = service.getAllProgramZone();
+ Assert.assertNotNull(result);
+ Assert.assertEquals(0, result.size());
+ }
+
+ @Test
+ public void getAllCountry() {
+ List<Country> result = service.getAllCountry();
+ Assert.assertNotNull(result);
+ Assert.assertEquals(240, result.size());
+ }
+
+ @Test
+ public void getAllScientificVessel() {
+ List<Vessel> result = service.getAllScientificVessel();
+ Assert.assertNotNull(result);
+ Assert.assertEquals(1, result.size());
+ }
+
+ //FIXME : requete trop longue (index manquant, trop de jointures?)
+ @Test
+ @Ignore
+ public void getAllFishingVessel() {
+ List<Vessel> result = service.getAllFishingVessel();
+ Assert.assertNotNull(result);
+ Assert.assertEquals(187, result.size());
+ }
+
+ @Test
+ public void getAllScientificGear() {
+ List<Gear> result = service.getAllScientificGear();
+ Assert.assertNotNull(result);
+ Assert.assertEquals(2, result.size());
+ }
+
+ @Test
+ public void getAllFishingGear() {
+ List<Gear> result = service.getAllFishingGear();
+ Assert.assertNotNull(result);
+ Assert.assertEquals(75, result.size());
+ }
+
+ @Test
+ public void getAllPerson() {
+ List<Person> result = service.getAllPerson();
+ Assert.assertNotNull(result);
+ Assert.assertEquals(123, result.size());
+ }
+
+
+ @Test
+ public void getAllSpecies() {
+ List<Species> result = service.getAllSpecies();
+ Assert.assertNotNull(result);
+ Assert.assertEquals(8435, result.size());
+ }
+
+ @Test
+ public void getAllBenthosSpecies() {
+ List<Species> result = service.getAllBenthosSpecies();
+ Assert.assertNotNull(result);
+ Assert.assertEquals(8435, result.size());
+ }
+
+ @Test
+ public void getAllPlanktonSpecies() {
+ List<Species> result = service.getAllPlanktonSpecies();
+ Assert.assertNotNull(result);
+ Assert.assertEquals(8435, result.size());
+ }
+
+ @Test
+ public void getSpecies(/*String speciesId*/) {
+ }
+
+ @Test
+ public void getAllFishingOperationStrata(/*String zoneId*/) {
+ }
+
+ @Test
+ public void getAllFishingOperationSubStrata(/*String locationId*/) {
+ }
+
+ @Test
+ public void getAllFishingOperationLocation(/*String locationId*/) {
+ }
+
+ @Test
+ public void getAllFishingOperationEnvironmentCaracteristic() {
+ List<Caracteristic> result = service.getAllFishingOperationEnvironmentCaracteristic();
+ Assert.assertNotNull(result);
+ Assert.assertEquals(40, result.size());
+ }
+
+ @Test
+ public void getAllFishingOperationGearCaracteristic() {
+ List<Caracteristic> result = service.getAllFishingOperationGearCaracteristic();
+ Assert.assertNotNull(result);
+ Assert.assertEquals(155, result.size());
+ }
+
+ @Test
+ public void getAllFishingOperationHydrologicCaracteristic() {
+ List<Caracteristic> result = service.getAllFishingOperationHydrologicCaracteristic();
+ Assert.assertNotNull(result);
+ Assert.assertEquals(40, result.size());
+ }
+
+ @Test
+ public void getAllSpeciesLengthStepCaracteristic() {
+ List<Caracteristic> result = service.getAllSpeciesLengthStepCaracteristic();
+ Assert.assertNotNull(result);
+ Assert.assertEquals(24, result.size());
+ }
+
+ @Test
+ public void getSizeCategoryCaracteristic() {
+ Caracteristic result = service.getSizeCategoryCaracteristic();
+ Assert.assertNotNull(result);
+ Assert.assertTrue(result.isQualitativeType());
+ Assert.assertNotNull(result.getQualitativeValue());
+ Assert.assertEquals(6, result.sizeQualitativeValue());
+ }
+
+ @Test
+ public void getSexCaracteristic() {
+ Caracteristic result = service.getSexCaracteristic();
+ Assert.assertNotNull(result);
+ Assert.assertTrue(result.isQualitativeType());
+ Assert.assertNotNull(result.getQualitativeValue());
+ Assert.assertEquals(4, result.sizeQualitativeValue());
+ }
+
+ @Test
+ public void getSortedUnsortedCaracteristic() {
+ Caracteristic result = service.getSortedUnsortedCaracteristic();
+ Assert.assertNotNull(result);
+ Assert.assertTrue(result.isQualitativeType());
+ Assert.assertNotNull(result.getQualitativeValue());
+ Assert.assertEquals(2, result.sizeQualitativeValue());
+ }
+
+ @Test
+ public void getMaturityCaracteristic() {
+ Caracteristic result = service.getMaturityCaracteristic();
+ Assert.assertNotNull(result);
+ Assert.assertTrue(result.isQualitativeType());
+ Assert.assertNotNull(result.getQualitativeValue());
+ Assert.assertEquals(10, result.sizeQualitativeValue());
+ }
+
+ @Test
+ public void getMacroWasteCategoryCaracteristic() {
+ Caracteristic result = service.getMacroWasteCategoryCaracteristic();
+ Assert.assertNotNull(result);
+ Assert.assertTrue(result.isQualitativeType());
+ Assert.assertNotNull(result.getQualitativeValue());
+ Assert.assertEquals(10, result.sizeQualitativeValue());
+ }
+
+ @Test
+ public void getMacroWasteSizeCategoryCaracteristic() {
+ Caracteristic result = service.getMacroWasteSizeCategoryCaracteristic();
+ Assert.assertNotNull(result);
+ Assert.assertTrue(result.isQualitativeType());
+ Assert.assertNotNull(result.getQualitativeValue());
+ Assert.assertEquals(10, result.sizeQualitativeValue());
+ }
+
+}
Modified: trunk/tutti-persistence-adagio/src/test/resources/tutti-test.properties
===================================================================
--- trunk/tutti-persistence-adagio/src/test/resources/tutti-test.properties 2013-01-12 17:57:25 UTC (rev 180)
+++ trunk/tutti-persistence-adagio/src/test/resources/tutti-test.properties 2013-01-12 17:59:34 UTC (rev 181)
@@ -21,5 +21,5 @@
# <http://www.gnu.org/licenses/gpl-3.0.html>.
# #L%
###
-tutti.persistence.jdbc.url=jdbc:hsqldb:file:src/test/db/allegro
-#tutti.persistence.jdbc.url=jdbc:hsqldb:hsql://localhost/allegro
\ No newline at end of file
+#tutti.persistence.jdbc.url=jdbc:hsqldb:file:src/test/db/allegro
+tutti.persistence.jdbc.url=jdbc:hsqldb:hsql://localhost/allegro
\ No newline at end of file
1
0
r180 - in trunk/tutti-persistence: . src/main/java/fr/ifremer/tutti/persistence src/main/java/fr/ifremer/tutti/persistence/service
by tchemit@users.forge.codelutin.com 12 Jan '13
by tchemit@users.forge.codelutin.com 12 Jan '13
12 Jan '13
Author: tchemit
Date: 2013-01-12 18:57:25 +0100 (Sat, 12 Jan 2013)
New Revision: 180
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/180
Log:
- optimize dependencies
- fix bug in ResourceClassLoader
- introduce ReferentialPersistenceService API
Added:
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java
Modified:
trunk/tutti-persistence/pom.xml
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/RessourceClassLoader.java
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java
Modified: trunk/tutti-persistence/pom.xml
===================================================================
--- trunk/tutti-persistence/pom.xml 2013-01-11 19:00:31 UTC (rev 179)
+++ trunk/tutti-persistence/pom.xml 2013-01-12 17:57:25 UTC (rev 180)
@@ -53,6 +53,16 @@
<artifactId>commons-lang3</artifactId>
</dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+
</dependencies>
<build>
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/RessourceClassLoader.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/RessourceClassLoader.java 2013-01-11 19:00:31 UTC (rev 179)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/RessourceClassLoader.java 2013-01-12 17:57:25 UTC (rev 180)
@@ -171,7 +171,7 @@
try {
URL[] urls = FileUtils.toURLs(
directories.toArray(new File[directories.size()]));
- loader = URLClassLoader.newInstance(urls);
+ loader = URLClassLoader.newInstance(urls, null);
} catch (IOException e) {
throw new RuntimeException(
"Could not convert directories " + directories
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java 2013-01-11 19:00:31 UTC (rev 179)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java 2013-01-12 17:57:25 UTC (rev 180)
@@ -46,7 +46,6 @@
import java.io.Closeable;
import java.io.IOException;
import java.util.List;
-import java.util.Properties;
/**
* Contract for a persistence driver used by Tutti.
@@ -64,10 +63,6 @@
void open() throws IOException;
- void close() throws IOException;
-
- void setEnumerations(Properties dbEnumerations);
-
//------------------------------------------------------------------------//
//-- Referential methods --//
//------------------------------------------------------------------------//
@@ -110,7 +105,6 @@
List<Species> getAllPlanktonSpecies();
-
Species getSpecies(String speciesId);
List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId);
Added: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java (rev 0)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java 2013-01-12 17:57:25 UTC (rev 180)
@@ -0,0 +1,128 @@
+package fr.ifremer.tutti.persistence.service;
+
+/*
+ * #%L
+ * Tutti :: Persistence API
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.tutti.persistence.entities.data.Cruise;
+import fr.ifremer.tutti.persistence.entities.data.Program;
+import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
+import fr.ifremer.tutti.persistence.entities.referential.Country;
+import fr.ifremer.tutti.persistence.entities.referential.FishingOperationLocation;
+import fr.ifremer.tutti.persistence.entities.referential.Gear;
+import fr.ifremer.tutti.persistence.entities.referential.Person;
+import fr.ifremer.tutti.persistence.entities.referential.Species;
+import fr.ifremer.tutti.persistence.entities.referential.Vessel;
+import fr.ifremer.tutti.persistence.entities.referential.Zone;
+
+import java.util.List;
+
+/**
+ * API to obtain all referentail referential data.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.3
+ */
+public interface ReferentialPersistenceService {
+
+ //------------------------------------------------------------------------//
+ //-- Referential methods --//
+ //------------------------------------------------------------------------//
+
+ /**
+ * @return all available zones (used by a {@link Program}.
+ * @see Program#getZone()
+ * @see Program#setZone(Zone)
+ * @since 0.3
+ */
+ List<Zone> getAllProgramZone();
+
+ /**
+ * @return all countries (used by a {@link Cruise}).
+ * @see {@link Cruise#getCountry()}
+ * @see {@link Cruise#setCountry(Country)}
+ * @since 0.1
+ */
+ List<Country> getAllCountry();
+
+ /**
+ * @return all scientific vessels (used by a {@link Cruise}).
+ * @see Cruise#getVessel()
+ * @see Cruise#setVessel(List)
+ * @since 0.3
+ */
+ List<Vessel> getAllScientificVessel();
+
+ /**
+ * @return all commercial vessels (used by a {@link Cruise}).
+ * @see Cruise#getVessel()
+ * @see Cruise#setVessel(List)
+ * @since 0.3
+ */
+ List<Vessel> getAllFishingVessel();
+
+ Vessel getVessel(String vesselCode);
+
+ List<Species> getAllSpecies();
+
+ List<Species> getAllBenthosSpecies();
+
+ List<Species> getAllPlanktonSpecies();
+
+ Species getSpecies(String speciesId);
+
+ List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId);
+
+ List<FishingOperationLocation> getAllFishingOperationSubStrata(String locationId);
+
+ List<FishingOperationLocation> getAllFishingOperationLocation(String locationId);
+
+ List<Caracteristic> getAllFishingOperationEnvironmentCaracteristic();
+
+ List<Caracteristic> getAllFishingOperationGearCaracteristic();
+
+ List<Caracteristic> getAllFishingOperationHydrologicCaracteristic();
+
+ List<Caracteristic> getAllSpeciesLengthStepCaracteristic();
+
+ Caracteristic getSizeCategoryCaracteristic();
+
+ Caracteristic getSexCaracteristic();
+
+ Caracteristic getSortedUnsortedCaracteristic();
+
+ Caracteristic getMaturityCaracteristic();
+
+ Caracteristic getMacroWasteCategoryCaracteristic();
+
+ Caracteristic getMacroWasteSizeCategoryCaracteristic();
+
+ List<Gear> getAllScientificGear();
+
+ List<Gear> getAllFishingGear();
+
+ List<Person> getAllPerson();
+
+ Person getPerson(Integer personId);
+
+}
Property changes on: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
1
0
r179 - in trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing: . content/cruise content/program content/protocol util
by kmorin@users.forge.codelutin.com 11 Jan '13
by kmorin@users.forge.codelutin.com 11 Jan '13
11 Jan '13
Author: kmorin
Date: 2013-01-11 20:00:31 +0100 (Fri, 11 Jan 2013)
New Revision: 179
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/179
Log:
refs #1908 [CONSOLIDATION] Mise en place des deux contextes de validation (pour les captures)
mise en place du widget dans les campagnes, programmes et protocoles
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/cruise/EditCruiseUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/cruise/EditCruiseUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/cruise/EditCruiseUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/program/EditProgramUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/program/EditProgramUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/program/EditProgramUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/SwingValidatorMessageWidget.java
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUIHandler.java 2013-01-11 17:47:58 UTC (rev 178)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUIHandler.java 2013-01-11 19:00:31 UTC (rev 179)
@@ -331,7 +331,7 @@
screenTitle = _("tutti.title.edit.program");
}
- screenUI = new EditProgramUI(context);
+ screenUI = new EditProgramUI(ui);
break;
case EDIT_CRUISE:
@@ -342,7 +342,7 @@
screenTitle = _("tutti.title.edit.cruise");
}
- screenUI = new EditCruiseUI(context);
+ screenUI = new EditCruiseUI(ui);
break;
case EDIT_PROTOCOL:
@@ -353,7 +353,7 @@
screenTitle = _("tutti.title.edit.protocol");
}
- screenUI = new EditProtocolUI(context);
+ screenUI = new EditProtocolUI(ui);
break;
case EDIT_FISHING_OPERATION:
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/cruise/EditCruiseUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/cruise/EditCruiseUI.css 2013-01-11 17:47:58 UTC (rev 178)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/cruise/EditCruiseUI.css 2013-01-11 19:00:31 UTC (rev 179)
@@ -43,13 +43,6 @@
showReset: true;
}
-#splitPane {
- orientation: {JSplitPane.VERTICAL_SPLIT};
- resizeWeight: 0.3;
- oneTouchExpandable: true;
- continuousLayout: true;
-}
-
#nameLabel {
text: "tutti.label.cruise.name";
labelFor: {nameField};
@@ -208,19 +201,4 @@
actionIcon: generate;
text: "tutti.action.generateCampaignName";
enabled: {model.isCanGenerateName()};
-}
-
-#messagePanel {
- border: {BorderFactory.createTitledBorder(_("tutti.title.messages"))};
- /*height: 200;
- width: 500;*/
-}
-
-#errorTable {
- rowSelectionAllowed: true;
- autoCreateRowSorter: true;
- autoResizeMode: {JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS};
- cellSelectionEnabled: false;
- selectionMode: {ListSelectionModel.SINGLE_SELECTION};
- model: {errorTableModel};
-}
+}
\ No newline at end of file
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/cruise/EditCruiseUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/cruise/EditCruiseUI.jaxx 2013-01-11 17:47:58 UTC (rev 178)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/cruise/EditCruiseUI.jaxx 2013-01-11 19:00:31 UTC (rev 179)
@@ -30,6 +30,7 @@
fr.ifremer.tutti.persistence.entities.referential.Gear
fr.ifremer.tutti.persistence.entities.referential.Person
fr.ifremer.tutti.persistence.entities.referential.Vessel
+ fr.ifremer.tutti.ui.swing.TuttiUI
fr.ifremer.tutti.ui.swing.TuttiUIContext
jaxx.runtime.swing.editor.NumberEditor
@@ -53,8 +54,9 @@
<script><![CDATA[
- public EditCruiseUI(TuttiUIContext context) {
- EditCruiseUIHandler handler = new EditCruiseUIHandler(context, this);
+ public EditCruiseUI(TuttiUI parentUI) {
+ JAXXUtil.initContext(this, parentUI);
+ EditCruiseUIHandler handler = new EditCruiseUIHandler(parentUI, this);
setContextValue(handler);
handler.beforeInitUI();
}
@@ -90,137 +92,129 @@
</BeanValidator>
- <JSplitPane id='splitPane' constraints='BorderLayout.CENTER'>
- <Table fill='both'>
+ <Table fill='both'>
- <!-- cruise program / year / program part / name -->
- <row>
- <cell anchor='west'>
- <JLabel id='programLabel'/>
- </cell>
- <cell weightx='0.3'>
- <BeanComboBox id='surveyComboBox' constructorParams='this'
- genericType='Program'/>
- </cell>
- <cell anchor='west'>
- <JLabel id='yearLabel'/>
- </cell>
- <cell weightx='0.3'>
- <NumberEditor id='yearField' constructorParams='this'/>
- </cell>
- <cell>
- <JLabel id='surveyPartLabel'/>
- </cell>
- <cell weightx='0.3'>
- <JTextField id='surveyPartField'
- onKeyReleased='handler.setText(event, "surveyPart")'/>
- </cell>
- </row>
+ <!-- cruise program / year / program part / name -->
+ <row>
+ <cell anchor='west'>
+ <JLabel id='programLabel'/>
+ </cell>
+ <cell weightx='0.3'>
+ <BeanComboBox id='surveyComboBox' constructorParams='this'
+ genericType='Program'/>
+ </cell>
+ <cell anchor='west'>
+ <JLabel id='yearLabel'/>
+ </cell>
+ <cell weightx='0.3'>
+ <NumberEditor id='yearField' constructorParams='this'/>
+ </cell>
+ <cell>
+ <JLabel id='surveyPartLabel'/>
+ </cell>
+ <cell weightx='0.3'>
+ <JTextField id='surveyPartField'
+ onKeyReleased='handler.setText(event, "surveyPart")'/>
+ </cell>
+ </row>
- <!-- cruise name -->
- <row>
- <cell>
- <JLabel id='nameLabel'/>
- </cell>
- <cell weightx='0.3'>
- <JTextField id='nameField'
- onKeyReleased='handler.setText(event, "name")'/>
- </cell>
- <cell columns='2'>
- <JButton id='generateNameButton'
- onActionPerformed='handler.generateCampaignName()'/>
- </cell>
- <cell>
- <JLabel id='pocheLabel'/>
- </cell>
- <cell weightx='0.3'>
- <NumberEditor id='pocheField' constructorParams='this'/>
- </cell>
- </row>
+ <!-- cruise name -->
+ <row>
+ <cell>
+ <JLabel id='nameLabel'/>
+ </cell>
+ <cell weightx='0.3'>
+ <JTextField id='nameField'
+ onKeyReleased='handler.setText(event, "name")'/>
+ </cell>
+ <cell columns='2'>
+ <JButton id='generateNameButton'
+ onActionPerformed='handler.generateCampaignName()'/>
+ </cell>
+ <cell>
+ <JLabel id='pocheLabel'/>
+ </cell>
+ <cell weightx='0.3'>
+ <NumberEditor id='pocheField' constructorParams='this'/>
+ </cell>
+ </row>
- <!-- cruise country / begin date / end date -->
- <row>
- <cell>
- <JLabel id='countryLabel'/>
- </cell>
- <cell weightx='0.3'>
- <BeanComboBox id='countryComboBox' constructorParams='this'
- genericType='Country'/>
- </cell>
- <cell>
- <JLabel id='beginDateLabel'/>
- </cell>
- <cell weightx='0.3'>
- <JXDatePicker id='beginDateField'
- onActionPerformed='handler.setDate(event, "beginDate")'/>
- </cell>
- <cell>
- <JLabel id='endDateLabel'/>
- </cell>
- <cell weightx='0.3'>
- <JXDatePicker id='endDateField'
- onActionPerformed='handler.setDate(event, "endDate")'/>
- </cell>
- </row>
+ <!-- cruise country / begin date / end date -->
+ <row>
+ <cell>
+ <JLabel id='countryLabel'/>
+ </cell>
+ <cell weightx='0.3'>
+ <BeanComboBox id='countryComboBox' constructorParams='this'
+ genericType='Country'/>
+ </cell>
+ <cell>
+ <JLabel id='beginDateLabel'/>
+ </cell>
+ <cell weightx='0.3'>
+ <JXDatePicker id='beginDateField'
+ onActionPerformed='handler.setDate(event, "beginDate")'/>
+ </cell>
+ <cell>
+ <JLabel id='endDateLabel'/>
+ </cell>
+ <cell weightx='0.3'>
+ <JXDatePicker id='endDateField'
+ onActionPerformed='handler.setDate(event, "endDate")'/>
+ </cell>
+ </row>
- <!-- cruise vessel / gear -->
- <row weighty='0.3'>
- <cell columns='6'>
- <JPanel layout='{new GridLayout(1, 0)}'>
- <JPanel id='vesselListPane' layout="{new BorderLayout()}">
- <JPanel id='vesselFilterPane' constraints='BorderLayout.NORTH'>
- <JLabel id='filterVesselLabel'/>
- <JRadioButton id='filterVesselAllButton'
- onActionPerformed='model.setVesselType(VesselTypeEnum.ALL)'/>
- <JRadioButton id='filterVesselScientificButton'
- onActionPerformed='model.setVesselType(VesselTypeEnum.SCIENTIFIC)'/>
- <JRadioButton id='filterVesselFishingButton'
- onActionPerformed='model.setVesselType(VesselTypeEnum.FISHING)'/>
- </JPanel>
- <BeanDoubleList id='vesselList' genericType='Vessel' constraints='BorderLayout.CENTER'/>
+ <!-- cruise vessel / gear -->
+ <row weighty='0.3'>
+ <cell columns='6'>
+ <JPanel layout='{new GridLayout(1, 0)}'>
+ <JPanel id='vesselListPane' layout="{new BorderLayout()}">
+ <JPanel id='vesselFilterPane' constraints='BorderLayout.NORTH'>
+ <JLabel id='filterVesselLabel'/>
+ <JRadioButton id='filterVesselAllButton'
+ onActionPerformed='model.setVesselType(VesselTypeEnum.ALL)'/>
+ <JRadioButton id='filterVesselScientificButton'
+ onActionPerformed='model.setVesselType(VesselTypeEnum.SCIENTIFIC)'/>
+ <JRadioButton id='filterVesselFishingButton'
+ onActionPerformed='model.setVesselType(VesselTypeEnum.FISHING)'/>
</JPanel>
- <BeanDoubleList id='gearList' genericType='Gear'/>
+ <BeanDoubleList id='vesselList' genericType='Vessel' constraints='BorderLayout.CENTER'/>
</JPanel>
- </cell>
- </row>
+ <BeanDoubleList id='gearList' genericType='Gear'/>
+ </JPanel>
+ </cell>
+ </row>
- <!-- cruise headOfMission / headOfSortRoom -->
- <row weighty='0.3'>
- <cell columns='6'>
- <JPanel layout='{new GridLayout(1, 0)}'>
- <BeanDoubleList id='headOfMissionList' genericType='Person'/>
- <BeanDoubleList id='headOfSortRoomList' genericType='Person'/>
- </JPanel>
- </cell>
- </row>
+ <!-- cruise headOfMission / headOfSortRoom -->
+ <row weighty='0.3'>
+ <cell columns='6'>
+ <JPanel layout='{new GridLayout(1, 0)}'>
+ <BeanDoubleList id='headOfMissionList' genericType='Person'/>
+ <BeanDoubleList id='headOfSortRoomList' genericType='Person'/>
+ </JPanel>
+ </cell>
+ </row>
- <!-- cruise comment -->
- <row weighty='0.3'>
- <cell columns='6'>
- <JScrollPane id='commentPane'
- onFocusGained='commentField.requestFocus()'>
- <JTextArea id='commentField'
- onKeyReleased='handler.setText(event, "comment")'/>
- </JScrollPane>
- </cell>
- </row>
+ <!-- cruise comment -->
+ <row weighty='0.3'>
+ <cell columns='6'>
+ <JScrollPane id='commentPane'
+ onFocusGained='commentField.requestFocus()'>
+ <JTextArea id='commentField'
+ onKeyReleased='handler.setText(event, "comment")'/>
+ </JScrollPane>
+ </cell>
+ </row>
- <!-- Form Actions -->
- <row>
- <cell columns='6'>
- <JPanel layout='{new GridLayout(1, 0)}'>
- <JButton id='cancelButton' onActionPerformed='handler.cancel()'/>
- <JButton id='saveButton' onActionPerformed='handler.save()'/>
- </JPanel>
- </cell>
- </row>
- </Table>
+ <!-- Form Actions -->
+ <row>
+ <cell columns='6'>
+ <JPanel layout='{new GridLayout(1, 0)}'>
+ <JButton id='cancelButton' onActionPerformed='handler.cancel()'/>
+ <JButton id='saveButton' onActionPerformed='handler.save()'/>
+ </JPanel>
+ </cell>
+ </row>
+ </Table>
- <JPanel id='messagePanel' layout='{new GridLayout()}'>
- <JScrollPane columnHeaderView='{errorTable.getTableHeader()}'>
- <JTable id='errorTable'/>
- </JScrollPane>
- </JPanel>
- </JSplitPane>
-
</JPanel>
\ No newline at end of file
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/cruise/EditCruiseUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/cruise/EditCruiseUIHandler.java 2013-01-11 17:47:58 UTC (rev 178)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/cruise/EditCruiseUIHandler.java 2013-01-11 19:00:31 UTC (rev 179)
@@ -33,20 +33,22 @@
import fr.ifremer.tutti.persistence.entities.referential.Vessel;
import fr.ifremer.tutti.service.PersistenceService;
import fr.ifremer.tutti.ui.swing.AbstractTuttiUIHandler;
+import fr.ifremer.tutti.ui.swing.MainUI;
import fr.ifremer.tutti.ui.swing.TuttiScreen;
+import fr.ifremer.tutti.ui.swing.TuttiUI;
import fr.ifremer.tutti.ui.swing.TuttiUIContext;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.util.List;
import jaxx.runtime.JAXXUtil;
import jaxx.runtime.context.JAXXContextEntryDef;
+import jaxx.runtime.validator.swing.SwingValidator;
import jaxx.runtime.validator.swing.SwingValidatorMessageTableRenderer;
import jaxx.runtime.validator.swing.SwingValidatorUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.util.List;
-
/**
* Handler of UI {@link EditCruiseUI}.
*
@@ -72,8 +74,8 @@
*/
private final PersistenceService persistenceService;
- public EditCruiseUIHandler(TuttiUIContext context, EditCruiseUI ui) {
- super(context);
+ public EditCruiseUIHandler(TuttiUI parentUi, EditCruiseUI ui) {
+ super(parentUi.getHandler().getContext());
this.ui = ui;
persistenceService = context.getService(PersistenceService.class);
}
@@ -179,6 +181,8 @@
EditCruiseUIModel model = getModel();
+ model.setVesselType(VesselTypeEnum.ALL);
+
// Change vessel list and gear list when vessel type changes
model.addPropertyChangeListener(EditCruiseUIModel.PROPERTY_VESSEL_TYPE, new PropertyChangeListener() {
@Override
@@ -237,15 +241,16 @@
users,
model.getHeadOfSortRoom());
- SwingValidatorUtil.installUI(ui.getErrorTable(),
- new SwingValidatorMessageTableRenderer());
+ SwingValidator validator = ui.getValidator();
+ listenValidatorValid(validator, model);
- listenValidatorValid(ui.getValidator(), model);
-
- model.setVesselType(VesselTypeEnum.ALL);
-
// if new fishingOperation can already cancel his creation
model.setModify(model.isCreate());
+
+ MainUI main = ui.getContextValue(MainUI.class, MainUI.class.getName());
+ main.clearValidators();
+ main.registerValidator(validator);
+
}
@Override
@@ -253,6 +258,8 @@
if (log.isInfoEnabled()) {
log.info("closing: " + ui);
}
+ MainUI main = ui.getContextValue(MainUI.class, MainUI.class.getName());
+ main.clearValidators();
}
@Override
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/program/EditProgramUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/program/EditProgramUI.css 2013-01-11 17:47:58 UTC (rev 178)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/program/EditProgramUI.css 2013-01-11 19:00:31 UTC (rev 179)
@@ -28,13 +28,6 @@
bean: {model};
}
-#splitPane {
- orientation: {JSplitPane.VERTICAL_SPLIT};
- resizeWeight: 0.3;
- oneTouchExpandable: true;
- continuousLayout: true;
-}
-
#form {
border: {BorderFactory.createTitledBorder((String)null)};
}
@@ -77,18 +70,3 @@
text: "tutti.action.cancel";
actionIcon: cancel;
}
-
-#messagePanel {
- border: {BorderFactory.createTitledBorder(_("tutti.title.messages"))};
- height: 200;
- width: 500;
-}
-
-#errorTable {
- rowSelectionAllowed: true;
- autoCreateRowSorter: true;
- autoResizeMode: {JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS};
- cellSelectionEnabled: false;
- selectionMode: {ListSelectionModel.SINGLE_SELECTION};
- model: {errorTableModel};
-}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/program/EditProgramUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/program/EditProgramUI.jaxx 2013-01-11 17:47:58 UTC (rev 178)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/program/EditProgramUI.jaxx 2013-01-11 19:00:31 UTC (rev 179)
@@ -26,6 +26,7 @@
<import>
fr.ifremer.tutti.persistence.entities.referential.Zone
+ fr.ifremer.tutti.ui.swing.TuttiUI
fr.ifremer.tutti.ui.swing.TuttiUIContext
jaxx.runtime.swing.editor.bean.BeanComboBox
@@ -42,8 +43,9 @@
<script><![CDATA[
- public EditProgramUI(TuttiUIContext context) {
- EditProgramUIHandler handler = new EditProgramUIHandler(context, this);
+ public EditProgramUI(TuttiUI parentUI) {
+ JAXXUtil.initContext(this, parentUI);
+ EditProgramUIHandler handler = new EditProgramUIHandler(parentUI, this);
setContextValue(handler);
handler.beforeInitUI();
}
@@ -68,59 +70,50 @@
<field name='comment' component='commentField'/>
</BeanValidator>
- <JSplitPane id='splitPane' constraints='BorderLayout.CENTER'>
+ <Table id='form' fill='both'>
- <Table id='form' fill='both'>
+ <!-- program name -->
+ <row>
+ <cell anchor='west'>
+ <JLabel id='nameLabel'/>
+ </cell>
+ <cell weightx='1.0'>
+ <JTextField id='nameField'
+ onKeyReleased='handler.setText(event, "name")'/>
+ </cell>
+ </row>
- <!-- program name -->
- <row>
- <cell anchor='west'>
- <JLabel id='nameLabel'/>
- </cell>
- <cell weightx='1.0'>
- <JTextField id='nameField'
- onKeyReleased='handler.setText(event, "name")'/>
- </cell>
- </row>
+ <!-- program zone -->
+ <row>
+ <cell>
+ <JLabel id='zoneLabel'/>
+ </cell>
+ <cell>
+ <BeanComboBox id='zoneComboBox' constructorParams='this'
+ genericType='Zone'/>
+ </cell>
+ </row>
- <!-- program zone -->
- <row>
- <cell>
- <JLabel id='zoneLabel'/>
- </cell>
- <cell>
- <BeanComboBox id='zoneComboBox' constructorParams='this'
- genericType='Zone'/>
- </cell>
- </row>
+ <!-- program comment -->
+ <row weighty='0.8'>
+ <cell columns='2'>
+ <JScrollPane id='commentPane'
+ onFocusGained='commentField.requestFocus()'>
+ <JTextArea id='commentField'
+ onKeyReleased='handler.setText(event, "comment")'/>
+ </JScrollPane>
+ </cell>
+ </row>
- <!-- program comment -->
- <row weighty='0.8'>
- <cell columns='2'>
- <JScrollPane id='commentPane'
- onFocusGained='commentField.requestFocus()'>
- <JTextArea id='commentField'
- onKeyReleased='handler.setText(event, "comment")'/>
- </JScrollPane>
- </cell>
- </row>
+ <!-- actions -->
+ <row anchor='south'>
+ <cell columns='2'>
+ <JPanel layout='{new GridLayout(1, 0)}'>
+ <JButton id='cancelButton' onActionPerformed='handler.cancel()'/>
+ <JButton id='saveButton' onActionPerformed='handler.save()'/>
+ </JPanel>
+ </cell>
+ </row>
+ </Table>
- <!-- actions -->
- <row anchor='south'>
- <cell columns='2'>
- <JPanel layout='{new GridLayout(1, 0)}'>
- <JButton id='cancelButton' onActionPerformed='handler.cancel()'/>
- <JButton id='saveButton' onActionPerformed='handler.save()'/>
- </JPanel>
- </cell>
- </row>
- </Table>
-
- <!-- validation messages -->
- <JPanel id='messagePanel' layout='{new GridLayout()}'>
- <JScrollPane columnHeaderView='{errorTable.getTableHeader()}'>
- <JTable id='errorTable'/>
- </JScrollPane>
- </JPanel>
- </JSplitPane>
</JPanel>
\ No newline at end of file
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/program/EditProgramUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/program/EditProgramUIHandler.java 2013-01-11 17:47:58 UTC (rev 178)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/program/EditProgramUIHandler.java 2013-01-11 19:00:31 UTC (rev 179)
@@ -28,8 +28,11 @@
import fr.ifremer.tutti.persistence.entities.data.Program;
import fr.ifremer.tutti.service.PersistenceService;
import fr.ifremer.tutti.ui.swing.AbstractTuttiUIHandler;
+import fr.ifremer.tutti.ui.swing.MainUI;
import fr.ifremer.tutti.ui.swing.TuttiScreen;
+import fr.ifremer.tutti.ui.swing.TuttiUI;
import fr.ifremer.tutti.ui.swing.TuttiUIContext;
+import jaxx.runtime.validator.swing.SwingValidator;
import jaxx.runtime.validator.swing.SwingValidatorMessageTableRenderer;
import jaxx.runtime.validator.swing.SwingValidatorUtil;
import org.apache.commons.logging.Log;
@@ -61,8 +64,8 @@
*/
private final PersistenceService persistenceService;
- public EditProgramUIHandler(TuttiUIContext context, EditProgramUI ui) {
- super(context);
+ public EditProgramUIHandler(TuttiUI parentUi, EditProgramUI ui) {
+ super(parentUi.getHandler().getContext());
this.ui = ui;
persistenceService = context.getService(PersistenceService.class);
}
@@ -102,11 +105,13 @@
persistenceService.getAllProgramZone(),
model.getZone());
- SwingValidatorUtil.installUI(ui.getErrorTable(),
- new SwingValidatorMessageTableRenderer());
+ SwingValidator validator = ui.getValidator();
+ listenValidatorValid(validator, model);
+
+ MainUI main = ui.getContextValue(MainUI.class, MainUI.class.getName());
+ main.clearValidators();
+ main.registerValidator(validator);
- listenValidatorValid(ui.getValidator(), model);
-
// if new program can already cancel his creation
model.setModify(model.isCreate());
}
@@ -116,7 +121,8 @@
if (log.isInfoEnabled()) {
log.info("closing: " + ui);
}
- ui.getValidator().setBean(null);
+ MainUI main = ui.getContextValue(MainUI.class, MainUI.class.getName());
+ main.clearValidators();
}
@Override
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.css 2013-01-11 17:47:58 UTC (rev 178)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.css 2013-01-11 19:00:31 UTC (rev 179)
@@ -30,13 +30,6 @@
bean: {model};
}
-#splitPane {
- orientation: {JSplitPane.VERTICAL_SPLIT};
- resizeWeight: 0.3;
- oneTouchExpandable: true;
- continuousLayout: true;
-}
-
#form {
border: {BorderFactory.createTitledBorder((String)null)};
}
@@ -70,21 +63,6 @@
actionIcon: cancel;
}
-#messagePanel {
- border: {BorderFactory.createTitledBorder(_("tutti.title.messages"))};
- /*height: 200;
- width: 500;*/
-}
-
-#errorTable {
- rowSelectionAllowed: true;
- autoCreateRowSorter: true;
- autoResizeMode: {JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS};
- cellSelectionEnabled: false;
- selectionMode: {ListSelectionModel.SINGLE_SELECTION};
- model: {errorTableModel};
-}
-
#speciesComboBox {
showReset: false;
enabled: {!speciesComboBox.isEmpty()};
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.jaxx 2013-01-11 17:47:58 UTC (rev 178)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUI.jaxx 2013-01-11 19:00:31 UTC (rev 179)
@@ -16,17 +16,18 @@
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 General Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/gpl-3.0.html>.
- #L%
- -->
+You should have received a copy of the GNU General Public
+License along with this program. If not, see
+<http://www.gnu.org/licenses/gpl-3.0.html>.
+#L%
+-->
<JPanel id='homePanel' layout='{new BorderLayout()}'
implements='fr.ifremer.tutti.ui.swing.TuttiUI<EditProtocolUIModel, EditProtocolUIHandler>'>
<import>
fr.ifremer.tutti.persistence.entities.referential.Caracteristic
fr.ifremer.tutti.persistence.entities.referential.Species
+ fr.ifremer.tutti.ui.swing.TuttiUI
fr.ifremer.tutti.ui.swing.TuttiUIContext
jaxx.runtime.swing.editor.bean.BeanComboBox
@@ -48,8 +49,9 @@
<script><![CDATA[
- public EditProtocolUI(TuttiUIContext context) {
- EditProtocolUIHandler handler = new EditProtocolUIHandler(context, this);
+ public EditProtocolUI(TuttiUI parentUI) {
+ JAXXUtil.initContext(this, parentUI);
+ EditProtocolUIHandler handler = new EditProtocolUIHandler(parentUI, this);
setContextValue(handler);
handler.beforeInitUI();
}
@@ -57,7 +59,8 @@
protected void $afterCompleteSetup() {
handler.afterInitUI();
}
- ]]></script>
+ ]]>
+ </script>
<EditProtocolUIHandler id='handler'
initializer='getContextValue(EditProtocolUIHandler.class)'/>
@@ -78,90 +81,80 @@
onActionPerformed='handler.removeSpecies()'/>
</JPopupMenu>
- <JSplitPane id='splitPane' constraints='BorderLayout.CENTER'>
+ <JTabbedPane constraints='BorderLayout.CENTER'>
+ <tab title='tutti.label.tab.protocol.info'>
+ <Table id='protocolInfoForm' fill='both'>
- <JPanel layout='{new BorderLayout()}'>
- <JTabbedPane constraints='BorderLayout.CENTER'>
- <tab title='tutti.label.tab.protocol.info'>
- <Table id='protocolInfoForm' fill='both'>
-
- <!-- protocol name -->
- <row>
- <cell anchor='west'>
- <JLabel id='nameLabel'/>
- </cell>
- <cell weightx='1.0'>
- <JTextField id='nameField'
+ <!-- protocol name -->
+ <row>
+ <cell anchor='west'>
+ <JLabel id='nameLabel'/>
+ </cell>
+ <cell weightx='1.0'>
+ <JTextField id='nameField'
onKeyReleased='handler.setText(event, "name")'/>
- </cell>
- </row>
+ </cell>
+ </row>
- <!-- program comment -->
- <row weighty='0.8'>
- <cell columns='2'>
- <JScrollPane id='commentPane'
+ <!-- program comment -->
+ <row weighty='0.8'>
+ <cell columns='2'>
+ <JScrollPane id='commentPane'
onFocusGained='commentField.requestFocus()'>
- <JTextArea id='commentField'
+ <JTextArea id='commentField'
onKeyReleased='handler.setText(event, "comment")'/>
- </JScrollPane>
- </cell>
- </row>
- </Table>
- </tab>
+ </JScrollPane>
+ </cell>
+ </row>
+ </Table>
+ </tab>
- <tab title='tutti.label.tab.protocol.species'>
- <Table fill='both'>
- <row fill='both'>
- <cell fill='both' weightx='1'>
- <BeanComboBox id='speciesComboBox' constructorParams='this'
+ <tab title='tutti.label.tab.protocol.species'>
+ <Table fill='both'>
+ <row fill='both'>
+ <cell fill='both' weightx='1'>
+ <BeanComboBox id='speciesComboBox' constructorParams='this'
genericType='Species'/>
- </cell>
- <cell fill='both'>
- <JButton id='addRow' onActionPerformed='handler.addRow()'/>
- </cell>
- </row>
- <row fill='both' weighty='1'>
- <cell fill='both' columns='2'>
- <JScrollPane>
- <JXTable id='speciesTable' onMouseClicked='handler.autoSelectRowInTable(event, tablePopup)'/>
- </JScrollPane>
- </cell>
- </row>
- </Table>
- </tab>
+ </cell>
+ <cell fill='both'>
+ <JButton id='addRow' onActionPerformed='handler.addRow()'/>
+ </cell>
+ </row>
+ <row fill='both' weighty='1'>
+ <cell fill='both' columns='2'>
+ <JScrollPane>
+ <JXTable id='speciesTable' onMouseClicked='handler.autoSelectRowInTable(event, tablePopup)'/>
+ </JScrollPane>
+ </cell>
+ </row>
+ </Table>
+ </tab>
- <tab title='tutti.label.tab.protocol.pmfm'>
- <Table fill='both' weightx='1'>
- <row fill='both' weighty='1'>
- <cell fill='both'>
- <BeanDoubleList id='gearList' genericType='Caracteristic'/>
- </cell>
- </row>
- <row fill='both' weighty='1'>
- <cell fill='both'>
- <BeanDoubleList id='environmentList'
+ <tab title='tutti.label.tab.protocol.pmfm'>
+ <Table fill='both' weightx='1'>
+ <row fill='both' weighty='1'>
+ <cell fill='both'>
+ <BeanDoubleList id='gearList' genericType='Caracteristic'/>
+ </cell>
+ </row>
+ <row fill='both' weighty='1'>
+ <cell fill='both'>
+ <BeanDoubleList id='environmentList'
genericType='Caracteristic'/>
- </cell>
- </row>
- <row fill='both' weighty='1'>
- <cell fill='both'>
- <BeanDoubleList id='hydrologyList' genericType='Caracteristic'/>
- </cell>
- </row>
- </Table>
- </tab>
- </JTabbedPane>
+ </cell>
+ </row>
+ <row fill='both' weighty='1'>
+ <cell fill='both'>
+ <BeanDoubleList id='hydrologyList' genericType='Caracteristic'/>
+ </cell>
+ </row>
+ </Table>
+ </tab>
+ </JTabbedPane>
- <JPanel layout='{new GridLayout(1, 0)}' constraints='BorderLayout.SOUTH'>
- <JButton id='cancelButton' onActionPerformed='handler.cancel()'/>
- <JButton id='saveButton' onActionPerformed='handler.save()'/>
- </JPanel>
+ <JPanel layout='{new GridLayout(1, 0)}' constraints='BorderLayout.SOUTH'>
+ <JButton id='cancelButton' onActionPerformed='handler.cancel()'/>
+ <JButton id='saveButton' onActionPerformed='handler.save()'/>
+ </JPanel>
- </JPanel>
- <JPanel id='messagePanel' layout='{new GridLayout()}'>
- <JScrollPane columnHeaderView='{errorTable.getTableHeader()}'>
- <JTable id='errorTable'/>
- </JScrollPane>
- </JPanel>
- </JSplitPane>
</JPanel>
\ No newline at end of file
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java 2013-01-11 17:47:58 UTC (rev 178)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java 2013-01-11 19:00:31 UTC (rev 179)
@@ -30,15 +30,15 @@
import com.google.common.collect.HashBiMap;
import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
-import com.google.common.collect.Sets;
import fr.ifremer.tutti.persistence.entities.TuttiEntities;
import fr.ifremer.tutti.persistence.entities.data.SampleCategoryEnum;
import fr.ifremer.tutti.persistence.entities.protocol.SpeciesProtocol;
import fr.ifremer.tutti.persistence.entities.protocol.TuttiProtocol;
import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
import fr.ifremer.tutti.persistence.entities.referential.Species;
+import fr.ifremer.tutti.ui.swing.MainUI;
import fr.ifremer.tutti.ui.swing.TuttiScreen;
-import fr.ifremer.tutti.ui.swing.TuttiUIContext;
+import fr.ifremer.tutti.ui.swing.TuttiUI;
import fr.ifremer.tutti.ui.swing.util.HydrologicCaracteristicUtil;
import fr.ifremer.tutti.ui.swing.util.TuttiBeanMonitor;
import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableUIHandler;
@@ -46,7 +46,6 @@
import java.util.Collection;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.TableColumnModelEvent;
@@ -54,6 +53,7 @@
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import jaxx.runtime.swing.editor.bean.BeanDoubleList;
+import jaxx.runtime.validator.swing.SwingValidator;
import jaxx.runtime.validator.swing.SwingValidatorMessageTableRenderer;
import jaxx.runtime.validator.swing.SwingValidatorUtil;
import org.apache.commons.collections.CollectionUtils;
@@ -96,8 +96,8 @@
*/
private final BiMap<ColumnIdentifier<EditProtocolSpeciesRowModel>, SampleCategoryEnum> columToSampleCategory;
- public EditProtocolUIHandler(TuttiUIContext context, EditProtocolUI ui) {
- super(context);
+ public EditProtocolUIHandler(TuttiUI parentUi, EditProtocolUI ui) {
+ super(parentUi.getHandler().getContext());
this.ui = ui;
columToSampleCategory = HashBiMap.create(SampleCategoryEnum.values().length-1);
columToSampleCategory.put(EditProtocolSpeciesTableModel.SIZE_ENABLED, SampleCategoryEnum.size);
@@ -220,11 +220,13 @@
model.fromBean(protocol);
}
- SwingValidatorUtil.installUI(ui.getErrorTable(),
- new SwingValidatorMessageTableRenderer());
+ SwingValidator validator = ui.getValidator();
+ listenValidatorValid(validator, model);
+
+ MainUI main = ui.getContextValue(MainUI.class, MainUI.class.getName());
+ main.clearValidators();
+ main.registerValidator(validator);
- listenValidatorValid(ui.getValidator(), model);
-
// create table model
JXTable table = getTable();
@@ -353,6 +355,8 @@
if (log.isInfoEnabled()) {
log.info("closing: " + ui);
}
+ MainUI main = ui.getContextValue(MainUI.class, MainUI.class.getName());
+ main.clearValidators();
}
@Override
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/SwingValidatorMessageWidget.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/SwingValidatorMessageWidget.java 2013-01-11 17:47:58 UTC (rev 178)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/SwingValidatorMessageWidget.java 2013-01-11 19:00:31 UTC (rev 179)
@@ -123,6 +123,7 @@
public void registerValidator(SwingValidator validator) {
errorTableModel.registerValidator(validator);
+ validator.reloadBean();
}
public void clearValidators() {
1
0
11 Jan '13
Author: kmorin
Date: 2013-01-11 18:47:58 +0100 (Fri, 11 Jan 2013)
New Revision: 178
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/178
Log:
[Trait] Mise en page
[PMFM] ajout des unit?\195?\169s et des lignes par d?\195?\169faut du protocole
[Captures] mise en page
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/environment/EnvironmentTabUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/environment/EnvironmentTabUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesRowModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesTableModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.css 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.css 2013-01-11 17:47:58 UTC (rev 178)
@@ -21,7 +21,7 @@
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
-
+
JToolBar {
floatable: false;
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.jaxx 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.jaxx 2013-01-11 17:47:58 UTC (rev 178)
@@ -121,20 +121,30 @@
<!-- Numero station / Numéro trait / Date -->
<row>
- <cell anchor='west'>
- <JLabel id='stationNumberLabel'/>
+ <cell columns='6'>
+ <Table fill="both" weightx='1'>
+ <row>
+ <cell>
+ <JPanel layout="{new BorderLayout()}">
+ <JLabel id='stationNumberLabel'
+ constraints='BorderLayout.WEST'/>
+ <JTextField id='stationNumberField'
+ constraints='BorderLayout.CENTER'
+ onKeyReleased='handler.setText(event, "stationNumber")'/>
+ </JPanel>
+ </cell>
+ <cell>
+ <JPanel layout="{new BorderLayout()}">
+ <JLabel id='fishingOperationNumberLabel'
+ constraints='BorderLayout.WEST'/>
+ <NumberEditor id='fishingOperationNumberField'
+ constraints='BorderLayout.CENTER'
+ constructorParams='this'/>
+ </JPanel>
+ </cell>
+ </row>
+ </Table>
</cell>
- <cell weightx='0.3'>
- <JTextField id='stationNumberField'
- onKeyReleased='handler.setText(event, "stationNumber")'/>
- </cell>
- <cell>
- <JLabel id='fishingOperationNumberLabel'/>
- </cell>
- <cell weightx='0.3'>
- <NumberEditor id='fishingOperationNumberField'
- constructorParams='this'/>
- </cell>
</row>
<!-- Strate d'association / Sous Strate / Localité -->
@@ -360,7 +370,7 @@
</row>
<!-- Commentaire -->
- <row weighty='0.3'>
+ <row weighty='0.3' fill='both'>
<cell columns='6' fill='both'>
<JScrollPane id='commentPane'
onFocusGained='commentField.requestFocus()'>
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.css 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.css 2013-01-11 17:47:58 UTC (rev 178)
@@ -34,7 +34,7 @@
}
#catchTotalWeightLabel {
- text: "tutti.label.catches.catchTotalWeight";
+ text: { "<html><strong>" + _("tutti.label.catches.catchTotalWeight") + "</strong></html>" };
labelFor: {catchTotalWeightField};
}
@@ -45,8 +45,12 @@
numberPattern: {INT_6_DIGITS_PATTERN};
}
+#catchTotalSortedWeightLabel {
+ text: "tutti.label.catches.catchTotalSortedWeight";
+}
+
#catchTotalSortedTremisWeightLabel {
- text: "tutti.label.catches.catchTotalSortedTremisWeight";
+ text: { _("tutti.label.catches.catchTotalSortedTremisWeight") + "*" };
labelFor: {catchTotalSortedTremisWeightField};
}
@@ -58,7 +62,7 @@
}
#catchTotalSortedCarousselWeightLabel {
- text: "tutti.label.catches.catchTotalSortedCarousselWeight";
+ text: { _("tutti.label.catches.catchTotalSortedCarousselWeight") + "*" };
labelFor: {catchTotalSortedCarousselWeightField};
}
@@ -91,12 +95,16 @@
text: {getStringValue(model.getCatchTotalUnsortedWeight())};
}
+#catchThalassaLabel {
+ text: { "* " + _("tutti.label.catches.catchThalassa")};
+}
+
#speciesTable {
border: {BorderFactory.createTitledBorder(_("tutti.legend.catch.species"))};
}
#speciesTotalWeightLabel {
- text: "tutti.label.catches.speciesTotalWeight";
+ text: { "<html><strong>" + _("tutti.label.catches.speciesTotalWeight") + "</strong></html>" };
labelFor: {speciesTotalWeightField};
}
@@ -120,7 +128,7 @@
}
#speciesTotalSampleSortedWeightLabel {
- text: "tutti.label.catches.speciesTotalSampleSortedWeight";
+ text: { "<html><em>" + _("tutti.label.catches.speciesTotalSampleSortedWeight") + "</em></html>" };
labelFor: {speciesTotalSampleSortedWeightField};
}
@@ -146,7 +154,7 @@
}
#benthosTotalWeightLabel {
- text: "tutti.label.catches.benthosTotalWeight";
+ text: { "<html><strong>" + _("tutti.label.catches.benthosTotalWeight") + "</strong></html>" };
labelFor: {benthosTotalWeightField};
}
@@ -170,7 +178,7 @@
}
#benthosTotalSampleSortedWeightLabel {
- text: "tutti.label.catches.benthosTotalSampleSortedWeight";
+ text: { "<html><em>" + _("tutti.label.catches.benthosTotalSampleSortedWeight") + "</em></html>" };
labelFor: {benthosTotalSampleSortedWeightField};
}
@@ -196,7 +204,7 @@
}
#macroWasteTotalWeightLabel {
- text: "tutti.label.catches.macroWasteTotalWeight";
+ text: { "<html><strong>" + _("tutti.label.catches.macroWasteTotalWeight") + "</strong></html>" };
labelFor: {macroWasteTotalWeightField};
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.jaxx 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.jaxx 2013-01-11 17:47:58 UTC (rev 178)
@@ -101,7 +101,7 @@
<Table id="catchesForm" fill='both' weightx='1'
constraints='BorderLayout.NORTH'>
<row>
- <cell columns='2'>
+ <cell>
<Table id='catchTable' fill='both'>
<!-- Poids total capture -->
@@ -109,51 +109,59 @@
<cell anchor='west'>
<JLabel id='catchTotalWeightLabel'/>
</cell>
- <cell weightx='1.0'>
+ <cell columns='4'>
<NumberEditor id='catchTotalWeightField'
constructorParams='this'/>
</cell>
- <cell columns="2">
- </cell>
</row>
<!-- Poids total trié balance tremis / caroussel-->
<row>
<cell anchor='west'>
- <JLabel id='catchTotalSortedTremisWeightLabel'/>
+ <JLabel id='catchTotalSortedWeightLabel'/>
</cell>
+ <cell anchor='west'>
+ <JLabel id='catchTotalSortedCarousselWeightLabel'/>
+ </cell>
<cell weightx='1.0'>
- <NumberEditor id='catchTotalSortedTremisWeightField'
+ <NumberEditor id='catchTotalSortedCarousselWeightField'
constructorParams='this'/>
</cell>
<cell anchor='west'>
- <JLabel id='catchTotalSortedCarousselWeightLabel'/>
+ <JLabel id='catchTotalSortedTremisWeightLabel'/>
</cell>
<cell weightx='1.0'>
- <NumberEditor id='catchTotalSortedCarousselWeightField'
+ <NumberEditor id='catchTotalSortedTremisWeightField'
constructorParams='this'/>
</cell>
</row>
-
- <!-- Poids total rejeté / Poids total hors vrac -->
+ <!--Poids total hors vrac-->
<row>
<cell>
+ <JLabel id='catchTotalUnsortedWeightLabel'/>
+ </cell>
+ <cell columns='4'>
+ <JTextField id='catchTotalUnsortedWeightField'/>
+ </cell>
+ </row>
+ <!-- Poids total rejeté -->
+ <row>
+ <cell>
<JLabel id='catchTotalRejectedWeightLabel'/>
</cell>
- <cell>
+ <cell columns='4'>
<NumberEditor id='catchTotalRejectedWeightField'
constructorParams='this'/>
</cell>
- <cell>
- <JLabel id='catchTotalUnsortedWeightLabel'/>
- </cell>
- <cell>
- <JTextField id='catchTotalUnsortedWeightField'/>
- </cell>
</row>
</Table>
</cell>
</row>
<row>
+ <cell anchor='west' insets='0, 20, 3, 0'>
+ <JLabel id='catchThalassaLabel'/>
+ </cell>
+ </row>
+ <row>
<cell>
<Table id='speciesTable' fill='both'>
@@ -199,6 +207,8 @@
</row>
</Table>
</cell>
+ </row>
+ <row>
<cell>
<Table id='benthosTable' fill='both'>
<!-- Poids total capture -->
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/environment/EnvironmentTabUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/environment/EnvironmentTabUI.jaxx 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/environment/EnvironmentTabUI.jaxx 2013-01-11 17:47:58 UTC (rev 178)
@@ -67,6 +67,7 @@
<script><![CDATA[
public EnvironmentTabUI(EditFishingOperationUI parentUI) {
+ JAXXUtil.initContext(this, parentUI);
EnvironmentTabUIHandler handler = new EnvironmentTabUIHandler(parentUI, this);
setContextValue(handler);
handler.beforeInitUI();
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/environment/EnvironmentTabUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/environment/EnvironmentTabUIHandler.java 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/environment/EnvironmentTabUIHandler.java 2013-01-11 17:47:58 UTC (rev 178)
@@ -29,13 +29,14 @@
import fr.ifremer.tutti.persistence.entities.CaracteristicMap;
import fr.ifremer.tutti.persistence.entities.TuttiEntities;
import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
+import fr.ifremer.tutti.persistence.entities.protocol.TuttiProtocol;
import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
+import fr.ifremer.tutti.service.DecoratorService;
import fr.ifremer.tutti.ui.swing.content.operation.EditFishingOperationUI;
import fr.ifremer.tutti.ui.swing.util.TuttiBeanMonitor;
import fr.ifremer.tutti.ui.swing.util.editor.CaracteristicValueEditor;
import fr.ifremer.tutti.ui.swing.util.editor.CaracteristicValueRenderer;
import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableUIHandler;
-import java.util.Collection;
import java.util.List;
import jaxx.runtime.swing.editor.bean.BeanComboBox;
import org.apache.commons.logging.Log;
@@ -153,7 +154,7 @@
addColumnToModel(columnModel,
null,
- newTableCellRender(Caracteristic.class),
+ newTableCellRender(Caracteristic.class, DecoratorService.CARACTERISTIC_WITH_UNIT),
EnvironmentTableModel.KEY);
}
@@ -227,21 +228,35 @@
environmentCaracteristics = new CaracteristicMap();
}
+ TuttiProtocol protocol = ui.getContextValue(TuttiProtocol.class);
+ List<String> environmentPmfmIds = Lists.newArrayList();
+ if (protocol != null) {
+ environmentPmfmIds.addAll(protocol.getEnvironmentPmfmId());
+ }
+
List<EnvironmentRowModel> rows = Lists.newArrayList();
- Collection<Caracteristic> caracteristics = environmentCaracteristics.keySet();
+ List<Caracteristic> caracteristics = Lists.newArrayList(environmentCaracteristics.keySet());
+ List<Caracteristic> availableCaracteristics = model.getAvailableCaracteristics();
+ for (String id : environmentPmfmIds) {
+ Caracteristic caracteristic = TuttiEntities.findById(availableCaracteristics, id);
+ if (!caracteristics.contains(caracteristic)) {
+ caracteristics.add(caracteristic);
+ }
+ }
+
for (Caracteristic key : caracteristics) {
EnvironmentRowModel newRow = tableModel.createNewRow();
newRow.setKey(key);
newRow.setValue(environmentCaracteristics.get(key));
rows.add(newRow);
}
-
+
model.setRows(rows);
List<Caracteristic> caracteristicList = Lists.newArrayList();
- for (Caracteristic caracteristic : model.getAvailableCaracteristics()) {
+ for (Caracteristic caracteristic : availableCaracteristics) {
if (!caracteristics.contains(caracteristic)) {
caracteristicList.add(caracteristic);
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUI.jaxx 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUI.jaxx 2013-01-11 17:47:58 UTC (rev 178)
@@ -66,6 +66,7 @@
<script><![CDATA[
public GearShootingTabUI(EditFishingOperationUI parentUI) {
+ JAXXUtil.initContext(this, parentUI);
GearShootingTabUIHandler handler = new GearShootingTabUIHandler(parentUI, this);
setContextValue(handler);
handler.beforeInitUI();
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUIHandler.java 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUIHandler.java 2013-01-11 17:47:58 UTC (rev 178)
@@ -29,21 +29,21 @@
import fr.ifremer.tutti.persistence.entities.CaracteristicMap;
import fr.ifremer.tutti.persistence.entities.TuttiEntities;
import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
+import fr.ifremer.tutti.persistence.entities.protocol.TuttiProtocol;
import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
+import fr.ifremer.tutti.service.DecoratorService;
import fr.ifremer.tutti.ui.swing.content.operation.EditFishingOperationUI;
import fr.ifremer.tutti.ui.swing.util.TuttiBeanMonitor;
import fr.ifremer.tutti.ui.swing.util.editor.CaracteristicValueEditor;
import fr.ifremer.tutti.ui.swing.util.editor.CaracteristicValueRenderer;
import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableUIHandler;
+import java.util.List;
import jaxx.runtime.swing.editor.bean.BeanComboBox;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jdesktop.swingx.JXTable;
import org.jdesktop.swingx.table.DefaultTableColumnModelExt;
-import java.util.Collection;
-import java.util.List;
-
/**
* @author kmorin
* @since 0.3
@@ -156,7 +156,7 @@
addColumnToModel(columnModel,
null,
- newTableCellRender(Caracteristic.class),
+ newTableCellRender(Caracteristic.class, DecoratorService.CARACTERISTIC_WITH_UNIT),
GearShootingTableModel.KEY);
}
@@ -231,9 +231,23 @@
gearShootingCaracteristics = new CaracteristicMap();
}
+ TuttiProtocol protocol = ui.getContextValue(TuttiProtocol.class);
+ List<String> gearPmfmIds = Lists.newArrayList();
+ if (protocol != null) {
+ gearPmfmIds.addAll(protocol.getGearPmfmId());
+ }
+
List<GearShootingRowModel> rows = Lists.newArrayList();
- Collection<Caracteristic> caracteristics = gearShootingCaracteristics.keySet();
+ List<Caracteristic> caracteristics = Lists.newArrayList(gearShootingCaracteristics.keySet());
+ List<Caracteristic> availableCaracteristics = model.getAvailableCaracteristics();
+ for (String id : gearPmfmIds) {
+ Caracteristic caracteristic = TuttiEntities.findById(availableCaracteristics, id);
+ if (!caracteristics.contains(caracteristic)) {
+ caracteristics.add(caracteristic);
+ }
+ }
+
for (Caracteristic key : caracteristics) {
GearShootingRowModel newRow = tableModel.createNewRow();
newRow.setKey(key);
@@ -244,7 +258,7 @@
List<Caracteristic> caracteristicList = Lists.newArrayList();
- for (Caracteristic caracteristic : model.getAvailableCaracteristics()) {
+ for (Caracteristic caracteristic : availableCaracteristics) {
if (!caracteristics.contains(caracteristic)) {
caracteristicList.add(caracteristic);
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUI.jaxx 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUI.jaxx 2013-01-11 17:47:58 UTC (rev 178)
@@ -67,6 +67,7 @@
<script><![CDATA[
public HydrologyTabUI(EditFishingOperationUI parentUI) {
+ JAXXUtil.initContext(this, parentUI);
HydrologyTabUIHandler handler = new HydrologyTabUIHandler(parentUI, this);
setContextValue(handler);
handler.beforeInitUI();
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUIHandler.java 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUIHandler.java 2013-01-11 17:47:58 UTC (rev 178)
@@ -30,7 +30,9 @@
import fr.ifremer.tutti.persistence.entities.CaracteristicMap;
import fr.ifremer.tutti.persistence.entities.TuttiEntities;
import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
+import fr.ifremer.tutti.persistence.entities.protocol.TuttiProtocol;
import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
+import fr.ifremer.tutti.service.DecoratorService;
import fr.ifremer.tutti.ui.swing.content.operation.EditFishingOperationUI;
import fr.ifremer.tutti.ui.swing.util.HydrologicCaracteristicUtil;
import fr.ifremer.tutti.ui.swing.util.HydrologicCaracteristicUtil.Type;
@@ -38,19 +40,17 @@
import fr.ifremer.tutti.ui.swing.util.editor.CaracteristicValueEditor;
import fr.ifremer.tutti.ui.swing.util.editor.CaracteristicValueRenderer;
import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableUIHandler;
-import jaxx.runtime.swing.editor.bean.BeanComboBox;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jdesktop.swingx.JXTable;
-import org.jdesktop.swingx.table.DefaultTableColumnModelExt;
-
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.Serializable;
-import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import jaxx.runtime.swing.editor.bean.BeanComboBox;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jdesktop.swingx.JXTable;
+import org.jdesktop.swingx.table.DefaultTableColumnModelExt;
/**
* @author kmorin
@@ -68,7 +68,7 @@
*/
protected final HydrologyTabUI ui;
- protected Map<Caracteristic, Map<Type, Caracteristic>> availableCaracteristics;
+ protected Map<Caracteristic, Map<Type, Caracteristic>> availableGlobalCaracteristics;
public HydrologyTabUIHandler(EditFishingOperationUI parentUi,
HydrologyTabUI ui) {
@@ -158,15 +158,15 @@
public void propertyChange(PropertyChangeEvent evt) {
List<Caracteristic> hydrologyPmfm = (List<Caracteristic>) evt.getNewValue();
- availableCaracteristics = Maps.newHashMap();
+ availableGlobalCaracteristics = Maps.newHashMap();
if (hydrologyPmfm != null) {
for (Caracteristic caracteristic : hydrologyPmfm) {
String name = HydrologicCaracteristicUtil.getGlobalName(caracteristic.getName());
Caracteristic globalCaracteristic = HydrologicCaracteristicUtil.createGlobalCaracteristic(name, caracteristic);
- Map<Type, Caracteristic> values = availableCaracteristics.get(globalCaracteristic);
+ Map<Type, Caracteristic> values = availableGlobalCaracteristics.get(globalCaracteristic);
if (values == null) {
values = Maps.newHashMap();
- availableCaracteristics.put(globalCaracteristic, values);
+ availableGlobalCaracteristics.put(globalCaracteristic, values);
}
Type type = HydrologicCaracteristicUtil.getTypeOfCaracteristic(caracteristic);
values.put(type, caracteristic);
@@ -193,7 +193,7 @@
addColumnToModel(columnModel,
null,
- newTableCellRender(Caracteristic.class),
+ newTableCellRender(Caracteristic.class, DecoratorService.CARACTERISTIC_WITH_UNIT),
HydrologyTableModel.KEY);
}
@@ -283,13 +283,28 @@
hydrologyCaracteristics = new CaracteristicMap();
}
+ TuttiProtocol protocol = ui.getContextValue(TuttiProtocol.class);
+ List<String> gearPmfmIds = Lists.newArrayList();
+ if (protocol != null) {
+ gearPmfmIds.addAll(protocol.getHydrologyPmfmId());
+ }
+
List<HydrologyRowModel> rows = Lists.newArrayList();
List<Caracteristic> caracteristicList = Lists.newArrayList();
- Collection<Caracteristic> selectedCaracteristics = hydrologyCaracteristics.keySet();
- Set<Caracteristic> globalCaracteristics = availableCaracteristics.keySet();
+ List<Caracteristic> selectedCaracteristics = Lists.newArrayList(hydrologyCaracteristics.keySet());
+
+ List<Caracteristic> availableCaracteristics = model.getAvailableCaracteristics();
+ for (String id : gearPmfmIds) {
+ Caracteristic caracteristic = TuttiEntities.findById(availableCaracteristics, id);
+ if (!selectedCaracteristics.contains(caracteristic)) {
+ selectedCaracteristics.add(caracteristic);
+ }
+ }
+
+ Set<Caracteristic> globalCaracteristics = availableGlobalCaracteristics.keySet();
for (Caracteristic availableCaracteristic : globalCaracteristics) {
- Map<Type, Caracteristic> caracteristics = availableCaracteristics.get(availableCaracteristic);
+ Map<Type, Caracteristic> caracteristics = availableGlobalCaracteristics.get(availableCaracteristic);
//should add the global caracteristic to the combo or to the table?
boolean selectedCaracteristic = false;
@@ -328,7 +343,7 @@
FishingOperation fishingOperation = getModel().getFishingOperation();
Preconditions.checkNotNull(fishingOperation);
- Map<Type, Caracteristic> caracteristics = availableCaracteristics.get(row.getKey());
+ Map<Type, Caracteristic> caracteristics = availableGlobalCaracteristics.get(row.getKey());
for (Type type : caracteristics.keySet()) {
Caracteristic caracteristic = caracteristics.get(type);
fishingOperation.getHydrologyCaracteristics().remove(caracteristic);
@@ -366,7 +381,7 @@
if (fishingOperation.getHydrologyCaracteristics() == null) {
fishingOperation.setHydrologyCaracteristics(new CaracteristicMap());
}
- Map<Type, Caracteristic> caracteristics = availableCaracteristics.get(row.getKey());
+ Map<Type, Caracteristic> caracteristics = availableGlobalCaracteristics.get(row.getKey());
CaracteristicMap map = new CaracteristicMap();
for (Type type : caracteristics.keySet()) {
Serializable value = null;
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesRowModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesRowModel.java 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesRowModel.java 2013-01-11 17:47:58 UTC (rev 178)
@@ -50,6 +50,8 @@
public static final String PROPERTY_AGE_ENABLED = "ageEnabled";
public static final String PROPERTY_LENGTH_STEP_PMFM = "lengthStepPmfm";
+
+ public static final String PROPERTY_SORTED_UNSORTED = "sortedUnsorted";
protected Species species;
@@ -60,6 +62,8 @@
protected boolean maturityEnabled;
protected boolean ageEnabled;
+
+ protected boolean sortedUnsorted;
protected Caracteristic lengthStepPmfm;
@@ -129,6 +133,16 @@
firePropertyChange(PROPERTY_AGE_ENABLED, oldValue, ageEnabled);
}
+ public boolean isSortedUnsorted() {
+ return sortedUnsorted;
+ }
+
+ public void setSortedUnsorted(boolean sortedUnsorted) {
+ Object oldValue = isSortedUnsorted();
+ this.sortedUnsorted = sortedUnsorted;
+ firePropertyChange(PROPERTY_SORTED_UNSORTED, oldValue, sortedUnsorted);
+ }
+
public String getLengthStepPmfmId() {
return lengthStepPmfm != null ? lengthStepPmfm.getId() : null;
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesTableModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesTableModel.java 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesTableModel.java 2013-01-11 17:47:58 UTC (rev 178)
@@ -66,6 +66,11 @@
EditProtocolSpeciesRowModel.PROPERTY_LENGTH_STEP_PMFM,
n_("tutti.table.protocol.species.header.lengthStep"),
n_("tutti.table.protocol.species.header.lengthStep"));
+
+ public static final ColumnIdentifier<EditProtocolSpeciesRowModel> SORTED_UNSORTED = ColumnIdentifier.newId(
+ EditProtocolSpeciesRowModel.PROPERTY_SORTED_UNSORTED,
+ n_("tutti.table.protocol.species.header.sortedUnsorted"),
+ n_("tutti.table.protocol.species.header.sortedUnsorted"));
private static final long serialVersionUID = 1L;
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java 2013-01-11 17:47:58 UTC (rev 178)
@@ -104,6 +104,7 @@
columToSampleCategory.put(EditProtocolSpeciesTableModel.SEX_ENABLED, SampleCategoryEnum.sex);
columToSampleCategory.put(EditProtocolSpeciesTableModel.MATURITY_ENABLED, SampleCategoryEnum.maturity);
columToSampleCategory.put(EditProtocolSpeciesTableModel.AGE_ENABLED, SampleCategoryEnum.age);
+ columToSampleCategory.put(EditProtocolSpeciesTableModel.SORTED_UNSORTED, SampleCategoryEnum.sortedUnsorted);
}
//------------------------------------------------------------------------//
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java 2013-01-11 17:47:58 UTC (rev 178)
@@ -251,9 +251,7 @@
public static String getDuration(Date startDate, Date endDate, String format) {
String duration = "";
- DateFormat df = DateFormat.getTimeInstance();
if (startDate != null && endDate != null) {
- log.info(df.format(startDate) + " " + df.format(endDate));
duration = DurationFormatUtils.formatPeriod(
startDate.getTime(), endDate.getTime() + 60000, _(format));
}
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-01-11 17:42:37 UTC (rev 177)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-01-11 17:47:58 UTC (rev 178)
@@ -59,22 +59,24 @@
tutti.label.attachmentEditor.file=Fichier
tutti.label.attachmentEditor.fileComment=Commentaire
tutti.label.attachmentEditor.fileName=Nom
-tutti.label.catches.benthosTotalSampleSortedWeight=Poids total vrac échantillonné
-tutti.label.catches.benthosTotalSortedWeight=Poids total vrac
-tutti.label.catches.benthosTotalUnsortedWeight=Poids total hors vrac
-tutti.label.catches.benthosTotalWeight=Poids total
-tutti.label.catches.catchTotalRejectedWeight=Poids total rejeté
-tutti.label.catches.catchTotalSortedCarousselWeight=Poids total vrac (Caroussel)
-tutti.label.catches.catchTotalSortedTremisWeight=Poids total vrac (Tremis)
-tutti.label.catches.catchTotalUnsortedWeight=Poids total hors vrac
-tutti.label.catches.catchTotalWeight=Poids total
-tutti.label.catches.macroWasteTotalWeight=Poids total
+tutti.label.catches.benthosTotalSampleSortedWeight=Poids VRAC trié (kg)
+tutti.label.catches.benthosTotalSortedWeight=Poids total VRAC (kg)
+tutti.label.catches.benthosTotalUnsortedWeight=Poids total HORS VRAC (kg)
+tutti.label.catches.benthosTotalWeight=Poids TOTAL (kg)
+tutti.label.catches.catchThalassa=sur Thalassa
+tutti.label.catches.catchTotalRejectedWeight=Poids total REJETÉ (kg)
+tutti.label.catches.catchTotalSortedCarousselWeight=Caroussel Observé
+tutti.label.catches.catchTotalSortedTremisWeight=Tremis
+tutti.label.catches.catchTotalSortedWeight=Poids total VRAC (kg)
+tutti.label.catches.catchTotalUnsortedWeight=Poids total HORS VRAC (kg)
+tutti.label.catches.catchTotalWeight=Poids TOTAL (kg)
+tutti.label.catches.macroWasteTotalWeight=Poids TOTAL (kg)
tutti.label.catches.planktonTotalSampleWeight=Poids total échantillonné
tutti.label.catches.planktonTotalWeight=Poids total
-tutti.label.catches.speciesTotalSampleSortedWeight=Poids total vrac échantillonné
-tutti.label.catches.speciesTotalSortedWeight=Poids total vrac
-tutti.label.catches.speciesTotalUnsortedWeight=Poids total hors vrac
-tutti.label.catches.speciesTotalWeight=Poids total
+tutti.label.catches.speciesTotalSampleSortedWeight=Poids VRAC trié (kg)
+tutti.label.catches.speciesTotalSortedWeight=Poids total VRAC (kg)
+tutti.label.catches.speciesTotalUnsortedWeight=Poids total HORS VRAC (kg)
+tutti.label.catches.speciesTotalWeight=Poids TOTAL (kg)
tutti.label.comment=Commentaire
tutti.label.createSpeciesBatch.batchWeight=Poids du lot
tutti.label.createSpeciesBatch.species=Espèce du lot
1
0
r177 - trunk/tutti-service/src/main/java/fr/ifremer/tutti/service
by kmorin@users.forge.codelutin.com 11 Jan '13
by kmorin@users.forge.codelutin.com 11 Jan '13
11 Jan '13
Author: kmorin
Date: 2013-01-11 18:42:37 +0100 (Fri, 11 Jan 2013)
New Revision: 177
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/177
Log:
add decorator
Modified:
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/DecoratorService.java
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/DecoratorService.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/DecoratorService.java 2013-01-11 16:17:12 UTC (rev 176)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/DecoratorService.java 2013-01-11 17:42:37 UTC (rev 177)
@@ -39,13 +39,11 @@
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.persistence.entities.referential.Vessel;
import fr.ifremer.tutti.persistence.entities.referential.Zone;
+import java.io.Serializable;
+import static org.nuiton.i18n.I18n.n_;
import org.nuiton.util.decorator.Decorator;
import org.nuiton.util.decorator.DecoratorProvider;
-import java.io.Serializable;
-
-import static org.nuiton.i18n.I18n.n_;
-
/**
* Tutti decorator service.
*
@@ -67,6 +65,8 @@
public static final String SPECIES_BY_CODE = "byCode";
public static final String SPECIES_BY_GENUS = "byGenus";
+
+ public static final String CARACTERISTIC_WITH_UNIT = "withUnit";
public static final String BY_NAME = "byName";
@@ -110,6 +110,7 @@
registerMultiJXPathDecorator(Person.class, "${firstName}$s#${lastName}$s", SEPARATOR, " ");
registerMultiJXPathDecorator(FishingOperationLocation.class, "${name}$s", SEPARATOR, " - ");
registerMultiJXPathDecorator(Caracteristic.class, "${name}$s", SEPARATOR, " - ");
+ registerMultiJXPathDecorator(Caracteristic.class, CARACTERISTIC_WITH_UNIT, "${name}$s (${unit}$s)", SEPARATOR, " - ");
registerMultiJXPathDecorator(CaracteristicQualitativeValue.class, "${name}$s", SEPARATOR, " - ");
registerMultiJXPathDecorator(Species.class, "${codeMemo}$s#${genusSpecies}$s", SEPARATOR, " - ");
registerMultiJXPathDecorator(Species.class, SPECIES_BY_CODE, "${codeMemo}$s", SEPARATOR, " - ");
1
0
r176 - in trunk: . src/site tutti-persistence-adagio/src/main tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence tutti-persistence-adagio/src/main/resources tutti-persistence-adagio/src/main/site tutti-persistence-adagio/src/main/site/rst tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util tutti-ui-swing/src/main/resources/icons
by tchemit@users.forge.codelutin.com 11 Jan '13
by tchemit@users.forge.codelutin.com 11 Jan '13
11 Jan '13
Author: tchemit
Date: 2013-01-11 17:17:12 +0100 (Fri, 11 Jan 2013)
New Revision: 176
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/176
Log:
use last stable of eugene
refs #1807: [Persistence] Adagio r?\195?\169f?\195?\169rentiel (doc + continue)
add missing svn properties + license header
Added:
trunk/tutti-persistence-adagio/src/main/site/
trunk/tutti-persistence-adagio/src/main/site/rst/
trunk/tutti-persistence-adagio/src/main/site/rst/referential.rst
trunk/tutti-persistence-adagio/src/main/site/site_fr.xml
Modified:
trunk/pom.xml
trunk/src/site/site_fr.xml
trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java
trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml
trunk/tutti-persistence-adagio/src/main/resources/tutti-db-enumerations.properties
trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ReferentialTest.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/SwingValidatorMessageWidget.java
trunk/tutti-ui-swing/src/main/resources/icons/action-table-error.png
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2013-01-11 14:50:40 UTC (rev 175)
+++ trunk/pom.xml 2013-01-11 16:17:12 UTC (rev 176)
@@ -125,7 +125,7 @@
<nuitonUtilsVersion>2.7-SNAPSHOT</nuitonUtilsVersion>
<nuitonI18nVersion>2.5</nuitonI18nVersion>
- <eugenePluginVersion>2.6.1-SNAPSHOT</eugenePluginVersion>
+ <eugenePluginVersion>2.6.1</eugenePluginVersion>
<hibernateVersion>3.6.10.Final</hibernateVersion>
<h2Version>1.3.168</h2Version>
<postgresqlVersion>9.1-901-1.jdbc4</postgresqlVersion>
Modified: trunk/src/site/site_fr.xml
===================================================================
--- trunk/src/site/site_fr.xml 2013-01-11 14:50:40 UTC (rev 175)
+++ trunk/src/site/site_fr.xml 2013-01-11 16:17:12 UTC (rev 176)
@@ -94,7 +94,7 @@
href="${project.url}/index.html"/>
</breadcrumbs>
- <menu name="Sammoa">
+ <menu name="Tutti">
<item name="Accueil" href="index.html"/>
<item name="Configuration" href="./application-config-report.html"/>
<item name="Téléchargement"
Modified: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java
===================================================================
--- trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java 2013-01-11 14:50:40 UTC (rev 175)
+++ trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java 2013-01-11 16:17:12 UTC (rev 176)
@@ -171,13 +171,7 @@
List<Vessel> result = Lists.newArrayList();
while (list.hasNext()) {
Object[] source = list.next();
- Vessel target = new Vessel();
- target.setScientificVessel(true);
- target.setId((String) source[0]);
- target.setRegistrationCode((String) source[1]);
- target.setInternalRegistrationCode((String) source[2]);
- target.setName((String) source[3]);
- setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[4], target);
+ Vessel target = loadVessel(source);
result.add(target);
}
return result;
@@ -199,16 +193,6 @@
return result;
}
- protected Vessel loadVessel(Object[] source) {
- Vessel target = new Vessel();
- target.setId((String) source[0]);
- target.setRegistrationCode((String) source[1]);
- target.setInternalRegistrationCode((String) source[2]);
- target.setName((String) source[3]);
- setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[4], target);
- return target;
- }
-
@Override
public List<Gear> getAllScientificGear() {
@@ -218,11 +202,7 @@
List<Gear> result = Lists.newArrayList();
while (sources.hasNext()) {
Object[] source = sources.next();
- Gear target = new Gear();
- target.setId(String.valueOf(source[0]));
- target.setName(String.valueOf(source[1]));
- target.setLabel(String.valueOf(source[2]));
- setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[3], target);
+ Gear target = loadGear(source);
result.add(target);
}
return result;
@@ -236,11 +216,7 @@
List<Gear> result = Lists.newArrayList();
while (sources.hasNext()) {
Object[] source = sources.next();
- Gear target = new Gear();
- target.setId(String.valueOf(source[0]));
- target.setName(String.valueOf(source[1]));
- target.setLabel(String.valueOf(source[2]));
- setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[3], target);
+ Gear target = loadGear(source);
result.add(target);
}
return result;
@@ -249,7 +225,11 @@
@Override
public List<Person> getAllPerson() {
Iterator<Object[]> list = queryList(
- "allPersons");
+ "allPersons",
+ "observerProfilId", IntegerType.INSTANCE, getEnumerationIntegerCode("UserProfilId.OBSERVER"),
+ "projectMemberProfilId", IntegerType.INSTANCE, getEnumerationIntegerCode("UserProfilId.PROJECT_MEMBER"),
+ "userProfilId", IntegerType.INSTANCE, getEnumerationIntegerCode("UserProfilId.USER")
+ );
List<Person> result = Lists.newArrayList();
while (list.hasNext()) {
@@ -318,7 +298,10 @@
public List<Caracteristic> getAllSpeciesLengthStepCaracteristic() {
Iterator<Object[]> sources = queryList(
"allLengthStepCaracteristics",
- "matrixId", IntegerType.INSTANCE, getEnumerationIntegerCode("MatrixId.BATCH"));
+ "matrixId", IntegerType.INSTANCE, getEnumerationIntegerCode("MatrixId.INDIVIDUAL"),
+ "ageParameterCode", StringType.INSTANCE, getEnumerationStringCode("ParameterCode.AGE"),
+ "weightParameterCode", StringType.INSTANCE, getEnumerationStringCode("ParameterCode.WEIGHT"),
+ "methodDeclarationId", IntegerType.INSTANCE, getEnumerationIntegerCode("MethodId.DECLARATION"));
List<Caracteristic> result = Lists.newArrayList();
while (sources.hasNext()) {
Object[] source = sources.next();
@@ -1000,4 +983,23 @@
setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[3], target);
return target;
}
+
+ protected Vessel loadVessel(Object[] source) {
+ Vessel target = new Vessel();
+ target.setId((String) source[0]);
+ target.setRegistrationCode((String) source[1]);
+ target.setInternalRegistrationCode((String) source[2]);
+ target.setName((String) source[3]);
+ setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[4], target);
+ return target;
+ }
+
+ protected Gear loadGear(Object[] source) {
+ Gear result = new Gear();
+ result.setId(String.valueOf(source[0]));
+ result.setName(String.valueOf(source[1]));
+ result.setLabel(String.valueOf(source[2]));
+ setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[3], result);
+ return result;
+ }
}
Modified: trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml
===================================================================
--- trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml 2013-01-11 14:50:40 UTC (rev 175)
+++ trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml 2013-01-11 16:17:12 UTC (rev 176)
@@ -233,26 +233,37 @@
<!-- Get all persons [REF-07] -->
<query cacheable="true" name="allPersons">
<![CDATA[
- SELECT DISTINCT
+ SELECT DISTINCT
p.id,
+ p.lastname,
p.firstname,
- p.lastname,
- p.department.name,
+ p.department.code,
p.status
- FROM
+ FROM
PersonImpl p
- WHERE p.status.code IN (1, 2)
+ LEFT OUTER JOIN p.profils pp
+ WHERE
+ p.status.code in (1,2)
+ AND pp.id IN (
+ :observerProfilId,
+ :projectMemberProfilId,
+ :userProfilId
+ )
+ AND p.department.code LIKE 'PDG-%'
]]>
+ <query-param name="observerProfilId" type="java.lang.Integer"/>
+ <query-param name="projectMemberProfilId" type="java.lang.Integer"/>
+ <query-param name="userProfilId" type="java.lang.Integer"/>
</query>
- <!-- Get one persons [REF-07] -->
+ <!-- Get one persons [REF-07-1] -->
<query cacheable="true" name="person">
<![CDATA[
SELECT DISTINCT
p.id,
p.firstname,
p.lastname,
- p.department,
+ p.department.code,
p.status
FROM
PersonImpl p
@@ -291,10 +302,10 @@
<query-param name="speciesId" type="java.lang.Integer"/>
</query>
- <!-- TODO Fix it! Get all length step catacteristics [REF-09] -->
+ <!-- Get all length step catacteristics [REF-09] -->
<query cacheable="true" name="allLengthStepCaracteristics">
<![CDATA[
- SELECT
+ SELECT
p.id AS pmfmId,
p.parameter.name AS parameterName,
p.matrix.name AS matrixName,
@@ -302,13 +313,24 @@
p.method.name AS methodName,
p.parameter.isAlphanumeric AS isAlphanumeric,
p.parameter.isQualitative AS isQualitative,
+ p.signifFiguresNumber,
+ p.maximumNumberDecimals,
+ p.precision,
p.unit.symbol AS symbol,
p.status AS status
- FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
- AND p.parameter.code LIKE 'LENGTH_%' AND p.matrix.id = :matrixId
+ FROM PmfmImpl p
+ WHERE p.status.code IN (1, 2)
+ AND p.matrix.id = :matrixId
+ AND p.parameter.isQualitative=false
+ AND p.parameter.isAlphanumeric=false
+ AND p.parameter.isCalculated=false
+ AND p.parameter.code not in (:ageParameterCode, :weightParameterCode)
+ AND p.method.id <> :methodDeclarationId
]]>
<query-param name="matrixId" type="java.lang.Integer"/>
+ <query-param name="ageParameterCode" type="java.lang.String"/>
+ <query-param name="weightParameterCode" type="java.lang.String"/>
+ <query-param name="methodDeclarationId" type="java.lang.Integer"/>
</query>
<!-- Get all gear caracteristics [REF-10] (use allPmfmsByMatrixId) -->
@@ -382,7 +404,7 @@
l.status as status
FROM LocationImpl l
WHERE l.status.code IN (1, 2)
- AND l.locationLevel.id = :locationLevelId
+ AND l.locationLevel.id = :locationLevelId
]]>
<query-param name="locationLevel" type="java.lang.Integer"/>
</query>
@@ -398,22 +420,22 @@
l.status as status
FROM LocationImpl l
WHERE l.status.code IN (1, 2)
- AND l.locationLevel.id = :locationLevelId
+ AND l.locationLevel.id = :locationLevelId
]]>
</query>
- <!-- Get all fishing operation locaties [REF-15] -->
+ <!-- Get all fishing operation localites [REF-15] -->
<query cacheable="true" name="allFishingOperationLocalites">
<![CDATA[
- SELECT
+ SELECT
l.id as locationId,
l.label as locationLabel,
l.name as locationName,
l.locationLevel.id as locationLevelId,
l.status as status
- FROM LocationImpl l
- WHERE l.status.code IN (1, 2)
- AND l.locationLevel.id = :locationLevelId
+ FROM LocationImpl l
+ WHERE l.status.code IN (1, 2)
+ AND l.locationLevel.id = :locationLevelId
]]>
</query>
@@ -469,7 +491,7 @@
<!-- Get a pmfm caracteristics by this id [REF-24] -->
<query cacheable="true" name="pmfmById">
<![CDATA[
- SELECT
+ SELECT
p.id AS pmfmId,
p.parameter.name AS parameterName,
p.matrix.name AS matrixName,
@@ -482,9 +504,9 @@
p.precision,
p.unit.symbol AS symbol,
p.status AS status
- FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
- AND p.id= :pmfmId
+ FROM PmfmImpl p
+ WHERE p.status.code IN (1, 2)
+ AND p.id= :pmfmId
]]>
<query-param name="pmfmId" type="java.lang.Integer"/>
</query>
@@ -507,7 +529,7 @@
<!-- Get all pmfms using a same matrix Id -->
<query cacheable="true" name="allPmfmsByMatrixId">
<![CDATA[
- SELECT
+ SELECT
p.id AS pmfmId,
p.parameter.name AS parameterName,
p.matrix.name AS matrixName,
@@ -520,9 +542,9 @@
p.precision,
p.unit.symbol AS symbol,
p.status AS status
- FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
- AND p.matrix.id= :matrixId
+ FROM PmfmImpl p
+ WHERE p.status.code IN (1, 2)
+ AND p.matrix.id= :matrixId
]]>
<query-param name="matrixId" type="java.lang.Integer"/>
</query>
@@ -530,7 +552,7 @@
<!-- Get all pmfms using a same parameter group id -->
<query cacheable="true" name="allPmfmsByParameterGroudId">
<![CDATA[
- SELECT
+ SELECT
p.id AS pmfmId,
p.parameter.name AS parameterName,
p.matrix.name AS matrixName,
@@ -543,9 +565,9 @@
p.precision,
p.unit.symbol AS symbol,
p.status AS status
- FROM PmfmImpl p
- WHERE p.status.code IN (1, 2)
- AND p.parameter.parameterGroup.id= :parameterGroupId
+ FROM PmfmImpl p
+ WHERE p.status.code IN (1, 2)
+ AND p.parameter.parameterGroup.id= :parameterGroupId
]]>
<query-param name="parameterGroupId" type="java.lang.Integer"/>
</query>
Modified: trunk/tutti-persistence-adagio/src/main/resources/tutti-db-enumerations.properties
===================================================================
--- trunk/tutti-persistence-adagio/src/main/resources/tutti-db-enumerations.properties 2013-01-11 14:50:40 UTC (rev 175)
+++ trunk/tutti-persistence-adagio/src/main/resources/tutti-db-enumerations.properties 2013-01-11 16:17:12 UTC (rev 176)
@@ -305,7 +305,10 @@
#TODO Mettre la bonne valeur
LocationLevelId.PROGRAM=111
+MethodId.DECLARATION=1
+
MatrixId.BATCH=1
+MatrixId.INDIVIDUAL=2
ParameterGroupId.ENVIRONEMENT_MEASUREMENT=3
#TODO Mettre la bonne valeur
Added: trunk/tutti-persistence-adagio/src/main/site/rst/referential.rst
===================================================================
--- trunk/tutti-persistence-adagio/src/main/site/rst/referential.rst (rev 0)
+++ trunk/tutti-persistence-adagio/src/main/site/rst/referential.rst 2013-01-11 16:17:12 UTC (rev 176)
@@ -0,0 +1,435 @@
+.. -
+.. * #%L
+.. * Tutti :: Persistence Adagio (impl)
+.. * $Id$
+.. * $HeadURL$
+.. * %%
+.. * Copyright (C) 2012 - 2013 Ifremer
+.. * %%
+.. * This program is free software: you can redistribute it and/or modify
+.. * it under the terms of the GNU 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 General Public
+.. * License along with this program. If not, see
+.. * <http://www.gnu.org/licenses/gpl-3.0.html>.
+.. * #L%
+.. -
+
+===================
+Tutti - Référentiel
+===================
+
+Présentation
+~~~~~~~~~~~~
+
+Ce document décrit comment sont récupérer les données du référentiel.
+
+Chaque requète a un nom du style **[REF-XXX]**.
+
+[REF-01] Liste des zones d'une série de campagne
+------------------------------------------------
+
+::
+ SELECT
+ l.id,
+ l.label,
+ l.name,
+ l.status
+ FROM LocationImpl l
+ WHERE
+ l.locationLevel.id = :locationLevelId
+ AND l.status.code IN (1, 2)
+
+
+Paramètres :
+
+- :locationLevelId = *LocationLevelId.PROGRAM*
+
+*État:* À Valider et définir la valeur de la constante.
+
+[REF-02] Liste des pays
+-----------------------
+
+::
+
+ SELECT
+ l.id,
+ l.label,
+ l.name,
+ l.status
+ FROM LocationImpl l
+ WHERE
+ l.locationLevel.id = :locationLevelId
+ AND l.status.code IN (1, 2)
+
+
+Paramètres :
+
+- :locationLevelId = *LocationLevelId.PAYS_ISO3*
+
+*État:* Valide.
+
+[REF-03] liste des navires (scientifique)
+-----------------------------------------
+
+::
+
+ SELECT
+ v.code AS vesselCode,
+ vrp.registrationCode AS nationalRegistrationCode,
+ vrp.internationalRegistrationCode as internationalRegistrationCode,
+ vf.name AS vesselName,
+ v.status AS status
+ FROM
+ VesselImpl v
+ INNER JOIN v.vesselRegistrationPeriods AS vrp
+ LEFT OUTER JOIN v.vesselFeatures AS vf
+ WHERE v.vesselType.id = :vesselTypeId
+ AND v.status.code IN (1, 2)
+ AND vrp.vesselRegistrationPeriodPk.startDateTime =
+ (
+ SELECT MAX(vrp2.vesselRegistrationPeriodPk.startDateTime)
+ FROM VesselRegistrationPeriodImpl vrp2 WHERE
+ vrp2.vesselRegistrationPeriodPk.vessel.code = v.code
+ AND (vrp2.vesselRegistrationPeriodPk.startDateTime <= :refDate OR :refDate IS NULL)
+ GROUP BY vrp2.vesselRegistrationPeriodPk.vessel.code
+ )
+ AND vf.startDateTime =
+ (
+ SELECT MAX(vf2.startDateTime)
+ FROM VesselFeaturesImpl vf2 WHERE
+ vf2.vessel.code = v.code
+ AND (vf2.startDateTime <= :refDate OR :refDate IS NULL)
+ GROUP BY vf2.vessel.code
+ )
+
+
+Paramètres :
+
+- :gearClassificiationId = *VesselTypeId.SCIENTIFIC_RESEARCH_VESSEL*
+- :refDate = date (ou null)
+
+*État:* Valide mais à optimiser.
+
+[REF-04] liste des navires (pro)
+--------------------------------
+
+::
+
+ SELECT
+ v.code AS vesselCode,
+ vrp.registrationCode AS nationalRegistrationCode,
+ vrp.internationalRegistrationCode as internationalRegistrationCode,
+ vf.name AS vesselName,
+ v.status AS status
+ FROM
+ VesselImpl v
+ INNER JOIN v.vesselRegistrationPeriods AS vrp
+ LEFT OUTER JOIN v.vesselFeatures AS vf
+ WHERE v.vesselType.id = :vesselTypeId
+ AND v.status.code IN (1, 2)
+ AND vrp.vesselRegistrationPeriodPk.startDateTime =
+ (
+ SELECT MAX(vrp2.vesselRegistrationPeriodPk.startDateTime)
+ FROM VesselRegistrationPeriodImpl vrp2 WHERE
+ vrp2.vesselRegistrationPeriodPk.vessel.code = v.code
+ AND (vrp2.vesselRegistrationPeriodPk.startDateTime <= :refDate OR :refDate IS NULL)
+ GROUP BY vrp2.vesselRegistrationPeriodPk.vessel.code
+ )
+ AND vf.startDateTime =
+ (
+ SELECT MAX(vf2.startDateTime)
+ FROM VesselFeaturesImpl vf2 WHERE
+ vf2.vessel.code = v.code
+ AND (vf2.startDateTime <= :refDate OR :refDate IS NULL)
+ GROUP BY vf2.vessel.code
+ )
+
+
+Paramètres :
+
+- :gearClassificiationId = *VesselTypeId.FISHING_VESSEL*
+- :refDate = date (ou null)
+
+*État:* Valide mais à optimiser.
+
+[REF-05] liste des engins (scientifique)
+----------------------------------------
+
+::
+
+ SELECT
+ g.id,
+ g.label,
+ g.name,
+ g.status AS status
+ FROM GearImpl g
+ WHERE
+ g.gearClassification.id= :gearClassificiationId
+ AND g.status.code IN (1, 2)
+
+
+Paramètres :
+
+- :gearClassificiationId = *GearClassificationId.SCIENTIFIC_CRUISE*
+
+*État:* Valide.
+
+[REF-06] liste des engins (scientifique)
+----------------------------------------
+
+::
+
+ SELECT
+ g.id,
+ g.label,
+ g.name,
+ g.status AS status
+ FROM GearImpl g
+ WHERE
+ g.gearClassification.id= :gearClassificiationId
+ AND g.status.code IN (1, 2)
+
+Paramètres :
+
+- :gearClassificiationId = *GearClassificationId.FAO*
+
+*État:* Valide.
+
+
+[REF-07] Liste des utilisateurs
+-------------------------------
+
+::
+
+ SELECT DISTINCT
+ p.id,
+ p.lastname,
+ p.firstname,
+ p.department.code,
+ p.status
+ FROM
+ PersonImpl p
+ LEFT OUTER JOIN p.profils pp
+ WHERE
+ p.status.code in (1,2)
+ AND pp.id IN (
+ :observerProfilId,
+ :projectMemberProfilId,
+ :userProfilId
+ )
+ AND p.department.code LIKE 'PDG-%'
+
+Paramètres :
+
+- :observerProfilId = *UserProfilId.OBSERVER*
+- :projectMemberProfilId = *UserProfilId.PROJECT_MEMBER*
+- :userProfilId = *UserProfilId.USER*
+
+*État:* Valide.
+
+
+[REF-08] Liste des espèces
+--------------------------
+
+::
+
+ voir TaxonSpecificDao.getAllTaxonRefTax()
+
+*État:* Valide.
+
+[REF-09] liste des mesures de classes de taille
+-----------------------------------------------
+
+::
+
+ SELECT
+ p.id AS pmfmId,
+ p.parameter.name AS parameterName,
+ p.matrix.name AS matrixName,
+ p.fraction.name AS fractionName,
+ p.method.name AS methodName,
+ p.parameter.isAlphanumeric AS isAlphanumeric,
+ p.parameter.isQualitative AS isQualitative,
+ p.signifFiguresNumber,
+ p.maximumNumberDecimals,
+ p.precision,
+ p.unit.symbol AS symbol,
+ p.status AS status
+ FROM PmfmImpl p
+ WHERE p.status.code IN (1, 2)
+ AND p.matrix.id = :matrixId
+ AND p.parameter.isQualitative=false
+ AND p.parameter.isAlphanumeric=false
+ AND p.parameter.isCalculated=false
+ AND p.parameter.code not in (:ageParameterCode, :weightParameterCode)
+ AND p.method.id <> :methodDeclarationId
+
+Paramètres :
+
+- :matrixId = *MatrixId.INDIVIDUAL*
+- :ageParameterCode = *ParameterCode.AGE*
+- :weightParameterCode= *ParameterCode.WEIGHT*
+- :methodDeclarationId = *MethodId.DECLARATION*
+
+*État:* Valide.
+
+[REF-10] Liste des pmfm (mise en oeuvre de l'engin)
+---------------------------------------------------
+
+::
+
+ SELECT
+ p.id AS pmfmId,
+ p.parameter.name AS parameterName,
+ p.matrix.name AS matrixName,
+ p.fraction.name AS fractionName,
+ p.method.name AS methodName,
+ p.parameter.isAlphanumeric AS isAlphanumeric,
+ p.parameter.isQualitative AS isQualitative,
+ p.signifFiguresNumber,
+ p.maximumNumberDecimals,
+ p.precision,
+ p.unit.symbol AS symbol,
+ p.status AS status
+ FROM PmfmImpl p
+ WHERE p.status.code IN (1, 2)
+ AND p.matrix.id= :matrixId
+
+Paramètres :
+
+- :matrixId = *MatrixId.GEAR*
+
+*État:* Valide.
+
+[REF-11] liste des pmfm (environnement)
+---------------------------------------
+
+::
+
+ SELECT
+ p.id AS pmfmId,
+ p.parameter.name AS parameterName,
+ p.matrix.name AS matrixName,
+ p.fraction.name AS fractionName,
+ p.method.name AS methodName,
+ p.parameter.isAlphanumeric AS isAlphanumeric,
+ p.parameter.isQualitative AS isQualitative,
+ p.signifFiguresNumber,
+ p.maximumNumberDecimals,
+ p.precision,
+ p.unit.symbol AS symbol,
+ p.status AS status
+ FROM PmfmImpl p
+ WHERE p.status.code IN (1, 2)
+ AND p.parameter.parameterGroup.id= :parameterGroupId
+
+Paramètres :
+
+- :parameterGroupId = *ParameterGroupId.ENVIRONEMENT_MEASUREMENT*
+
+*État:* Valide.
+
+[REF-12] liste des pmfm (environnement)
+---------------------------------------
+
+::
+
+ SELECT
+ p.id AS pmfmId,
+ p.parameter.name AS parameterName,
+ p.matrix.name AS matrixName,
+ p.fraction.name AS fractionName,
+ p.method.name AS methodName,
+ p.parameter.isAlphanumeric AS isAlphanumeric,
+ p.parameter.isQualitative AS isQualitative,
+ p.signifFiguresNumber,
+ p.maximumNumberDecimals,
+ p.precision,
+ p.unit.symbol AS symbol,
+ p.status AS status
+ FROM PmfmImpl p
+ WHERE p.status.code IN (1, 2)
+ AND p.parameter.parameterGroup.id= :parameterGroupId
+
+Paramètres :
+
+- :parameterGroupId = *ParameterGroupId.HYDROLOGIC_MEASUREMENT*
+
+*État:* Données non présentes en base.
+
+[REF-13] liste des strates
+--------------------------
+
+::
+
+ SELECT
+ l.id as locationId,
+ l.label as locationLabel,
+ l.name as locationName,
+ l.locationLevel.id as locationLevelId,
+ l.status as status
+ FROM LocationImpl l
+ WHERE l.status.code IN (1, 2)
+ AND l.locationLevel.id = :locationLevelId
+
+Paramètres :
+
+- :locationLevelId = *LocationLevelId.STRATA*
+
+*État:* Valide.
+
+[REF-14] liste des sous-strates
+--------------------------------
+
+::
+
+ SELECT
+ l.id as locationId,
+ l.label as locationLabel,
+ l.name as locationName,
+ l.locationLevel.id as locationLevelId,
+ l.status as status
+ FROM LocationImpl l
+ WHERE l.status.code IN (1, 2)
+ AND l.locationLevel.id = :locationLevelId
+
+Paramètres :
+
+- :locationLevelId = *LocationLevelId.SUBSTRATA*
+
+*État:* A valider, il faut trouver comment récupérer les valeurs par rapport
+à une strate.
+
+[REF-15] liste des localités
+----------------------------
+
+::
+
+ SELECT
+ l.id as locationId,
+ l.label as locationLabel,
+ l.name as locationName,
+ l.locationLevel.id as locationLevelId,
+ l.status as status
+ FROM LocationImpl l
+ WHERE l.status.code IN (1, 2)
+ AND l.locationLevel.id = :locationLevelId
+
+Paramètres :
+
+- :locationLevelId = *LocationLevelId.LOCALITE*
+
+*État:* A valider, il faut trouver comment récupérer les valeurs par rapport
+à une strate, sous-strate.
+
+
+
+
Property changes on: trunk/tutti-persistence-adagio/src/main/site/rst/referential.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: trunk/tutti-persistence-adagio/src/main/site/site_fr.xml (from rev 168, trunk/src/site/site_fr.xml)
===================================================================
--- trunk/tutti-persistence-adagio/src/main/site/site_fr.xml (rev 0)
+++ trunk/tutti-persistence-adagio/src/main/site/site_fr.xml 2013-01-11 16:17:12 UTC (rev 176)
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ Tutti
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2012 Ifremer
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
+
+<project name="${project.name}">
+
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-fluido-skin</artifactId>
+ <version>1.3.0</version>
+ </skin>
+
+ <custom>
+ <fluidoSkin>
+ <topBarEnabled>false</topBarEnabled>
+ <googleSearch/>
+ <sideBarEnabled>true</sideBarEnabled>
+ <searchEnabled>true</searchEnabled>
+ <sourceLineNumbersEnabled>true</sourceLineNumbersEnabled>
+ </fluidoSkin>
+ </custom>
+
+ <bannerLeft>
+ <name>${project.name}</name>
+ <href>./index.html</href>
+ </bannerLeft>
+
+ <bannerRight>
+ <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src>
+ <href>http://www.codelutin.com</href>
+ </bannerRight>
+
+ <publishDate position="right"/>
+ <version position="right"/>
+
+ <poweredBy>
+ <logo href="http://maven.apache.org" name="Maven"
+ img="${project.url}/images/logos/maven-feather.png"/>
+
+ <logo href="http://docutils.sourceforge.net/rst.html"
+ name="ReStructuredText"
+ img="http://maven-site.nuiton.org/public/images/logos/restructuredtext-logo.png"/>
+
+ <logo href="http://maven-site.nuiton.org/jrst" name="JRst"
+ img="http://maven-site.nuiton.org/public/images/logos/jrst-logo.png"/>
+
+ <logo href="http://maven-site.nuiton.org/jaxx" name="JAXX"
+ img="http://maven-site.nuiton.org/public/images/logos/jaxx-logo.png"/>
+
+ <logo href="http://argouml.tigris.org/" name="ArgoUML"
+ img="http://maven-site.nuiton.org/public/images/logos/argouml-logo.png"/>
+
+ </poweredBy>
+
+ <body>
+
+ <head>
+ <script type="text/javascript"
+ src="http://maven-site.nuiton.org/public/js/mavenpom-site.js">
+ </script>
+
+ <link rel="stylesheet" type="text/css"
+ href="http://maven-site.nuiton.org/public/css/mavenpom-site.css"/>
+ </head>
+
+ <breadcrumbs>
+ <item name="${project.name}"
+ href="${project.url}/index.html"/>
+ </breadcrumbs>
+
+ <menu name="Tutti">
+ <item name="Accueil" href="index.html"/>
+ <item name="Réferentiel" href="./referantial.html"/>
+ </menu>
+
+ <menu ref="reports"/>
+
+ <footer>
+
+ <div id='projectMetas' locale='fr'
+ projectversion='${project.version}'
+ platform='${project.platform}'
+ projectid='${project.projectId}'
+ scm='${project.scm.developerConnection}'
+ scmwebeditorenabled='${project.scmwebeditorEnabled}'
+ scmwebeditorurl='${project.scmwebeditorUrl}'
+ siteSourcesType='${project.siteSourcesType}'
+ piwikEnabled='${project.piwikEnabled}'
+ piwikId='${project.piwikId}'>
+ </div>
+ </footer>
+ </body>
+</project>
Modified: trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ReferentialTest.java
===================================================================
--- trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ReferentialTest.java 2013-01-11 14:50:40 UTC (rev 175)
+++ trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ReferentialTest.java 2013-01-11 16:17:12 UTC (rev 176)
@@ -98,7 +98,7 @@
public void getAllPerson() {
List<Person> result = dbResource.getDriver().getAllPerson();
Assert.assertNotNull(result);
- Assert.assertEquals(226, result.size());
+ Assert.assertEquals(123, result.size());
}
@@ -164,7 +164,7 @@
public void getAllSpeciesLengthStepCaracteristic() {
List<Caracteristic> result = dbResource.getDriver().getAllSpeciesLengthStepCaracteristic();
Assert.assertNotNull(result);
- Assert.assertEquals(0, result.size());
+ Assert.assertEquals(24, result.size());
}
@Test
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/SwingValidatorMessageWidget.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/SwingValidatorMessageWidget.java 2013-01-11 14:50:40 UTC (rev 175)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/SwingValidatorMessageWidget.java 2013-01-11 16:17:12 UTC (rev 176)
@@ -1,6 +1,30 @@
package fr.ifremer.tutti.ui.swing.util;
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/SwingValidatorMessageWidget.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/tutti-ui-swing/src/main/resources/icons/action-table-error.png
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
r175 - in trunk/tutti-ui-swing/src/main: java/fr/ifremer/tutti/ui/swing/content/operation java/fr/ifremer/tutti/ui/swing/util resources/fr/ifremer/tutti/ui/swing/content/operation resources/i18n
by kmorin@users.forge.codelutin.com 11 Jan '13
by kmorin@users.forge.codelutin.com 11 Jan '13
11 Jan '13
Author: kmorin
Date: 2013-01-11 15:50:40 +0100 (Fri, 11 Jan 2013)
New Revision: 175
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/175
Log:
mise en page de l'onglet des traits et calcul de la dur?\195?\169e
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java
trunk/tutti-ui-swing/src/main/resources/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel-edit-error-validation.xml
trunk/tutti-ui-swing/src/main/resources/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel-validate-error-validation.xml
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.css 2013-01-11 14:19:36 UTC (rev 174)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.css 2013-01-11 14:50:40 UTC (rev 175)
@@ -357,7 +357,8 @@
}
#dureeField {
- text: {getStringValue(model.getDuree())};
+ text: {fr.ifremer.tutti.ui.swing.util.TuttiUIUtil.getDuration(
+ model.getGearShootingStartDate(), model.getGearShootingEndDate(), "tutti.duration.format")};
enabled: false;
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.jaxx 2013-01-11 14:19:36 UTC (rev 174)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.jaxx 2013-01-11 14:50:40 UTC (rev 175)
@@ -82,7 +82,7 @@
<field name='stationNumber' component='stationNumberField'/>
<field name='fishingOperationNumber'
component='fishingOperationNumberField'/>
- <field name='date' component='dateField'/>
+ <field name='gearShootingStartDate' component='gearShootingStartDateField'/>
<field name='comment' component='commentField'/>
<field name='saisisseur' component='saisisseurList'/>
<field name='gearShootingStartLatitude' component='gearShootingStartLatitudeDDField'/>
@@ -135,13 +135,6 @@
<NumberEditor id='fishingOperationNumberField'
constructorParams='this'/>
</cell>
- <cell>
- <JLabel id='dateLabel'/>
- </cell>
- <cell weightx='0.3'>
- <JXDatePicker id='dateField'
- onActionPerformed='handler.setDate(event, "date")'/>
- </cell>
</row>
<!-- Strate d'association / Sous Strate / Localité -->
@@ -290,57 +283,63 @@
constructorParams='this'/>
</cell>
</row>
- </Table>
- </JPanel>
- </cell>
- </row>
- <!-- Fishing operation valid / invalid-->
- <row>
- <cell>
- <JToolBar id='fishingOperationValidPanel'
- layout='{new BorderLayout()}'>
- <JButton id='resetValidStateButton'
- constraints='BorderLayout.WEST'
- onActionPerformed="model.setFishingOperationValid(null)"/>
- <JRadioButton id='fishingOperationResetRadio'
- constraints='BorderLayout.EAST'/>
- </JToolBar>
- </cell>
- <cell>
- <HBox>
- <JRadioButton id='fishingOperationValidRadio'
- onActionPerformed='model.setFishingOperationValid(Boolean.TRUE)'/>
- <JRadioButton id='fishingOperationInvalidRadio'
- onActionPerformed='model.setFishingOperationValid(Boolean.FALSE)'/>
- </HBox>
- </cell>
- <cell columns="4">
- <JPanel/>
- </cell>
- </row>
+ <!-- FishingOperation rectiligne / distance chalutee / durée -->
+ <row>
+ <cell>
+ <JLabel/>
+ </cell>
+ <cell>
+ <JCheckBox id='fishingOperationRectiligneCheckBox'
+ onItemStateChanged='handler.setBoolean(event, "fishingOperationRectiligne")'/>
+ </cell>
+ <cell>
+ <JPanel layout="{new BorderLayout()}">
+ <JLabel id='distanceChaluteeLabel'
+ constraints='BorderLayout.WEST'/>
+ <NumberEditor id='distanceChaluteeField'
+ constraints='BorderLayout.CENTER'
+ constructorParams='this'/>
+ </JPanel>
+ </cell>
+ <cell>
+ <JLabel/>
+ </cell>
+ <cell>
+ <JPanel layout="{new BorderLayout()}">
+ <JLabel id='dureeLabel' constraints='BorderLayout.WEST'/>
+ <JTextField id='dureeField' constraints='BorderLayout.CENTER'/>
+ </JPanel>
+ </cell>
+ </row>
- <!-- FishingOperation rectiligne / distance chalutee / durée -->
- <row>
- <cell>
- <JCheckBox id='fishingOperationRectiligneCheckBox'
- onItemStateChanged='handler.setBoolean(event, "fishingOperationRectiligne")'/>
- </cell>
- <cell columns="3">
- <JPanel layout="{new BorderLayout()}">
- <JLabel id='distanceChaluteeLabel'
- constraints='BorderLayout.WEST'/>
- <NumberEditor id='distanceChaluteeField'
- constraints='BorderLayout.CENTER'
- constructorParams='this'/>
+ <!-- Fishing operation valid / invalid-->
+ <row>
+ <cell>
+ <JToolBar id='fishingOperationValidPanel'
+ layout='{new BorderLayout()}'>
+ <JButton id='resetValidStateButton'
+ constraints='BorderLayout.WEST'
+ onActionPerformed="model.setFishingOperationValid(null)"/>
+ <JRadioButton id='fishingOperationResetRadio'
+ constraints='BorderLayout.EAST'/>
+ </JToolBar>
+ </cell>
+ <cell>
+ <HBox>
+ <JRadioButton id='fishingOperationValidRadio'
+ onActionPerformed='model.setFishingOperationValid(Boolean.TRUE)'/>
+ <JRadioButton id='fishingOperationInvalidRadio'
+ onActionPerformed='model.setFishingOperationValid(Boolean.FALSE)'/>
+ </HBox>
+ </cell>
+ <cell columns="4">
+ <JPanel/>
+ </cell>
+ </row>
+ </Table>
</JPanel>
</cell>
- <cell anchor='west'>
- <JLabel id='dureeLabel'/>
- </cell>
- <cell fill='horizontal'>
- <JTextField id='dureeField'/>
- </cell>
</row>
<!-- Actions d'import -->
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIHandler.java 2013-01-11 14:19:36 UTC (rev 174)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIHandler.java 2013-01-11 14:50:40 UTC (rev 175)
@@ -91,7 +91,6 @@
this.fishingOperationMonitor = new TuttiBeanMonitor<EditFishingOperationUIModel>(
EditFishingOperationUIModel.PROPERTY_STATION_NUMBER,
EditFishingOperationUIModel.PROPERTY_FISHING_OPERATION_NUMBER,
- EditFishingOperationUIModel.PROPERTY_DATE,
EditFishingOperationUIModel.PROPERTY_STRATA,
EditFishingOperationUIModel.PROPERTY_SUB_STRATA,
EditFishingOperationUIModel.PROPERTY_GEAR_SHOOTING_START_LATITUDE,
@@ -102,7 +101,6 @@
EditFishingOperationUIModel.PROPERTY_GEAR_SHOOTING_END_DATE,
EditFishingOperationUIModel.PROPERTY_FISHING_OPERATION_RECTILIGNE,
EditFishingOperationUIModel.PROPERTY_DISTANCE_CHALUTEE,
- EditFishingOperationUIModel.PROPERTY_DUREE,
EditFishingOperationUIModel.PROPERTY_FISHING_OPERATION_VALID,
EditFishingOperationUIModel.PROPERTY_LOCATION,
EditFishingOperationUIModel.PROPERTY_SAISISSEUR,
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel.java 2013-01-11 14:19:36 UTC (rev 174)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel.java 2013-01-11 14:50:40 UTC (rev 175)
@@ -32,6 +32,7 @@
import fr.ifremer.tutti.persistence.entities.referential.Person;
import fr.ifremer.tutti.persistence.spatial.SexagecimalPosition;
import fr.ifremer.tutti.ui.swing.AbstractTuttiBeanUIModel;
+import java.util.Calendar;
import java.util.Date;
import java.util.List;
import org.apache.commons.logging.Log;
@@ -61,8 +62,6 @@
public static final String PROPERTY_FISHING_OPERATION_NUMBER = "fishingOperationNumber";
- public static final String PROPERTY_DATE = "date";
-
public static final String PROPERTY_STRATA = "strata";
public static final String PROPERTY_SUB_STRATA = "subStrata";
@@ -109,8 +108,6 @@
public static final String PROPERTY_DISTANCE_CHALUTEE = "distanceChalutee";
- public static final String PROPERTY_DUREE = "duree";
-
public static final String PROPERTY_FISHING_OPERATION_VALID = "fishingOperationValid";
public static final String PROPERTY_LOCATION = "location";
@@ -134,8 +131,6 @@
protected Integer fishingOperationNumber;
- protected Date date;
-
protected FishingOperationLocation strata;
protected FishingOperationLocation subStrata;
@@ -156,22 +151,16 @@
protected Date gearShootingStartDate;
- protected Integer gearShootingStartTime;
-
protected Float gearShootingEndLatitude;
protected Float gearShootingEndLongitude;
protected Date gearShootingEndDate;
- protected Integer gearShootingEndTime;
-
protected boolean fishingOperationRectiligne;
protected Float distanceChalutee;
- protected Float duree;
-
protected Boolean fishingOperationValid;
protected FishingOperationLocation location;
@@ -254,16 +243,6 @@
firePropertyChange(PROPERTY_FISHING_OPERATION_NUMBER, oldValue, fishingOperationNumber);
}
- public Date getDate() {
- return date;
- }
-
- public void setDate(Date date) {
- Object oldValue = getDate();
- this.date = date;
- firePropertyChange(PROPERTY_DATE, oldValue, date);
- }
-
public FishingOperationLocation getStrata() {
return strata;
}
@@ -401,8 +380,11 @@
public void setGearShootingStartDate(Date gearShootingStartDate) {
Object oldValue = getGearShootingStartDate();
- this.gearShootingStartDate = gearShootingStartDate;
- firePropertyChange(PROPERTY_GEAR_SHOOTING_START_DATE, oldValue, gearShootingStartDate);
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(gearShootingStartDate);
+ calendar.set(Calendar.SECOND, 0);
+ this.gearShootingStartDate = calendar.getTime();
+ firePropertyChange(PROPERTY_GEAR_SHOOTING_START_DATE, oldValue, this.gearShootingStartDate);
}
public Float getGearShootingEndLatitude() {
@@ -511,8 +493,11 @@
public void setGearShootingEndDate(Date gearShootingEndDate) {
Object oldValue = getGearShootingEndDate();
- this.gearShootingEndDate = gearShootingEndDate;
- firePropertyChange(PROPERTY_GEAR_SHOOTING_END_DATE, oldValue, gearShootingEndDate);
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(gearShootingEndDate);
+ calendar.set(Calendar.SECOND, 0);
+ this.gearShootingEndDate = calendar.getTime();
+ firePropertyChange(PROPERTY_GEAR_SHOOTING_END_DATE, oldValue, this.gearShootingEndDate);
}
public boolean isFishingOperationRectiligne() {
@@ -535,16 +520,6 @@
firePropertyChange(PROPERTY_DISTANCE_CHALUTEE, oldValue, distanceChalutee);
}
- public Float getDuree() {
- return duree;
- }
-
- public void setDuree(Float duree) {
- Object oldValue = getDuree();
- this.duree = duree;
- firePropertyChange(PROPERTY_DUREE, oldValue, duree);
- }
-
public Boolean getFishingOperationValid() {
return fishingOperationValid;
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java 2013-01-11 14:19:36 UTC (rev 174)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java 2013-01-11 14:50:40 UTC (rev 175)
@@ -26,19 +26,23 @@
import com.google.common.base.Preconditions;
import fr.ifremer.tutti.service.TuttiServiceTechnicalException;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Cursor;
+import java.io.File;
+import java.text.DateFormat;
+import java.util.Date;
+import javax.swing.JOptionPane;
+import javax.swing.UIManager;
import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.lang3.time.DurationFormatUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jdesktop.swingx.decorator.HighlightPredicate;
import org.jdesktop.swingx.decorator.Highlighter;
import org.nuiton.util.FileUtil;
-import javax.swing.JOptionPane;
-import javax.swing.UIManager;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Cursor;
-import java.io.File;
+import static org.nuiton.i18n.I18n._;
/**
* Created: 14/06/12
@@ -244,4 +248,15 @@
public static Highlighter newForegroundColorHighlighter(HighlightPredicate predicate, Color color) {
return new TuttiColorHighlighter(predicate, color, true);
}
+
+ public static String getDuration(Date startDate, Date endDate, String format) {
+ String duration = "";
+ DateFormat df = DateFormat.getTimeInstance();
+ if (startDate != null && endDate != null) {
+ log.info(df.format(startDate) + " " + df.format(endDate));
+ duration = DurationFormatUtils.formatPeriod(
+ startDate.getTime(), endDate.getTime() + 60000, _(format));
+ }
+ return duration;
+ }
}
Modified: trunk/tutti-ui-swing/src/main/resources/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel-edit-error-validation.xml
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel-edit-error-validation.xml 2013-01-11 14:19:36 UTC (rev 174)
+++ trunk/tutti-ui-swing/src/main/resources/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel-edit-error-validation.xml 2013-01-11 14:50:40 UTC (rev 175)
@@ -47,7 +47,7 @@
</field>
- <field name="date">
+ <field name="gearShootingStartDate">
<field-validator type="required" short-circuit="true">
<message>tutti.validator.error.fishingOperation.date.required</message>
Modified: trunk/tutti-ui-swing/src/main/resources/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel-validate-error-validation.xml
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel-validate-error-validation.xml 2013-01-11 14:19:36 UTC (rev 174)
+++ trunk/tutti-ui-swing/src/main/resources/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel-validate-error-validation.xml 2013-01-11 14:50:40 UTC (rev 175)
@@ -47,7 +47,7 @@
</field>
- <field name="date">
+ <field name="gearShootingStartDate">
<field-validator type="required" short-circuit="true">
<message>tutti.validator.error.fishingOperation.date.required</message>
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-01-11 14:19:36 UTC (rev 174)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-01-11 14:50:40 UTC (rev 175)
@@ -55,6 +55,7 @@
tutti.config.ui.config=Chemin du fichier de configuration des interfaces graphiques
tutti.config.ui.shortcut.closePopup=Fermer une popup
tutti.config.ui.showNumberEditorButton=Afficher le pavé numérique de saisie
+tutti.duration.format=dj Hh m'm'
tutti.label.attachmentEditor.file=Fichier
tutti.label.attachmentEditor.fileComment=Commentaire
tutti.label.attachmentEditor.fileName=Nom
@@ -199,14 +200,14 @@
tutti.table.benthos.batch.header.speciesByGenusCode=Espèce
tutti.table.benthos.batch.header.toConfirm=A Confirmer
tutti.table.benthos.batch.header.weight=Poids
-tutti.table.fishing.environment.header.key=Paramètre
+tutti.table.fishing.environment.header.key=Caractéristique
tutti.table.fishing.environment.header.value=Valeur
-tutti.table.fishing.gearShooting.header.key=Paramètre
+tutti.table.fishing.gearShooting.header.key=Caractéristique
tutti.table.fishing.gearShooting.header.value=Valeur
tutti.table.fishing.hydrology.header.averageValue=Moyenne
tutti.table.fishing.hydrology.header.gearShootingEndValue=Fin de traîne
tutti.table.fishing.hydrology.header.gearShootingStartValue=Début de traîne
-tutti.table.fishing.hydrology.header.key=Paramètre
+tutti.table.fishing.hydrology.header.key=Caractéristique
tutti.table.macrowaste.batch.header.comment=Commentaire
tutti.table.macrowaste.batch.header.file=Pièces jointes
tutti.table.macrowaste.batch.header.macroWasteCategory=Catégorie
1
0
r174 - in trunk/tutti-ui-swing/src/main: java/fr/ifremer/tutti/ui/swing/content/operation/catches/species java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split resources/i18n
by tchemit@users.forge.codelutin.com 11 Jan '13
by tchemit@users.forge.codelutin.com 11 Jan '13
11 Jan '13
Author: tchemit
Date: 2013-01-11 15:19:36 +0100 (Fri, 11 Jan 2013)
New Revision: 174
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/174
Log:
fix build
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIModel.java
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css 2013-01-11 14:13:28 UTC (rev 173)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css 2013-01-11 14:19:36 UTC (rev 174)
@@ -81,7 +81,7 @@
#splitSpeciesBatchMenu {
text: "tutti.action.splitSpeciesBatch";
- toolTipTexttext: "tutti.action.splitSpeciesBatch.tip";
+ toolTipText: "tutti.action.splitSpeciesBatch.tip";
mnemonic: S;
actionIcon: batch-split;
enabled: {model.isTableViewModeAll() && model.isSplitSpeciesBatchEnabled()};
@@ -97,7 +97,7 @@
#removeSpeciesSubBatchMenu {
text: "tutti.action.removeSpeciesSubBatch";
- tooltiptext: "tutti.action.removeSpeciesSubBatch.tip";
+ toolTipText: "tutti.action.removeSpeciesSubBatch.tip";
mnemonic: R;
actionIcon: batch-delete;
enabled: {model.isTableViewModeAll() && model.isRemoveSpeciesSubBatchEnabled()};
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIModel.java 2013-01-11 14:13:28 UTC (rev 173)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIModel.java 2013-01-11 14:19:36 UTC (rev 174)
@@ -107,7 +107,7 @@
}
public Species getSpecies() {
- return batch == null ? null : batch.getSpeciesCategoryValue();
+ return batch == null ? null : batch.getSpecies();
}
public List<SampleCategoryType> getCategory() {
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-01-11 14:13:28 UTC (rev 173)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-01-11 14:19:36 UTC (rev 174)
@@ -24,10 +24,10 @@
tutti.action.reload.ui=Recharger l'interface graphique
tutti.action.removeCaracteristic=Supprimer la caractéristique
tutti.action.removeSpecies=Supprimer l'espèce
+tutti.action.removeSpeciesBatch=Supprimer le lot
+tutti.action.removeSpeciesBatch.tip=Supprimer le lot courant (celui de la ligne sélectionnée) et tous ces fils
tutti.action.removeSpeciesSubBatch=Supprimer les lots fils
tutti.action.removeSpeciesSubBatch.tip=Supprimer tous les lots fils du lot sélectionné
-tutti.action.removeSpeciesBatch=Supprimer le lot
-tutti.action.removeSpeciesBatch.tip=Supprimer le lot courant (celui de la ligne sélectionnée) et tous ces fils
tutti.action.reset.fishingOperationValidState=Réinitialiser
tutti.action.save=Enregistrer
tutti.action.selectCampaign=Campagne
@@ -237,6 +237,7 @@
tutti.table.species.batch.header.sexCategory=Sexe
tutti.table.species.batch.header.sizeCategory=Class. Tri
tutti.table.species.batch.header.sortedUnsortedCategory=V/HV
+tutti.table.species.batch.header.species=
tutti.table.species.batch.header.speciesCategory=Espèce
tutti.table.species.batch.header.toConfirm=A Confirmer
tutti.table.species.batch.header.weight=Poids
1
0
11 Jan '13
Author: tchemit
Date: 2013-01-11 15:13:28 +0100 (Fri, 11 Jan 2013)
New Revision: 173
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/173
Log:
refs #1807: [Persistence] Adagio r?\195?\169f?\195?\169rentiel (correction de certaines requetes)
refs #1810: [PROTOCOLE] Ecran de saisie (ajout nouvelles colonnes dans le mod?\195?\168le)
Removed:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTreeModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTreeNode.java
Modified:
trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java
trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/config/TuttiPersistenceAdagioConfigOption.java
trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml
trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ReferentialTest.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SampleCategoryType.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTableModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesRowModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesTableModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Modified: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java
===================================================================
--- trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceAdagioImpl.java 2013-01-11 14:13:28 UTC (rev 173)
@@ -966,16 +966,16 @@
Caracteristic target = new Caracteristic();
target.setId(String.valueOf(source[0]));
- target.setParameterName(String.valueOf(source[1]));
- target.setMatrixName(String.valueOf(source[2]));
- target.setFractionName(String.valueOf(source[3]));
- target.setMethodName(String.valueOf(source[4]));
- target.setNumberType(Boolean.valueOf(source[5].toString()));
- target.setQualitativeType(Boolean.valueOf(source[6].toString()));
- target.setSignifFiguresNumber(Integer.valueOf(source[7].toString()));
- target.setMaximumNumberDecimals(Integer.valueOf(source[8].toString()));
- target.setPrecision(Float.valueOf(source[9].toString()));
- target.setUnit(String.valueOf(source[10]));
+ target.setParameterName((String)source[1]);
+ target.setMatrixName((String)source[2]);
+ target.setFractionName((String)source[3]);
+ target.setMethodName((String)source[4]);
+ target.setNumberType((Boolean)source[5]);
+ target.setQualitativeType((Boolean)source[6]);
+ target.setSignifFiguresNumber((Integer)source[7]);
+ target.setMaximumNumberDecimals((Integer)source[8]);
+ target.setPrecision((Float)source[9]);
+ target.setUnit((String)source[10]);
setStatus((fr.ifremer.adagio.core.dao.referential.Status) source[11], target);
return target;
}
Modified: trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/config/TuttiPersistenceAdagioConfigOption.java
===================================================================
--- trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/config/TuttiPersistenceAdagioConfigOption.java 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-persistence-adagio/src/main/java/fr/ifremer/tutti/persistence/config/TuttiPersistenceAdagioConfigOption.java 2013-01-11 14:13:28 UTC (rev 173)
@@ -62,8 +62,8 @@
true),
DB_ENUMERATION_PATH(
"tutti.persistence.db.enumerationPath",
- "Chemin du fichier de correspondance des énumérations",
- "${tutti.data.directory}/enumerations.properties",
+ "Chemin du fichier de correspondance des constantes",
+ "${tutti.data.directory}/enumerations-v3.properties",
File.class,
true,
true),
Modified: trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml
===================================================================
--- trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-persistence-adagio/src/main/resources/queries-override.hbm.xml 2013-01-11 14:13:28 UTC (rev 173)
@@ -24,7 +24,7 @@
-->
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+ "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<!--<fetch-profile name="tutti">-->
@@ -90,9 +90,9 @@
sc.program.code AS programCode,
year(sc.departureDateTime) AS year,
sc.name,
- lh.locationHierarchyPk.parent.location.id AS countryId,
- lh.locationHierarchyPk.parent.location.label AS countryLabel,
- lh.locationHierarchyPk.parent.location.name AS countryName,
+ lh.locationHierarchyPk.parent.id AS countryId,
+ lh.locationHierarchyPk.parent.label AS countryLabel,
+ lh.locationHierarchyPk.parent.name AS countryName,
sc.departureDateTime,
sc.returnDateTime,
sc.vessel.code as vesselCode,
@@ -237,7 +237,7 @@
p.id,
p.firstname,
p.lastname,
- p.department,
+ p.department.name,
p.status
FROM
PersonImpl p
@@ -477,6 +477,9 @@
p.method.name AS methodName,
p.parameter.isAlphanumeric AS isAlphanumeric,
p.parameter.isQualitative AS isQualitative,
+ p.signifFiguresNumber,
+ p.maximumNumberDecimals,
+ p.precision,
p.unit.symbol AS symbol,
p.status AS status
FROM PmfmImpl p
Modified: trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ReferentialTest.java
===================================================================
--- trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ReferentialTest.java 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-persistence-adagio/src/test/java/fr/ifremer/tutti/persistence/ReferentialTest.java 2013-01-11 14:13:28 UTC (rev 173)
@@ -50,8 +50,6 @@
@ClassRule
public static final DatabaseResource dbResource = new DatabaseResource();
-
-
@Test
public void getAllProgramZone() {
List<Zone> result = dbResource.getDriver().getAllProgramZone();
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SampleCategoryType.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SampleCategoryType.java 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SampleCategoryType.java 2013-01-11 14:13:28 UTC (rev 173)
@@ -40,9 +40,6 @@
* @since 0.3
*/
public enum SampleCategoryType implements DecoratorService.LabelAware {
- species(
- n_("tutti.sampleCategoryType.species"),
- SampleCategoryEnum.species),
sortedUnsorted(
n_("tutti.sampleCategoryType.sortedUnsorted"),
SampleCategoryEnum.sortedUnsorted),
@@ -86,7 +83,6 @@
static {
enumToType = Maps.newEnumMap(SampleCategoryEnum.class);
- enumToType.put(SampleCategoryEnum.species, species);
enumToType.put(SampleCategoryEnum.sortedUnsorted, sortedUnsorted);
enumToType.put(SampleCategoryEnum.size, size);
enumToType.put(SampleCategoryEnum.sex, sex);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java 2013-01-11 14:13:28 UTC (rev 173)
@@ -52,12 +52,8 @@
public static final String PROPERTY_SPECIES_TO_CONFIRM = "speciesToConfirm";
- public static final String PROPERTY_SPECIES_CATEGORY = "speciesCategory";
+ public static final String PROPERTY_SPECIES = "species";
- public static final String PROPERTY_SPECIES_CATEGORY_VALUE = "speciesCategoryValue";
-
- public static final String PROPERTY_SPECIES_CATEGORY_WEIGHT = "speciesCategoryWeight";
-
public static final String PROPERTY_SORTED_UNSORTED_CATEGORY = "sortedUnsortedCategory";
public static final String PROPERTY_SORTED_UNSORTED_CATEGORY_VALUE = "sortedUnsortedCategoryValue";
@@ -113,11 +109,11 @@
public static final String PROPERTY_SAMPLE_CATEGORY = "sampleCategory";
/**
- * Species category.
+ * Species.
*
- * @since 0.2
+ * @since 0.3
*/
- protected SampleCategory<Species> speciesCategory;
+ protected Species species;
/**
* Is catch is vrac or horsVrac?.
@@ -247,7 +243,6 @@
public SpeciesBatchRowModel() {
super(SpeciesBatch.class, fromBeanBinder, toBeanBinder);
frequency = Lists.newArrayList();
- speciesCategory = SampleCategory.newSample(SampleCategoryType.species);
sortedUnsortedCategory = SampleCategory.newSample(SampleCategoryType.sortedUnsorted);
sizeCategory = SampleCategory.newSample(SampleCategoryType.size);
sexCategory = SampleCategory.newSample(SampleCategoryType.sex);
@@ -281,10 +276,6 @@
public SampleCategory<?> getSampleCategory(SampleCategoryEnum sampleCategoryEnum) {
switch (sampleCategoryEnum) {
-
- case species:
- sampleCategory = getSpeciesCategory();
- break;
case sortedUnsorted:
sampleCategory = getSortedUnsortedCategory();
break;
@@ -309,34 +300,16 @@
//-- Species category --//
//------------------------------------------------------------------------//
- public SampleCategory<Species> getSpeciesCategory() {
- return speciesCategory;
+ public Species getSpecies() {
+ return species;
}
- public void setSpeciesCategory(SampleCategory<Species> speciesCategory) {
- Object oldCategory = getSpeciesCategory();
- Object oldValue = getSpeciesCategoryValue();
- Object oldWeight = getSpeciesCategoryWeight();
- this.speciesCategory = speciesCategory;
- firePropertyChange(PROPERTY_SPECIES_CATEGORY, oldCategory, speciesCategory);
- firePropertyChange(PROPERTY_SPECIES_CATEGORY_VALUE, oldValue, getSpeciesCategoryValue());
- firePropertyChange(PROPERTY_SPECIES_CATEGORY_WEIGHT, oldWeight, getSpeciesCategoryWeight());
+ public void setSpecies(Species species) {
+ Object oldCategory = getSpecies();
+ this.species = species;
+ firePropertyChange(PROPERTY_SPECIES, oldCategory, species);
}
- public Species getSpeciesCategoryValue() {
- return speciesCategory.getCategoryValue();
- }
-
- public Float getSpeciesCategoryWeight() {
- return speciesCategory.getCategoryWeight();
- }
-
- public void setSpeciesCategoryWeight(Float speciesCategoryWeight) {
- Object oldValue = getSpeciesCategoryWeight();
- speciesCategory.setCategoryWeight(speciesCategoryWeight);
- firePropertyChange(PROPERTY_SPECIES_CATEGORY_WEIGHT, oldValue, speciesCategoryWeight);
- }
-
//------------------------------------------------------------------------//
//-- SortedUnsorted category --//
//------------------------------------------------------------------------//
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTableModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTableModel.java 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTableModel.java 2013-01-11 14:13:28 UTC (rev 173)
@@ -84,12 +84,10 @@
}
}
- public static final ColumnIdentifier<SpeciesBatchRowModel> SPECIES_CATEGORY = SampleColumnIdentifier.newId(
- SpeciesBatchRowModel.PROPERTY_SPECIES_CATEGORY,
- SpeciesBatchRowModel.PROPERTY_SPECIES_CATEGORY_WEIGHT,
- SampleCategoryType.species,
- n_("tutti.table.species.batch.header.speciesCategory"),
- n_("tutti.table.species.batch.header.speciesCategory"));
+ public static final ColumnIdentifier<SpeciesBatchRowModel> SPECIES = ColumnIdentifier.newId(
+ SpeciesBatchRowModel.PROPERTY_SPECIES,
+ n_("tutti.table.species.batch.header.species"),
+ n_("tutti.table.species.batch.header.species"));
public static final ColumnIdentifier<SpeciesBatchRowModel> SORTED_UNSORTED_CATEGORY = SampleColumnIdentifier.newId(
SpeciesBatchRowModel.PROPERTY_SORTED_UNSORTED_CATEGORY,
@@ -193,7 +191,6 @@
frequencyCols.add(COMPUTED_WEIGHT);
sampleCols = Sets.newHashSet();
- sampleCols.add(SPECIES_CATEGORY);
sampleCols.add(SORTED_UNSORTED_CATEGORY);
sampleCols.add(SIZE_CATEGORY);
sampleCols.add(SEX_CATEGORY);
@@ -266,7 +263,7 @@
SpeciesBatchRowModel entry = getEntry(rowIndex);
// check from protocol what is possible ?
- Species species = entry.getSpeciesCategoryValue();
+ Species species = entry.getSpecies();
if (species == null) {
Deleted: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTreeModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTreeModel.java 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTreeModel.java 2013-01-11 14:13:28 UTC (rev 173)
@@ -1,293 +0,0 @@
-package fr.ifremer.tutti.ui.swing.content.operation.catches.species;
-
-/*
- * #%L
- * Tutti :: UI
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2012 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU 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 General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-
-import com.google.common.collect.HashMultimap;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Multimap;
-import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
-import org.apache.commons.collections.CollectionUtils;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Map;
-
-/**
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class SpeciesBatchTreeModel implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Root node (with no sampling on it.
- *
- * @since 0.2
- */
- protected final SpeciesBatchTreeNode root;
-
- /**
- * Property which are used to sub sampling.
- *
- * @since 0.2
- */
- protected String[] samplingOrder;
-
- /**
- * Mapping from row to node.
- *
- * @since 0.2
- */
- protected final Map<SpeciesBatchRowModel, SpeciesBatchTreeNode> rowToNode;
-
- /**
- * Mapping from node to row.
- *
- * @since 0.2
- */
- protected final Multimap<SpeciesBatchTreeNode, SpeciesBatchRowModel> nodeToRow;
-
- public SpeciesBatchTreeModel(String... samplingOrder) {
- this.samplingOrder = samplingOrder;
- root = new SpeciesBatchTreeNode();
- rowToNode = Maps.newHashMap();
- nodeToRow = HashMultimap.create();
- }
-
-// public void populate(List<SpeciesBatchRowModel> rows) {
-//
-// clear();
-//
-// for (SpeciesBatchRowModel row : rows) {
-//
-// SpeciesBatchTreeNode node = getSamplingNode(row);
-//
-// // check if row is valid
-// boolean rowIsValid = isValid(row, node);
-//
-// // set it in row
-// row.setValid(rowIsValid);
-// }
-// }
-
- public String[] getSamplingOrder() {
- return samplingOrder;
- }
-
- public void setSamplingOrder(String... samplingOrder) {
- this.samplingOrder = samplingOrder;
- clear();
- }
-
- protected void clear() {
- // clear tree representation
- root.removeAllChildren();
-
- // clear mappings
- rowToNode.clear();
- nodeToRow.clear();
- }
-
- public SpeciesBatchTreeNode removeNodeFromCache(SpeciesBatchRowModel row) {
- SpeciesBatchTreeNode result = rowToNode.remove(row);
- if (result != null) {
-
- nodeToRow.remove(result, row);
- }
- return result;
- }
-
- public SpeciesBatchTreeNode getSamplingNode(SpeciesBatchRowModel row) {
-
- // search frist in cache
- SpeciesBatchTreeNode result = rowToNode.get(row);
-
- if (result == null) {
-
- // not in cache must build the path
- result = getSamplingNode(root, 0, row);
-
- if (result == root) {
-
- // this means an empty row, so no node for it
- result = null;
-
- } else {
-
- // found a row with a sampling, add it in cache
- rowToNode.put(row, result);
- nodeToRow.put(result, row);
- }
- }
- return result;
- }
-
- protected SpeciesBatchTreeNode getSamplingNode(SpeciesBatchTreeNode node,
- int samplingIndex,
- SpeciesBatchRowModel row) {
-
- String samplingKey = samplingOrder[samplingIndex];
-
- Serializable samplingValue = (Serializable)
- TuttiUIUtil.getProperty(row, samplingKey);
-
- SpeciesBatchTreeNode result;
-
- if (samplingValue == null) {
-
- // was already on last sampling node
- result = node;
- } else {
-
- result = node.getChild(samplingValue);
-
- if (result == null) {
-
- // new node, creates it and add it as child of current node
- result = new SpeciesBatchTreeNode(samplingKey, samplingValue);
- node.add(result);
- }
-
- if (samplingIndex < samplingOrder.length) {
-
- // can try to find yet another sampling level
- result = getSamplingNode(result, samplingIndex + 1, row);
- }
- }
-
- return result;
- }
-
-// public SamplingContext createSamplingContext(SpeciesBatchTreeNode rootNode) {
-//
-// Set<SpeciesBatchRowModel> childRows = Sets.newHashSet();
-//
-// SpeciesBatchRowModel superSamplingRow = getNodeToRow(rootNode);
-//
-// float totalWeight = 0f;
-// for (int i = 0, nbChildren = rootNode.getChildCount(); i < nbChildren; i++) {
-// SpeciesBatchTreeNode node = rootNode.getChildAt(i);
-//
-// SpeciesBatchRowModel row = getNodeToRow(node);
-// if (row != null) {
-// CaracteristicQualitativeValue sortedUnsortedCategory =
-// row.getSortedUnsortedCategory();
-// if (sortedUnsortedCategory != null &&
-// "unsorted".equals(sortedUnsortedCategory.getName())) {
-//
-// // never take account of a such child
-//
-// } else {
-//
-// childRows.add(row);
-// Float weight = row.getWeight();
-// if (weight != null) {
-// totalWeight += weight;
-// }
-// }
-// }
-// }
-// SamplingContext result = new SamplingContext(rootNode,
-// superSamplingRow,
-// childRows,
-// totalWeight);
-// return result;
-// }
-
- public SpeciesBatchRowModel getNodeToRow(SpeciesBatchTreeNode node) {
- Collection<SpeciesBatchRowModel> rows = nodeToRow.get(node);
-
- SpeciesBatchRowModel result = null;
- if (CollectionUtils.isNotEmpty(rows)) {
- for (SpeciesBatchRowModel next : rows) {
- if (next.isValid()) {
- result = next;
- break;
- }
- }
- }
- return result;
- }
-
- public boolean isValid(SpeciesBatchRowModel row, SpeciesBatchTreeNode newNode) {
-
- // row must be on a sampling and having a weight
- boolean result = row.getWeight() != null && newNode != null;
-
- // make sure there is not already another row for this node
- if (result && CollectionUtils.size(nodeToRow.get(newNode)) > 1) {
- result = false;
- }
-
- return result;
- }
-
-// public static class SamplingContext {
-//
-// private final SpeciesBatchTreeNode rootNode;
-//
-// private final SpeciesBatchRowModel superSamplingRow;
-//
-// private final Set<SpeciesBatchRowModel> samplingRows;
-//
-// private final float totalWeight;
-//
-// public SamplingContext(SpeciesBatchTreeNode rootNode,
-// SpeciesBatchRowModel superSamplingRow,
-// Set<SpeciesBatchRowModel> samplingRows,
-// float totalWeight) {
-// this.rootNode = rootNode;
-// this.superSamplingRow = superSamplingRow;
-// this.samplingRows = samplingRows;
-// this.totalWeight = totalWeight;
-// }
-//
-// public SpeciesBatchTreeNode getRootNode() {
-// return rootNode;
-// }
-//
-// public SpeciesBatchRowModel getSuperSamplingRow() {
-// return superSamplingRow;
-// }
-//
-// public Set<SpeciesBatchRowModel> getSamplingRows() {
-// return samplingRows;
-// }
-//
-// public float getTotalWeight() {
-// return totalWeight;
-// }
-//
-// public void applyNewSampleValues(float samplingWeight,
-// Float samplingRatio) {
-//
-// for (SpeciesBatchRowModel row : samplingRows) {
-// row.setSampleWeight(samplingWeight);
-// row.setSamplingRatio(samplingRatio);
-// }
-// }
-// }
-}
Deleted: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTreeNode.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTreeNode.java 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTreeNode.java 2013-01-11 14:13:28 UTC (rev 173)
@@ -1,175 +0,0 @@
-package fr.ifremer.tutti.ui.swing.content.operation.catches.species;
-
-/*
- * #%L
- * Tutti :: UI
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2012 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU 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 General Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/gpl-3.0.html>.
- * #L%
- */
-
-import org.apache.commons.lang3.ObjectUtils;
-
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.TreeNode;
-import java.io.Serializable;
-import java.util.Arrays;
-
-/**
- * Defines a node of a species catches sampling.
- * <p/>
- * A path in the tree gives a sampling path.
- * <p/>
- * UserObject is the {@code samplingValue}. It can be null only on root node.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.2
- */
-public class SpeciesBatchTreeNode extends DefaultMutableTreeNode {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Property name defining the sampling.
- * <p/>
- * <strong>Note:</strong> can be null (only for root node).
- *
- * @since 0.2
- */
- protected final String samplingKey;
-
- public SpeciesBatchTreeNode() {
- this(null, null);
- }
-
- public SpeciesBatchTreeNode(String samplingKey,
- Serializable samplingValue) {
- this.samplingKey = samplingKey;
- setUserObject(samplingValue);
- }
-
- public String getSamplingPropertyKey() {
- return samplingKey;
- }
-
- public boolean matchSamplingValue(Serializable value) {
- Serializable samplingValue = getUserObject();
-
- boolean result = ObjectUtils.equals(value, samplingValue);
- return result;
- }
-
- public SpeciesBatchTreeNode getChild(Serializable samplingValue) {
- SpeciesBatchTreeNode result = null;
-
- for (int i = 0, max = getChildCount(); i < max; i++) {
- SpeciesBatchTreeNode child = getChildAt(i);
- if (child.matchSamplingValue(samplingValue)) {
-
- // found matching child
- result = child;
- break;
- }
- }
- return result;
- }
-
- @Override
- public Serializable getUserObject() {
- return (Serializable) super.getUserObject();
- }
-
- @Override
- public SpeciesBatchTreeNode getChildAt(int index) {
- return (SpeciesBatchTreeNode) super.getChildAt(index);
- }
-
- @Override
- public SpeciesBatchTreeNode getParent() {
- return (SpeciesBatchTreeNode) super.getParent();
- }
-
- @Override
- public SpeciesBatchTreeNode getRoot() {
- return (SpeciesBatchTreeNode) super.getRoot();
- }
-
- @Override
- public SpeciesBatchTreeNode getFirstChild() {
- return (SpeciesBatchTreeNode) super.getFirstChild();
- }
-
- @Override
- public SpeciesBatchTreeNode getLastChild() {
- return (SpeciesBatchTreeNode) super.getLastChild();
- }
-
- @Override
- public SpeciesBatchTreeNode getChildAfter(TreeNode aChild) {
- return (SpeciesBatchTreeNode) super.getChildAfter(aChild);
- }
-
- @Override
- public SpeciesBatchTreeNode getChildBefore(TreeNode aChild) {
- return (SpeciesBatchTreeNode) super.getChildBefore(aChild);
- }
-
- @Override
- public SpeciesBatchTreeNode getNextSibling() {
- return (SpeciesBatchTreeNode) super.getNextSibling();
- }
-
- @Override
- public SpeciesBatchTreeNode getPreviousSibling() {
- return (SpeciesBatchTreeNode) super.getPreviousSibling();
- }
-
- @Override
- public SpeciesBatchTreeNode getFirstLeaf() {
- return (SpeciesBatchTreeNode) super.getFirstLeaf();
- }
-
- @Override
- public SpeciesBatchTreeNode getLastLeaf() {
- return (SpeciesBatchTreeNode) super.getLastLeaf();
- }
-
- @Override
- public SpeciesBatchTreeNode getNextLeaf() {
- return (SpeciesBatchTreeNode) super.getNextLeaf();
- }
-
- @Override
- public SpeciesBatchTreeNode getPreviousLeaf() {
- return (SpeciesBatchTreeNode) super.getPreviousLeaf();
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (!(o instanceof SpeciesBatchTreeNode)) return false;
-
- SpeciesBatchTreeNode that = (SpeciesBatchTreeNode) o;
-
- Object[] path = getUserObjectPath();
- Object[] path2 = that.getUserObjectPath();
- return Arrays.equals(path, path2);
- }
-
-}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.css 2013-01-11 14:13:28 UTC (rev 173)
@@ -81,16 +81,26 @@
#splitSpeciesBatchMenu {
text: "tutti.action.splitSpeciesBatch";
+ toolTipTexttext: "tutti.action.splitSpeciesBatch.tip";
mnemonic: S;
actionIcon: batch-split;
- enabled: {model.isSplitSpeciesBatchEnabled()};
+ enabled: {model.isTableViewModeAll() && model.isSplitSpeciesBatchEnabled()};
}
+#removeSpeciesBatchMenu {
+ text: "tutti.action.removeSpeciesBatch";
+ toolTipText: "tutti.action.removeSpeciesBatch.tip";
+ mnemonic: R;
+ actionIcon: batch-delete;
+ enabled: {model.isTableViewModeAll() && model.isRemoveSpeciesBatchEnabled()};
+}
+
#removeSpeciesSubBatchMenu {
text: "tutti.action.removeSpeciesSubBatch";
+ tooltiptext: "tutti.action.removeSpeciesSubBatch.tip";
mnemonic: R;
actionIcon: batch-delete;
- enabled: {model.isRemoveSpeciesSubBatchEnabled()};
+ enabled: {model.isTableViewModeAll() && model.isRemoveSpeciesSubBatchEnabled()};
}
#table {
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx 2013-01-11 14:13:28 UTC (rev 173)
@@ -84,6 +84,8 @@
<!--onPopupMenuWillBecomeVisible='handler.updateTablePopup()'>-->
<JMenuItem id='splitSpeciesBatchMenu'
onActionPerformed='handler.splitSpeciesBatch()'/>
+ <JMenuItem id='removeSpeciesBatchMenu'
+ onActionPerformed='handler.removeSpeciesBatch()'/>
<JMenuItem id='removeSpeciesSubBatchMenu'
onActionPerformed='handler.removeSpeciesSubBatch()'/>
</JPopupMenu>
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-01-11 14:13:28 UTC (rev 173)
@@ -85,13 +85,12 @@
public static final Set<String> SAMPLING_PROPERTIES = Sets.newHashSet(
SpeciesBatchRowModel.PROPERTY_SAMPLE_CATEGORY,
- SpeciesBatchRowModel.PROPERTY_SPECIES_CATEGORY,
+ SpeciesBatchRowModel.PROPERTY_SPECIES,
SpeciesBatchRowModel.PROPERTY_SORTED_UNSORTED_CATEGORY,
SpeciesBatchRowModel.PROPERTY_SIZE_CATEGORY,
SpeciesBatchRowModel.PROPERTY_SEX_CATEGORY,
SpeciesBatchRowModel.PROPERTY_MATURITY_CATEGORY,
SpeciesBatchRowModel.PROPERTY_AGE_CATEGORY,
- SpeciesBatchRowModel.PROPERTY_SPECIES_CATEGORY_WEIGHT,
SpeciesBatchRowModel.PROPERTY_SORTED_UNSORTED_CATEGORY_WEIGHT,
SpeciesBatchRowModel.PROPERTY_SIZE_CATEGORY_WEIGHT,
SpeciesBatchRowModel.PROPERTY_SEX_CATEGORY_WEIGHT,
@@ -115,8 +114,7 @@
SpeciesBatchUI ui) {
super(parentUi,
SpeciesBatchRowModel.PROPERTY_SPECIES_TO_CONFIRM,
- SpeciesBatchRowModel.PROPERTY_SPECIES_CATEGORY,
- SpeciesBatchRowModel.PROPERTY_SPECIES_CATEGORY_WEIGHT,
+ SpeciesBatchRowModel.PROPERTY_SPECIES,
SpeciesBatchRowModel.PROPERTY_SORTED_UNSORTED_CATEGORY,
SpeciesBatchRowModel.PROPERTY_SORTED_UNSORTED_CATEGORY_WEIGHT,
SpeciesBatchRowModel.PROPERTY_SIZE_CATEGORY,
@@ -173,13 +171,13 @@
// root batch sample categroy is species
Preconditions.checkState(
- aBatch.getSampleCategoryType() == SampleCategoryEnum.species,
+ aBatch.getSampleCategoryType() == SampleCategoryEnum.sortedUnsorted,
"Root species batch must be a species sample " +
"category but was:" + aBatch.getSampleCategoryType());
SpeciesBatchRowModel rootRow =
loadSpeciesBatch(aBatch, null, rows);
- speciesUsed.add(rootRow.getSpeciesCategoryValue());
+ speciesUsed.add(rootRow.getSpecies());
}
availableSpecies.removeAll(speciesUsed);
}
@@ -209,10 +207,10 @@
// a row is valid if species category is not empty and valid
// then if any of none empty category is valid
- boolean result = !row.getSpeciesCategory().isEmpty() &&
- row.getSpeciesCategory().isValid();
+ boolean result = row.getSpecies() != null &&
+ !row.getSortedUnsortedCategory().isEmpty() &&
+ row.getSortedUnsortedCategory().isValid();
- result &= row.getSortedUnsortedCategory().isEmptyOrValid();
result &= row.getSizeCategory().isEmptyOrValid();
result &= row.getSexCategory().isEmptyOrValid();
result &= row.getMaturityCategory().isEmptyOrValid();
@@ -292,7 +290,10 @@
}
@Override
- protected void onRowValidStateChanged(int rowIndex, SpeciesBatchRowModel row, Boolean oldValue, Boolean newValue) {
+ protected void onRowValidStateChanged(int rowIndex,
+ SpeciesBatchRowModel row,
+ Boolean oldValue,
+ Boolean newValue) {
super.onRowValidStateChanged(rowIndex, row, oldValue, newValue);
// when row valid state has changed, recompute action enabled states
@@ -383,11 +384,8 @@
Species species = persistenceService.getSpecies(
protocolSpecy.getSpeciesId());
allSpecies.add(species);
- speciesSampleCategories.put(species, SampleCategoryType.species);
+ speciesSampleCategories.put(species, SampleCategoryType.sortedUnsorted);
- if (protocolSpecy.isSortedUnsortedEnabled()) {
- speciesSampleCategories.put(species, SampleCategoryType.sortedUnsorted);
- }
if (protocolSpecy.isSizeEnabled()) {
speciesSampleCategories.put(species, SampleCategoryType.size);
}
@@ -417,7 +415,6 @@
// each species can use any category
for (Species species : allSpecies) {
- speciesSampleCategories.put(species, SampleCategoryType.species);
speciesSampleCategories.put(species, SampleCategoryType.sortedUnsorted);
speciesSampleCategories.put(species, SampleCategoryType.size);
speciesSampleCategories.put(species, SampleCategoryType.sex);
@@ -446,12 +443,12 @@
Decorator<CaracteristicQualitativeValue> caracteristicDecorator =
getDecorator(CaracteristicQualitativeValue.class, null);
- { // SpeciesCategory column
+ { // Species column
- addSampleCategoryColumnToModel(columnModel,
- SpeciesBatchTableModel.SPECIES_CATEGORY,
- getDecorator(Species.class, null),
- defaultRenderer);
+ addColumnToModel(columnModel,
+ null,
+ newTableCellRender(Species.class),
+ SpeciesBatchTableModel.SPECIES);
}
{ // SortedUnsortedCategory column
@@ -597,12 +594,11 @@
SpeciesBatchTableModel tableModel = getTableModel();
SpeciesBatchRowModel newRow = tableModel.createNewRow();
- SampleCategory<Species> speciesCategory = newRow.getSpeciesCategory();
Species species = createModel.getSpecies();
- speciesCategory.setCategoryValue(species);
- speciesCategory.setCategoryWeight(createModel.getBatchWeight());
- newRow.setSampleCategory(speciesCategory);
+ newRow.setSpecies(species);
+ //TODO Add sortedUnosrtedCategory
+
recomputeRowValidState(newRow);
tableModel.addNewRow(newRow);
@@ -699,6 +695,77 @@
// table.requestFocus();
}
+ public void removeSpeciesBatch() {
+
+ JXTable table = getTable();
+
+ int rowIndex = table.getSelectedRow();
+
+ Preconditions.checkState(rowIndex != -1,
+ "Cant remove batch if no batch selected");
+
+ SpeciesBatchTableModel tableModel = getTableModel();
+ SpeciesBatchRowModel selectedBatch = tableModel.getEntry(rowIndex);
+
+ Preconditions.checkState(!TuttiEntities.isNew(selectedBatch),
+ "Can't remove batch if batch is not persisted");
+
+ if (!selectedBatch.isBatchRoot()) {
+
+ // remove all sub batches of his parent
+
+ SpeciesBatchRowModel parentBatch = selectedBatch.getBatchParent();
+
+ // get parent row index
+ int parentIndex = tableModel.getRowIndex(parentBatch);
+
+ // select it
+ table.setRowSelectionInterval(parentIndex, parentIndex);
+
+ // remove all his children
+ removeSpeciesSubBatch();
+
+ } else {
+
+ // remove selected batch and all his children
+
+ // collect of rows to remove from model
+ Set<SpeciesBatchRowModel> rowToRemove =
+ Sets.newHashSet(selectedBatch);
+
+ collectChilds(selectedBatch, rowToRemove);
+
+ // remove all rows from the model
+ getModel().getRows().removeAll(rowToRemove);
+
+ // remove childs from parent batch
+ selectedBatch.setBatchChilds(null);
+
+ // save parent batch (will destroy all his childs from db)
+ persistenceService.deleteSpeciesBatch(selectedBatch.getId());
+
+ // refresh table from parent batch row index to the end
+ tableModel.fireTableDataChanged();
+
+ if (tableModel.getRowCount() > 0) {
+
+ // select first row
+ AbstractSelectTableAction.doSelectCell(table, 0, 0);
+ } else {
+
+ table.clearSelection();
+ }
+
+ if (table.isEditing()) {
+
+ // but no edit it
+ table.getCellEditor().stopCellEditing();
+ }
+ }
+
+
+ }
+
public void removeSpeciesSubBatch() {
JXTable table = getTable();
@@ -903,6 +970,7 @@
boolean enableSplit = false;
boolean enableRemove = false;
+ boolean enableRemoveSub = false;
if (rowIndex != -1) {
@@ -920,6 +988,7 @@
enableSplit = true;
enableRemove = true;
+ enableRemoveSub = true;
}
if (enableSplit) {
@@ -931,13 +1000,20 @@
if (enableRemove) {
- // can remove sub batch if selected batch is not a leaf
+ // can remove batch if selected batch is not a leaf
enableRemove = !row.isBatchLeaf();
}
+
+ if (enableRemoveSub) {
+
+ // can remove sub batch if selected batch is not a leaf
+ enableRemoveSub = !row.isBatchLeaf();
+ }
}
getModel().setCreateSpeciesBatchEnabled(enableAdd);
getModel().setSplitSpeciesBatchEnabled(enableSplit);
- getModel().setRemoveSpeciesSubBatchEnabled(enableRemove);
+ getModel().setRemoveSpeciesBatchEnabled(enableRemove);
+ getModel().setRemoveSpeciesSubBatchEnabled(enableRemoveSub);
}
@@ -1019,9 +1095,7 @@
newRow.setSpeciesToConfirm(parentRow.getSpeciesToConfirm());
newRow.setBatchParent(parentRow);
- if (sampleCategoryEnum != SampleCategoryEnum.species) {
- newRow.setSpeciesCategory(parentRow.getSpeciesCategory());
- }
+ newRow.setSpecies(parentRow.getSpecies());
if (sampleCategoryEnum != SampleCategoryEnum.sortedUnsorted) {
newRow.setSortedUnsortedCategory(parentRow.getSortedUnsortedCategory());
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java 2013-01-11 14:13:28 UTC (rev 173)
@@ -50,6 +50,7 @@
public static final String PROPERTY_SPLIT_SPECIES_BATCH_ENABLED = "splitSpeciesBatchEnabled";
public static final String PROPERTY_REMOVE_SPECIES_SUB_BATCH_ENABLED = "removeSpeciesSubBatchEnabled";
+ public static final String PROPERTY_REMOVE_SPECIES_BATCH_ENABLED = "removeSpeciesBatchEnabled";
/**
* Sampling order (sets by protocol).
@@ -94,6 +95,13 @@
protected boolean splitSpeciesBatchEnabled;
/**
+ * Can user remove a selected species batch?
+ *
+ * @since 0.3
+ */
+ protected boolean removeSpeciesBatchEnabled;
+
+ /**
* Can user remove a selected species sub batches?
*
* @since 0.3
@@ -213,6 +221,16 @@
firePropertyChange(PROPERTY_SPLIT_SPECIES_BATCH_ENABLED, oldValue, splitSpeciesBatchEnabled);
}
+ public boolean isRemoveSpeciesBatchEnabled() {
+ return removeSpeciesBatchEnabled;
+ }
+
+ public void setRemoveSpeciesBatchEnabled(boolean removeSpeciesBatchEnabled) {
+ Object oldValue = isRemoveSpeciesBatchEnabled();
+ this.removeSpeciesBatchEnabled = removeSpeciesBatchEnabled;
+ firePropertyChange(PROPERTY_REMOVE_SPECIES_BATCH_ENABLED, oldValue, removeSpeciesBatchEnabled);
+ }
+
public boolean isRemoveSpeciesSubBatchEnabled() {
return removeSpeciesSubBatchEnabled;
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesRowModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesRowModel.java 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesRowModel.java 2013-01-11 14:13:28 UTC (rev 173)
@@ -41,8 +41,6 @@
public static final String PROPERTY_SPECIES = "species";
- public static final String PROPERTY_SORTED_UNSORTED_ENABLED = "sortedUnsortedEnabled";
-
public static final String PROPERTY_SIZE_ENABLED = "sizeEnabled";
public static final String PROPERTY_SEX_ENABLED = "sexEnabled";
@@ -55,8 +53,6 @@
protected Species species;
- protected boolean sortedUnsortedEnabled;
-
protected boolean sizeEnabled;
protected boolean sexEnabled;
@@ -93,16 +89,6 @@
firePropertyChange(PROPERTY_SPECIES, oldValue, species);
}
- public boolean isSortedUnsortedEnabled() {
- return sortedUnsortedEnabled;
- }
-
- public void setSortedUnsortedEnabled(boolean sortedUnsortedEnabled) {
- Object oldValue = isSortedUnsortedEnabled();
- this.sortedUnsortedEnabled = sortedUnsortedEnabled;
- firePropertyChange(PROPERTY_SORTED_UNSORTED_ENABLED, oldValue, sortedUnsortedEnabled);
- }
-
public boolean isSizeEnabled() {
return sizeEnabled;
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesTableModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesTableModel.java 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolSpeciesTableModel.java 2013-01-11 14:13:28 UTC (rev 173)
@@ -42,11 +42,6 @@
n_("tutti.table.protocol.species.header.speciesId"),
n_("tutti.table.protocol.species.header.speciesId"));
- public static final ColumnIdentifier<EditProtocolSpeciesRowModel> SORTED_UNSORTED_ENABLED = ColumnIdentifier.newId(
- EditProtocolSpeciesRowModel.PROPERTY_SORTED_UNSORTED_ENABLED,
- n_("tutti.table.protocol.species.header.sortedUnsorted"),
- n_("tutti.table.protocol.species.header.sortedUnsorted"));
-
public static final ColumnIdentifier<EditProtocolSpeciesRowModel> SIZE_ENABLED = ColumnIdentifier.newId(
EditProtocolSpeciesRowModel.PROPERTY_SIZE_ENABLED,
n_("tutti.table.protocol.species.header.size"),
@@ -87,7 +82,6 @@
result.setSizeEnabled(true);
result.setSexEnabled(true);
result.setAgeEnabled(true);
- result.setSortedUnsortedEnabled(true);
result.setValid(false);
return result;
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java 2013-01-11 14:13:28 UTC (rev 173)
@@ -99,8 +99,7 @@
public EditProtocolUIHandler(TuttiUIContext context, EditProtocolUI ui) {
super(context);
this.ui = ui;
- columToSampleCategory = HashBiMap.create(SampleCategoryEnum.values().length);
- columToSampleCategory.put(EditProtocolSpeciesTableModel.SORTED_UNSORTED_ENABLED, SampleCategoryEnum.sortedUnsorted);
+ columToSampleCategory = HashBiMap.create(SampleCategoryEnum.values().length-1);
columToSampleCategory.put(EditProtocolSpeciesTableModel.SIZE_ENABLED, SampleCategoryEnum.size);
columToSampleCategory.put(EditProtocolSpeciesTableModel.SEX_ENABLED, SampleCategoryEnum.sex);
columToSampleCategory.put(EditProtocolSpeciesTableModel.MATURITY_ENABLED, SampleCategoryEnum.maturity);
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-01-11 13:41:36 UTC (rev 172)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-01-11 14:13:28 UTC (rev 173)
@@ -24,14 +24,18 @@
tutti.action.reload.ui=Recharger l'interface graphique
tutti.action.removeCaracteristic=Supprimer la caractéristique
tutti.action.removeSpecies=Supprimer l'espèce
-tutti.action.removeSpeciesSubBatch=Supprimer les lots
+tutti.action.removeSpeciesSubBatch=Supprimer les lots fils
+tutti.action.removeSpeciesSubBatch.tip=Supprimer tous les lots fils du lot sélectionné
+tutti.action.removeSpeciesBatch=Supprimer le lot
+tutti.action.removeSpeciesBatch.tip=Supprimer le lot courant (celui de la ligne sélectionnée) et tous ces fils
tutti.action.reset.fishingOperationValidState=Réinitialiser
tutti.action.save=Enregistrer
tutti.action.selectCampaign=Campagne
tutti.action.selectCampaign.tip=Sélectionner la campagne à utiliser
tutti.action.site=Site
tutti.action.site.tip=Accéder au site du projet Tutti
-tutti.action.splitSpeciesBatch=Catégoriser un lot
+tutti.action.splitSpeciesBatch=Catégoriser le lot
+tutti.action.splitSpeciesBatch.tip=Catégoriser le lot courant (celui de la ligne sélectionné)
tutti.action.validateCatches=Valider les captures
tutti.action.validateCatches.tip=Valider les captures
tutti.application.config=Configuration de l'application Tutti
1
0
11 Jan '13
Author: tchemit
Date: 2013-01-11 14:41:36 +0100 (Fri, 11 Jan 2013)
New Revision: 172
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/172
Log:
add new filed to protocol
Modified:
trunk/tutti-persistence/src/main/xmi/tutti-persistence.zargo
Modified: trunk/tutti-persistence/src/main/xmi/tutti-persistence.zargo
===================================================================
(Binary files differ)
1
0