Wao-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
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
August 2014
- 3 participants
- 38 discussions
r2210 - branches/wao-4.0.x/wao-services/src/main/java/fr/ifremer/wao/services/service/administration
by bleny@users.forge.codelutin.com 13 Aug '14
by bleny@users.forge.codelutin.com 13 Aug '14
13 Aug '14
Author: bleny
Date: 2014-08-13 11:36:03 +0200 (Wed, 13 Aug 2014)
New Revision: 2210
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2210
Log:
Quand on cochait ?\194?\171 Professionnel en lecture seule ?\194?\187 ?\195?\167a activait le profil admistrateur en lecture seule fixes #5621
Modified:
branches/wao-4.0.x/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/UpdateWaoUserCommand.java
Modified: branches/wao-4.0.x/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/UpdateWaoUserCommand.java
===================================================================
--- branches/wao-4.0.x/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/UpdateWaoUserCommand.java 2014-08-13 08:17:16 UTC (rev 2209)
+++ branches/wao-4.0.x/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/UpdateWaoUserCommand.java 2014-08-13 09:36:03 UTC (rev 2210)
@@ -207,7 +207,7 @@
}
public void setProfessionalReadOnly(boolean professionalReadOnly) {
- updateUserProfile(UserRole.ADMIN, true, professionalReadOnly);
+ updateUserProfile(UserRole.PROFESSIONAL, true, professionalReadOnly);
}
public UpdateWaoUserCommandPasswordStrategy getPasswordStrategy() {
1
0
r2209 - branches/wao-4.0.x/wao-services/src/main/java/fr/ifremer/wao/services
by bleny@users.forge.codelutin.com 13 Aug '14
by bleny@users.forge.codelutin.com 13 Aug '14
13 Aug '14
Author: bleny
Date: 2014-08-13 10:17:16 +0200 (Wed, 13 Aug 2014)
New Revision: 2209
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2209
Log:
On autorise le coordinateur ?\195?\160 activer/d?\195?\169sactiver un utilisateur fixes #5627
Modified:
branches/wao-4.0.x/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java
Modified: branches/wao-4.0.x/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java
===================================================================
--- branches/wao-4.0.x/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java 2014-08-08 15:24:44 UTC (rev 2208)
+++ branches/wao-4.0.x/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java 2014-08-13 08:17:16 UTC (rev 2209)
@@ -112,7 +112,7 @@
}
public boolean isAuthorizedToActiveUser() {
- return userProfile.isAdmin() && isCanWrite();
+ return (userProfile.isAdmin() || userProfile.isCoordinator()) && isCanWrite();
}
public boolean isAuthorizedToChangeUserCompany() {
1
0
08 Aug '14
Author: bleny
Date: 2014-08-08 17:24:44 +0200 (Fri, 08 Aug 2014)
New Revision: 2208
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2208
Log:
reuse variable
Modified:
branches/wao-4.0.x/wao-web/src/main/webapp/wao.js
Modified: branches/wao-4.0.x/wao-web/src/main/webapp/wao.js
===================================================================
--- branches/wao-4.0.x/wao-web/src/main/webapp/wao.js 2014-08-08 13:28:23 UTC (rev 2207)
+++ branches/wao-4.0.x/wao-web/src/main/webapp/wao.js 2014-08-08 15:24:44 UTC (rev 2208)
@@ -613,7 +613,7 @@
//$('select').addClass('input-xlarge').select2();
var $select2Inputs = $('select.select2');
if ($select2Inputs.length > 0) {
- $('select.select2').select2();
+ $select2Inputs.select2();
}
WAO = new Wao();
1
0
r2207 - in branches/wao-4.0.x/wao-web/src/main/webapp: . WEB-INF/content/authentication
by bleny@users.forge.codelutin.com 08 Aug '14
by bleny@users.forge.codelutin.com 08 Aug '14
08 Aug '14
Author: bleny
Date: 2014-08-08 15:28:23 +0200 (Fri, 08 Aug 2014)
New Revision: 2207
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2207
Log:
fixes #5612 add a focus on login field on login page
Modified:
branches/wao-4.0.x/wao-web/src/main/webapp/WEB-INF/content/authentication/login.jsp
branches/wao-4.0.x/wao-web/src/main/webapp/wao.js
Modified: branches/wao-4.0.x/wao-web/src/main/webapp/WEB-INF/content/authentication/login.jsp
===================================================================
--- branches/wao-4.0.x/wao-web/src/main/webapp/WEB-INF/content/authentication/login.jsp 2014-08-06 16:21:53 UTC (rev 2206)
+++ branches/wao-4.0.x/wao-web/src/main/webapp/WEB-INF/content/authentication/login.jsp 2014-08-08 13:28:23 UTC (rev 2207)
@@ -27,6 +27,11 @@
<title>
<s:text name="wao.ui.form.authentication.title" />
</title>
+ <script>
+ $(document).ready(function () {
+ $('input[name="login"]').focus();
+ });
+ </script>
</head>
<body>
Modified: branches/wao-4.0.x/wao-web/src/main/webapp/wao.js
===================================================================
--- branches/wao-4.0.x/wao-web/src/main/webapp/wao.js 2014-08-06 16:21:53 UTC (rev 2206)
+++ branches/wao-4.0.x/wao-web/src/main/webapp/wao.js 2014-08-08 13:28:23 UTC (rev 2207)
@@ -611,7 +611,10 @@
// FIXME brendan 07/04/14 cannot enable select2 because we can't bind blur event without driving the application crazy, see https://github.com/ivaynberg/select2/issues/2193
//$('select').addClass('input-xlarge').select2();
- $('select.select2').select2();
+ var $select2Inputs = $('select.select2');
+ if ($select2Inputs.length > 0) {
+ $('select.select2').select2();
+ }
WAO = new Wao();
1
0
The Wao team is pleased to announce the wao-4.0.7 release!
Application pour le suivi contractuels d'observations scientifiques de la pêche
Documentation of the project can be found here:
http://doc.codelutin.com/wao
Changes
-------
Changes in this version include:
Fixed Bugs:
o Impossible de validée une marée par la coordinatrice Issue: 5603. Thanks to Anne-Sophie Cornou. Resolved by bleny.
o Erreur à la demande de modification d'un contact Issue: 5585. Thanks to Brendan Le Ny. Resolved by bleny.
o Erreur de sérialisation JSON Issue: 5397. Thanks to Brendan Le Ny. Resolved by bleny.
o Erreur lors de la validation à l'enregistrement d'un utilisateur Issue: 5492. Thanks to Brendan Le Ny. Resolved by bleny.
o Incohérence dans le plan Issue: 5496. Thanks to Anne-Sophie Cornou. Resolved by bleny.
Downloads
---------
For a manual installation, you can download files here:
http://forge.codelutin.com/projects/wao/files
* wao-4.0.7.war - http://forge.codelutin.com/attachments/download/2131
Maven artifacts
---------------
Artifacts are deployed in nuiton maven repository
http://maven.nuiton.org/other-releases/
Have fun!
-Wao team
1
0
r2206 - in branches/wao-4.0.x: . wao-persistence wao-services wao-web
by maven-release@users.forge.codelutin.com 06 Aug '14
by maven-release@users.forge.codelutin.com 06 Aug '14
06 Aug '14
Author: maven-release
Date: 2014-08-06 18:21:53 +0200 (Wed, 06 Aug 2014)
New Revision: 2206
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2206
Log:
[maven-release-plugin] prepare for next development iteration
Modified:
branches/wao-4.0.x/pom.xml
branches/wao-4.0.x/wao-persistence/pom.xml
branches/wao-4.0.x/wao-services/pom.xml
branches/wao-4.0.x/wao-web/pom.xml
Modified: branches/wao-4.0.x/pom.xml
===================================================================
--- branches/wao-4.0.x/pom.xml 2014-08-06 16:21:48 UTC (rev 2205)
+++ branches/wao-4.0.x/pom.xml 2014-08-06 16:21:53 UTC (rev 2206)
@@ -10,7 +10,7 @@
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.0.7</version>
+ <version>4.0.8-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Wao</name>
@@ -86,9 +86,9 @@
</modules>
<scm>
- <connection>scm:svn:http://svn.codelutin.com/wao/tags/wao-4.0.7</connection>
- <developerConnection>scm:svn:https://svn.codelutin.com/wao/tags/wao-4.0.7</developerConnection>
- <url>https://forge.codelutin.com/repositories/browse/wao/tags/wao-4.0.7</url>
+ <connection>scm:svn:http://svn.codelutin.com/wao/branches/wao-4.0.x</connection>
+ <developerConnection>scm:svn:https://svn.codelutin.com/wao/branches/wao-4.0.x</developerConnection>
+ <url>https://forge.codelutin.com/repositories/browse/wao/branches/wao-4.0.x</url>
</scm>
<properties>
Modified: branches/wao-4.0.x/wao-persistence/pom.xml
===================================================================
--- branches/wao-4.0.x/wao-persistence/pom.xml 2014-08-06 16:21:48 UTC (rev 2205)
+++ branches/wao-4.0.x/wao-persistence/pom.xml 2014-08-06 16:21:53 UTC (rev 2206)
@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.0.7</version>
+ <version>4.0.8-SNAPSHOT</version>
</parent>
<artifactId>wao-persistence</artifactId>
Modified: branches/wao-4.0.x/wao-services/pom.xml
===================================================================
--- branches/wao-4.0.x/wao-services/pom.xml 2014-08-06 16:21:48 UTC (rev 2205)
+++ branches/wao-4.0.x/wao-services/pom.xml 2014-08-06 16:21:53 UTC (rev 2206)
@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.0.7</version>
+ <version>4.0.8-SNAPSHOT</version>
</parent>
<artifactId>wao-services</artifactId>
Modified: branches/wao-4.0.x/wao-web/pom.xml
===================================================================
--- branches/wao-4.0.x/wao-web/pom.xml 2014-08-06 16:21:48 UTC (rev 2205)
+++ branches/wao-4.0.x/wao-web/pom.xml 2014-08-06 16:21:53 UTC (rev 2206)
@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.0.7</version>
+ <version>4.0.8-SNAPSHOT</version>
</parent>
<artifactId>wao-web</artifactId>
1
0
Author: maven-release
Date: 2014-08-06 18:21:48 +0200 (Wed, 06 Aug 2014)
New Revision: 2205
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2205
Log:
[maven-release-plugin] copy for tag wao-4.0.7
Added:
tags/wao-4.0.7/
Property changes on: tags/wao-4.0.7
___________________________________________________________________
Added: svn:ignore
+ *.idea
*.iml
target
atlassian-ide-plugin.xml
Added: svn:mergeinfo
+ /branches/wao-4.0-obsvente:2075-2085
1
0
r2204 - in branches/wao-4.0.x: . wao-persistence wao-services wao-web
by maven-release@users.forge.codelutin.com 06 Aug '14
by maven-release@users.forge.codelutin.com 06 Aug '14
06 Aug '14
Author: maven-release
Date: 2014-08-06 18:21:41 +0200 (Wed, 06 Aug 2014)
New Revision: 2204
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2204
Log:
[maven-release-plugin] prepare release wao-4.0.7
Modified:
branches/wao-4.0.x/pom.xml
branches/wao-4.0.x/wao-persistence/pom.xml
branches/wao-4.0.x/wao-services/pom.xml
branches/wao-4.0.x/wao-web/pom.xml
Modified: branches/wao-4.0.x/pom.xml
===================================================================
--- branches/wao-4.0.x/pom.xml 2014-08-06 15:50:42 UTC (rev 2203)
+++ branches/wao-4.0.x/pom.xml 2014-08-06 16:21:41 UTC (rev 2204)
@@ -10,7 +10,7 @@
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.0.7-SNAPSHOT</version>
+ <version>4.0.7</version>
<packaging>pom</packaging>
<name>Wao</name>
@@ -86,9 +86,9 @@
</modules>
<scm>
- <connection>scm:svn:http://svn.codelutin.com/wao/branches/wao-4.0.x</connection>
- <developerConnection>scm:svn:https://svn.codelutin.com/wao/branches/wao-4.0.x</developerConnection>
- <url>https://forge.codelutin.com/repositories/browse/wao/branches/wao-4.0.x</url>
+ <connection>scm:svn:http://svn.codelutin.com/wao/tags/wao-4.0.7</connection>
+ <developerConnection>scm:svn:https://svn.codelutin.com/wao/tags/wao-4.0.7</developerConnection>
+ <url>https://forge.codelutin.com/repositories/browse/wao/tags/wao-4.0.7</url>
</scm>
<properties>
Modified: branches/wao-4.0.x/wao-persistence/pom.xml
===================================================================
--- branches/wao-4.0.x/wao-persistence/pom.xml 2014-08-06 15:50:42 UTC (rev 2203)
+++ branches/wao-4.0.x/wao-persistence/pom.xml 2014-08-06 16:21:41 UTC (rev 2204)
@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.0.7-SNAPSHOT</version>
+ <version>4.0.7</version>
</parent>
<artifactId>wao-persistence</artifactId>
Modified: branches/wao-4.0.x/wao-services/pom.xml
===================================================================
--- branches/wao-4.0.x/wao-services/pom.xml 2014-08-06 15:50:42 UTC (rev 2203)
+++ branches/wao-4.0.x/wao-services/pom.xml 2014-08-06 16:21:41 UTC (rev 2204)
@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.0.7-SNAPSHOT</version>
+ <version>4.0.7</version>
</parent>
<artifactId>wao-services</artifactId>
Modified: branches/wao-4.0.x/wao-web/pom.xml
===================================================================
--- branches/wao-4.0.x/wao-web/pom.xml 2014-08-06 15:50:42 UTC (rev 2203)
+++ branches/wao-4.0.x/wao-web/pom.xml 2014-08-06 16:21:41 UTC (rev 2204)
@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>wao</artifactId>
- <version>4.0.7-SNAPSHOT</version>
+ <version>4.0.7</version>
</parent>
<artifactId>wao-web</artifactId>
1
0
r2203 - trunk/wao-persistence/src/main/resources/db/migration
by bleny@users.forge.codelutin.com 06 Aug '14
by bleny@users.forge.codelutin.com 06 Aug '14
06 Aug '14
Author: bleny
Date: 2014-08-06 17:50:42 +0200 (Wed, 06 Aug 2014)
New Revision: 2203
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2203
Log:
revert some changes in a migration
Modified:
trunk/wao-persistence/src/main/resources/db/migration/V4_0__clean_database.sql
Modified: trunk/wao-persistence/src/main/resources/db/migration/V4_0__clean_database.sql
===================================================================
--- trunk/wao-persistence/src/main/resources/db/migration/V4_0__clean_database.sql 2014-08-06 15:49:06 UTC (rev 2202)
+++ trunk/wao-persistence/src/main/resources/db/migration/V4_0__clean_database.sql 2014-08-06 15:50:42 UTC (rev 2203)
@@ -53,9 +53,9 @@
-- Erreur de l'unicité dans le référentiel des codes DCF
-update dcf5code_sampleRow set dcf5code='fr.ifremer.wao.entities.Dcf5Code#1289320029000#798260963OTB' where dcf5code='fr.ifremer.wao.entities.Dcf5Code#1289320029000#798260963OTBDES';
+update dcf5code_sampleRow set dcf5code='fr.ifremer.wao.entities.DCF5Code#1289320029000#798260963OTB' where dcf5code='fr.ifremer.wao.entities.DCF5Code#1289320029000#798260963OTBDES';
-delete from dcf5code where topiaId='fr.ifremer.wao.entities.Dcf5Code#1289320029000#798260963OTBDES';
+delete from dcf5code where topiaId='fr.ifremer.wao.entities.DCF5Code#1289320029000#798260963OTBDES';
-- Erreur de l'unicité dans le référentiel des codes DCF
1
0
06 Aug '14
Author: bleny
Date: 2014-08-06 17:49:06 +0200 (Wed, 06 Aug 2014)
New Revision: 2202
Url: http://forge.codelutin.com/projects/wao/repository/revisions/2202
Log:
remove upercases in entites names and properties
Added:
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Dcf5CodeImpl.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Dcf5Codes.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/FishingGearDcfImpl.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TargetSpeciesDcfImpl.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/Dcf5CodesParserFormatter.java
Removed:
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/DCF5CodeImpl.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/DCF5Codes.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/FishingGearDCFImpl.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TargetSpeciesDCFImpl.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DCF5CodesParserFormatter.java
Modified:
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactTopiaDao.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowTopiaDao.java
trunk/wao-persistence/src/main/resources/db/migration/V4_0__clean_database.sql
trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties
trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties
trunk/wao-persistence/src/main/xmi/wao-model.properties
trunk/wao-persistence/src/main/xmi/wao-model.zargo
trunk/wao-services/src/main/java/fr/ifremer/wao/services/ObsMerFixtures.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlanService.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateSampleRowCommand.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/WaoServiceSupport.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ObsMerObsVenteSamplingPlanImportExportModel.java
trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/administration/ReferentialServiceTest.java
trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/ContactsAction.java
trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/EditSampleRowAction.java
trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties
trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties
trunk/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp
trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
trunk/wao-web/src/main/webapp/WEB-INF/content/obsvente/sampling-plan.jsp
trunk/wao-web/src/main/webapp/WEB-INF/content/synthesis.jsp
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactTopiaDao.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactTopiaDao.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactTopiaDao.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -444,9 +444,9 @@
+ " left join fetch sr." + SampleRow.PROPERTY_COMPANY
+ " left join fetch sr." + SampleRow.PROPERTY_FISHING_ZONE
+ " left join fetch sr." + SampleRow.PROPERTY_PROFESSION
- + " left join fetch sr." + SampleRow.PROPERTY_D_CF5_CODE + " dcf"
- + " left outer join fetch dcf." + DCF5Code.PROPERTY_FISHING_GEAR_DCF
- + " left outer join fetch dcf." + DCF5Code.PROPERTY_TARGET_SPECIES_DCF
+ + " left join fetch sr." + SampleRow.PROPERTY_DCF5_CODE + " dcf"
+ + " left outer join fetch dcf." + Dcf5Code.PROPERTY_FISHING_GEAR_DCF
+ + " left outer join fetch dcf." + Dcf5Code.PROPERTY_TARGET_SPECIES_DCF
+ " left join fetch " + ALIAS + "." + Contact.PROPERTY_BOAT + " b"
+ " left join fetch b." + Boat.PROPERTY_DISTRICT
+ " left join fetch " + ALIAS + "." + Contact.PROPERTY_MAIN_OBSERVER
Deleted: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/DCF5CodeImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/DCF5CodeImpl.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/DCF5CodeImpl.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -1,70 +0,0 @@
-/*
- * #%L
- * Wao :: Business
- * %%
- * Copyright (C) 2009 - 2010 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.wao.entity;
-
-import com.google.common.base.Objects;
-
-public class DCF5CodeImpl extends DCF5CodeAbstract {
-
- @Override
- public String getFishingGearCode() {
- return getFishingGearDCF().getCode();
- }
-
- @Override
- public String getTargetSpeciesCode() {
- String code = null;
- if (getTargetSpeciesDCF() != null) {
- code = getTargetSpeciesDCF().getCode();
- }
- return code;
- }
-
- @Override
- public String getFishingGearDescription() {
- return getFishingGearDCF().getDescription();
- }
-
- @Override
- public String getTargetSpeciesDescription() {
- String description = null;
- if (getTargetSpeciesDCF() != null) {
- description = getTargetSpeciesDCF().getDescription();
- }
- return description;
- }
-
- @Override
- public String getCode() {
- String toString = getFishingGearCode();
- if (getTargetSpeciesDCF() != null) {
- toString += "_" + getTargetSpeciesCode();
- }
- return toString;
- }
-
- @Override
- public String toString() {
- String toString = Objects.toStringHelper(this).add("code", getCode()).toString();
- return toString;
- }
-
-}
Deleted: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/DCF5Codes.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/DCF5Codes.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/DCF5Codes.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -1,39 +0,0 @@
-package fr.ifremer.wao.entity;
-
-/*
- * #%L
- * Wao :: Persistence
- * %%
- * Copyright (C) 2009 - 2014 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-
-import com.google.common.base.Function;
-
-public class DCF5Codes {
-
- public static Function<DCF5Code, String> getCode() {
- return new GetCode();
- }
-
- protected static class GetCode implements Function<DCF5Code, String> {
-
- @Override
- public String apply(DCF5Code input) {
- return input.getCode();
- }
- }
-}
Copied: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Dcf5CodeImpl.java (from rev 2201, trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/DCF5CodeImpl.java)
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Dcf5CodeImpl.java (rev 0)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Dcf5CodeImpl.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -0,0 +1,70 @@
+/*
+ * #%L
+ * Wao :: Business
+ * %%
+ * Copyright (C) 2009 - 2010 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.wao.entity;
+
+import com.google.common.base.Objects;
+
+public class Dcf5CodeImpl extends Dcf5CodeAbstract {
+
+ @Override
+ public String getFishingGearCode() {
+ return getFishingGearDcf().getCode();
+ }
+
+ @Override
+ public String getTargetSpeciesCode() {
+ String code = null;
+ if (getTargetSpeciesDcf() != null) {
+ code = getTargetSpeciesDcf().getCode();
+ }
+ return code;
+ }
+
+ @Override
+ public String getFishingGearDescription() {
+ return getFishingGearDcf().getDescription();
+ }
+
+ @Override
+ public String getTargetSpeciesDescription() {
+ String description = null;
+ if (getTargetSpeciesDcf() != null) {
+ description = getTargetSpeciesDcf().getDescription();
+ }
+ return description;
+ }
+
+ @Override
+ public String getCode() {
+ String toString = getFishingGearCode();
+ if (getTargetSpeciesDcf() != null) {
+ toString += "_" + getTargetSpeciesCode();
+ }
+ return toString;
+ }
+
+ @Override
+ public String toString() {
+ String toString = Objects.toStringHelper(this).add("code", getCode()).toString();
+ return toString;
+ }
+
+}
Copied: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Dcf5Codes.java (from rev 2201, trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/DCF5Codes.java)
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Dcf5Codes.java (rev 0)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/Dcf5Codes.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -0,0 +1,39 @@
+package fr.ifremer.wao.entity;
+
+/*
+ * #%L
+ * Wao :: Persistence
+ * %%
+ * Copyright (C) 2009 - 2014 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+
+import com.google.common.base.Function;
+
+public class Dcf5Codes {
+
+ public static Function<Dcf5Code, String> getCode() {
+ return new GetCode();
+ }
+
+ protected static class GetCode implements Function<Dcf5Code, String> {
+
+ @Override
+ public String apply(Dcf5Code input) {
+ return input.getCode();
+ }
+ }
+}
Deleted: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/FishingGearDCFImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/FishingGearDCFImpl.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/FishingGearDCFImpl.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -1,132 +0,0 @@
-/*
- * #%L
- * Wao :: Business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2010 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.wao.entity;
-
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-
-import static org.nuiton.i18n.I18n.n;
-
-/**
- * @author bleny
- */
-public class FishingGearDCFImpl extends FishingGearDCFAbstract {
-
- static {
- //To detect all i18n keys
- n("fr.ifremer.wao.entity.FishingGearDCF.");
- n("fr.ifremer.wao.entity.FishingGearDCF.DRB");
- n("fr.ifremer.wao.entity.FishingGearDCF.DRH");
- n("fr.ifremer.wao.entity.FishingGearDCF.FAR");
- n("fr.ifremer.wao.entity.FishingGearDCF.FCN");
- n("fr.ifremer.wao.entity.FishingGearDCF.FG");
- n("fr.ifremer.wao.entity.FishingGearDCF.FIX");
- n("fr.ifremer.wao.entity.FishingGearDCF.FPN");
- n("fr.ifremer.wao.entity.FishingGearDCF.FPO");
- n("fr.ifremer.wao.entity.FishingGearDCF.FSN");
- n("fr.ifremer.wao.entity.FishingGearDCF.FWR");
- n("fr.ifremer.wao.entity.FishingGearDCF.FYK");
- n("fr.ifremer.wao.entity.FishingGearDCF.GEN");
- n("fr.ifremer.wao.entity.FishingGearDCF.GES");
- n("fr.ifremer.wao.entity.FishingGearDCF.GN");
- n("fr.ifremer.wao.entity.FishingGearDCF.GNC");
- n("fr.ifremer.wao.entity.FishingGearDCF.GND");
- n("fr.ifremer.wao.entity.FishingGearDCF.GNF");
- n("fr.ifremer.wao.entity.FishingGearDCF.GNS");
- n("fr.ifremer.wao.entity.FishingGearDCF.GT");
- n("fr.ifremer.wao.entity.FishingGearDCF.GTN");
- n("fr.ifremer.wao.entity.FishingGearDCF.GTR");
- n("fr.ifremer.wao.entity.FishingGearDCF.HAR");
- n("fr.ifremer.wao.entity.FishingGearDCF.HMD");
- n("fr.ifremer.wao.entity.FishingGearDCF.HMP");
- n("fr.ifremer.wao.entity.FishingGearDCF.HMX");
- n("fr.ifremer.wao.entity.FishingGearDCF.LA");
- n("fr.ifremer.wao.entity.FishingGearDCF.LHM");
- n("fr.ifremer.wao.entity.FishingGearDCF.LHP");
- n("fr.ifremer.wao.entity.FishingGearDCF.LL");
- n("fr.ifremer.wao.entity.FishingGearDCF.LLD");
- n("fr.ifremer.wao.entity.FishingGearDCF.LLS");
- n("fr.ifremer.wao.entity.FishingGearDCF.LN");
- n("fr.ifremer.wao.entity.FishingGearDCF.LNB");
- n("fr.ifremer.wao.entity.FishingGearDCF.LNP");
- n("fr.ifremer.wao.entity.FishingGearDCF.LNS");
- n("fr.ifremer.wao.entity.FishingGearDCF.LTL");
- n("fr.ifremer.wao.entity.FishingGearDCF.LX");
- n("fr.ifremer.wao.entity.FishingGearDCF.MIS");
- n("fr.ifremer.wao.entity.FishingGearDCF.NK");
- n("fr.ifremer.wao.entity.FishingGearDCF.OT");
- n("fr.ifremer.wao.entity.FishingGearDCF.OTB");
- n("fr.ifremer.wao.entity.FishingGearDCF.OTM");
- n("fr.ifremer.wao.entity.FishingGearDCF.OTT");
- n("fr.ifremer.wao.entity.FishingGearDCF.PS");
- n("fr.ifremer.wao.entity.FishingGearDCF.PS1");
- n("fr.ifremer.wao.entity.FishingGearDCF.PS2");
- n("fr.ifremer.wao.entity.FishingGearDCF.PT");
- n("fr.ifremer.wao.entity.FishingGearDCF.PTB");
- n("fr.ifremer.wao.entity.FishingGearDCF.PTM");
- n("fr.ifremer.wao.entity.FishingGearDCF.RG");
- n("fr.ifremer.wao.entity.FishingGearDCF.SB");
- n("fr.ifremer.wao.entity.FishingGearDCF.SDN");
- n("fr.ifremer.wao.entity.FishingGearDCF.SPR");
- n("fr.ifremer.wao.entity.FishingGearDCF.SSC");
- n("fr.ifremer.wao.entity.FishingGearDCF.SV");
- n("fr.ifremer.wao.entity.FishingGearDCF.SW");
- n("fr.ifremer.wao.entity.FishingGearDCF.TB");
- n("fr.ifremer.wao.entity.FishingGearDCF.TBB");
- n("fr.ifremer.wao.entity.FishingGearDCF.TBN");
- n("fr.ifremer.wao.entity.FishingGearDCF.TBS");
- n("fr.ifremer.wao.entity.FishingGearDCF.TM");
- n("fr.ifremer.wao.entity.FishingGearDCF.TMS");
- n("fr.ifremer.wao.entity.FishingGearDCF.TX");
- }
-
- public FishingGearDCFImpl() {
- super();
- }
-
- public FishingGearDCFImpl(String code) {
- super();
- setCode(code);
- }
-
- @Override
- public String getDescription() {
- // return WaoUtils._(FishingGearDCF.class.getName() + "." + getCode());
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String getFullDescription() {
- return String.format("%s (%s)", getCode(), getDescription());
- }
-
- @Override
- public String toString() {
- return ReflectionToStringBuilder.toString(this);
- }
-
- @Override
- public String getI18nKey() {
- return "fr.ifremer.wao.entity.FishingGearDCF." + getCode();
- }
-}
Copied: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/FishingGearDcfImpl.java (from rev 2201, trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/FishingGearDCFImpl.java)
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/FishingGearDcfImpl.java (rev 0)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/FishingGearDcfImpl.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -0,0 +1,132 @@
+/*
+ * #%L
+ * Wao :: Business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2010 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.wao.entity;
+
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+
+import static org.nuiton.i18n.I18n.n;
+
+/**
+ * @author bleny
+ */
+public class FishingGearDcfImpl extends FishingGearDcfAbstract {
+
+ static {
+ //To detect all i18n keys
+ n("fr.ifremer.wao.entity.FishingGearDcf.");
+ n("fr.ifremer.wao.entity.FishingGearDcf.DRB");
+ n("fr.ifremer.wao.entity.FishingGearDcf.DRH");
+ n("fr.ifremer.wao.entity.FishingGearDcf.FAR");
+ n("fr.ifremer.wao.entity.FishingGearDcf.FCN");
+ n("fr.ifremer.wao.entity.FishingGearDcf.FG");
+ n("fr.ifremer.wao.entity.FishingGearDcf.FIX");
+ n("fr.ifremer.wao.entity.FishingGearDcf.FPN");
+ n("fr.ifremer.wao.entity.FishingGearDcf.FPO");
+ n("fr.ifremer.wao.entity.FishingGearDcf.FSN");
+ n("fr.ifremer.wao.entity.FishingGearDcf.FWR");
+ n("fr.ifremer.wao.entity.FishingGearDcf.FYK");
+ n("fr.ifremer.wao.entity.FishingGearDcf.GEN");
+ n("fr.ifremer.wao.entity.FishingGearDcf.GES");
+ n("fr.ifremer.wao.entity.FishingGearDcf.GN");
+ n("fr.ifremer.wao.entity.FishingGearDcf.GNC");
+ n("fr.ifremer.wao.entity.FishingGearDcf.GND");
+ n("fr.ifremer.wao.entity.FishingGearDcf.GNF");
+ n("fr.ifremer.wao.entity.FishingGearDcf.GNS");
+ n("fr.ifremer.wao.entity.FishingGearDcf.GT");
+ n("fr.ifremer.wao.entity.FishingGearDcf.GTN");
+ n("fr.ifremer.wao.entity.FishingGearDcf.GTR");
+ n("fr.ifremer.wao.entity.FishingGearDcf.HAR");
+ n("fr.ifremer.wao.entity.FishingGearDcf.HMD");
+ n("fr.ifremer.wao.entity.FishingGearDcf.HMP");
+ n("fr.ifremer.wao.entity.FishingGearDcf.HMX");
+ n("fr.ifremer.wao.entity.FishingGearDcf.LA");
+ n("fr.ifremer.wao.entity.FishingGearDcf.LHM");
+ n("fr.ifremer.wao.entity.FishingGearDcf.LHP");
+ n("fr.ifremer.wao.entity.FishingGearDcf.LL");
+ n("fr.ifremer.wao.entity.FishingGearDcf.LLD");
+ n("fr.ifremer.wao.entity.FishingGearDcf.LLS");
+ n("fr.ifremer.wao.entity.FishingGearDcf.LN");
+ n("fr.ifremer.wao.entity.FishingGearDcf.LNB");
+ n("fr.ifremer.wao.entity.FishingGearDcf.LNP");
+ n("fr.ifremer.wao.entity.FishingGearDcf.LNS");
+ n("fr.ifremer.wao.entity.FishingGearDcf.LTL");
+ n("fr.ifremer.wao.entity.FishingGearDcf.LX");
+ n("fr.ifremer.wao.entity.FishingGearDcf.MIS");
+ n("fr.ifremer.wao.entity.FishingGearDcf.NK");
+ n("fr.ifremer.wao.entity.FishingGearDcf.OT");
+ n("fr.ifremer.wao.entity.FishingGearDcf.OTB");
+ n("fr.ifremer.wao.entity.FishingGearDcf.OTM");
+ n("fr.ifremer.wao.entity.FishingGearDcf.OTT");
+ n("fr.ifremer.wao.entity.FishingGearDcf.PS");
+ n("fr.ifremer.wao.entity.FishingGearDcf.PS1");
+ n("fr.ifremer.wao.entity.FishingGearDcf.PS2");
+ n("fr.ifremer.wao.entity.FishingGearDcf.PT");
+ n("fr.ifremer.wao.entity.FishingGearDcf.PTB");
+ n("fr.ifremer.wao.entity.FishingGearDcf.PTM");
+ n("fr.ifremer.wao.entity.FishingGearDcf.RG");
+ n("fr.ifremer.wao.entity.FishingGearDcf.SB");
+ n("fr.ifremer.wao.entity.FishingGearDcf.SDN");
+ n("fr.ifremer.wao.entity.FishingGearDcf.SPR");
+ n("fr.ifremer.wao.entity.FishingGearDcf.SSC");
+ n("fr.ifremer.wao.entity.FishingGearDcf.SV");
+ n("fr.ifremer.wao.entity.FishingGearDcf.SW");
+ n("fr.ifremer.wao.entity.FishingGearDcf.TB");
+ n("fr.ifremer.wao.entity.FishingGearDcf.TBB");
+ n("fr.ifremer.wao.entity.FishingGearDcf.TBN");
+ n("fr.ifremer.wao.entity.FishingGearDcf.TBS");
+ n("fr.ifremer.wao.entity.FishingGearDcf.TM");
+ n("fr.ifremer.wao.entity.FishingGearDcf.TMS");
+ n("fr.ifremer.wao.entity.FishingGearDcf.TX");
+ }
+
+ public FishingGearDcfImpl() {
+ super();
+ }
+
+ public FishingGearDcfImpl(String code) {
+ super();
+ setCode(code);
+ }
+
+ @Override
+ public String getDescription() {
+ // return WaoUtils._(FishingGearDcf.class.getName() + "." + getCode());
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public String getFullDescription() {
+ return String.format("%s (%s)", getCode(), getDescription());
+ }
+
+ @Override
+ public String toString() {
+ return ReflectionToStringBuilder.toString(this);
+ }
+
+ @Override
+ public String getI18nKey() {
+ return "fr.ifremer.wao.entity.FishingGearDcf." + getCode();
+ }
+}
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -29,7 +29,6 @@
import org.apache.commons.lang3.StringUtils;
import java.util.Date;
-import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
@@ -147,14 +146,14 @@
@Override
public String getProfessionDescription() {
- String code = isdCF5CodeEmpty() ? "" :
- StringUtils.join(Iterables.transform(getdCF5Code(), DCF5Codes.getCode()), ", ");
- code += getProfessionDescriptionWithoutDCF5();
+ String code = isDcf5CodeEmpty() ? "" :
+ StringUtils.join(Iterables.transform(getDcf5Code(), Dcf5Codes.getCode()), ", ");
+ code += getProfessionDescriptionWithoutDcf5();
return code;
}
@Override
- public String getProfessionDescriptionWithoutDCF5() {
+ public String getProfessionDescriptionWithoutDcf5() {
String code = "";
if (getProfession() != null) {
if (!StringUtils.isEmpty(getProfession().getMeshSize())) {
@@ -171,28 +170,6 @@
}
@Override
- public void setDCF5Code(String codes, String separatorRegex) {
- if (StringUtils.isBlank(codes)) {
- setdCF5Code(null);
- } else {
- String[] splitCodes = codes.split(separatorRegex);
- Set<DCF5Code> dcfFives = new HashSet<>(splitCodes.length);
- for (String code : splitCodes) {
- String[] codeParts = code.split("_");
- DCF5Code dcfFive = new DCF5CodeImpl();
-
- dcfFive.setFishingGearDCF(new FishingGearDCFImpl(codeParts[0]));
- if (codeParts.length == 2) {
- dcfFive.setTargetSpeciesDCF(new TargetSpeciesDCFImpl(codeParts[1]));
- }
-
- dcfFives.add(dcfFive);
- }
- setdCF5Code(dcfFives);
- }
- }
-
- @Override
public void setTerrestrialLocation(TerrestrialLocation terrestrialLocation) {
clearTerrestrialLocations();
addTerrestrialLocations(terrestrialLocation);
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowTopiaDao.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowTopiaDao.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowTopiaDao.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -24,7 +24,6 @@
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableMap;
import fr.ifremer.wao.SampleRowsFilter;
-import fr.ifremer.wao.WaoUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.commons.logging.Log;
@@ -128,13 +127,13 @@
if (CollectionUtils.isNotEmpty(filter.getFishingGearDcfIds())) {
query.addWhereClause(
- "sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.fishingGearDCF.topiaId in (:fishingGearDcfIds))",
+ "sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dcf5Code as dcf where dcf.fishingGearDcf.topiaId in (:fishingGearDcfIds))",
ImmutableMap.of("fishingGearDcfIds", (Object) filter.getFishingGearDcfIds()));
}
if (CollectionUtils.isNotEmpty(filter.getTargetSpeciesDcfIds())) {
query.addWhereClause(
- "sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.targetSpeciesDCF.topiaId in (:targetSpeciesDcfIds))",
+ "sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dcf5Code as dcf where dcf.targetSpeciesDcf.topiaId in (:targetSpeciesDcfIds))",
ImmutableMap.of("targetSpeciesDcfIds", (Object) filter.getTargetSpeciesDcfIds()));
}
@@ -147,7 +146,7 @@
}
public void detach(SampleRow sampleRow) {
- sampleRow.sizedCF5Code();
+ sampleRow.sizeDcf5Code();
sampleRow.sizeElligibleBoat();
sampleRow.sizeFishingZone();
sampleRow.sizeSampleMonth();
Deleted: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TargetSpeciesDCFImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TargetSpeciesDCFImpl.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TargetSpeciesDCFImpl.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -1,85 +0,0 @@
-/*
- * #%L
- * Wao :: Business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2010 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.wao.entity;
-
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-
-import static org.nuiton.i18n.I18n.n;
-
-/**
- * @author bleny
- */
-public class TargetSpeciesDCFImpl extends TargetSpeciesDCFAbstract {
-
- {
- //To detect all i18n keys
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.");
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.ALG");
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.ANA");
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.CAT");
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.CEP");
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.CRU");
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.CRW");
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.CSJ");
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.DEF");
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.DWS");
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.FIF");
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.FIN");
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.LPF");
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.MOL");
- n("fr.ifremer.wao.entity.TargetSpeciesDCF.SPF");
- n("fr.ifremer.wao.entity.TerrestrialDivision");
- n("fr.ifremer.wao.entity.TerrestrialLocation");
- }
-
- public TargetSpeciesDCFImpl() {
- super();
- }
-
- public TargetSpeciesDCFImpl(String code) {
- super();
- setCode(code);
- }
-
- @Override
- public String getDescription() {
- // return WaoUtils._(TargetSpeciesDCF.class.getName() + "." + getCode());
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String getFullDescription() {
- return String.format("%s (%s)", getCode(), getDescription());
- }
-
- @Override
- public String toString() {
- return ReflectionToStringBuilder.toString(this);
- }
-
- @Override
- public String getI18nKey() {
- return "fr.ifremer.wao.entity.TargetSpeciesDCF." + getCode();
- }
-}
Copied: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TargetSpeciesDcfImpl.java (from rev 2201, trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TargetSpeciesDCFImpl.java)
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TargetSpeciesDcfImpl.java (rev 0)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TargetSpeciesDcfImpl.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -0,0 +1,85 @@
+/*
+ * #%L
+ * Wao :: Business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2010 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.wao.entity;
+
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+
+import static org.nuiton.i18n.I18n.n;
+
+/**
+ * @author bleny
+ */
+public class TargetSpeciesDcfImpl extends TargetSpeciesDcfAbstract {
+
+ {
+ //To detect all i18n keys
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.");
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.ALG");
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.ANA");
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.CAT");
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.CEP");
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.CRU");
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.CRW");
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.CSJ");
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.DEF");
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.DWS");
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.FIF");
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.FIN");
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.LPF");
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.MOL");
+ n("fr.ifremer.wao.entity.TargetSpeciesDcf.SPF");
+ n("fr.ifremer.wao.entity.TerrestrialDivision");
+ n("fr.ifremer.wao.entity.TerrestrialLocation");
+ }
+
+ public TargetSpeciesDcfImpl() {
+ super();
+ }
+
+ public TargetSpeciesDcfImpl(String code) {
+ super();
+ setCode(code);
+ }
+
+ @Override
+ public String getDescription() {
+ // return WaoUtils._(TargetSpeciesDcf.class.getName() + "." + getCode());
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public String getFullDescription() {
+ return String.format("%s (%s)", getCode(), getDescription());
+ }
+
+ @Override
+ public String toString() {
+ return ReflectionToStringBuilder.toString(this);
+ }
+
+ @Override
+ public String getI18nKey() {
+ return "fr.ifremer.wao.entity.TargetSpeciesDcf." + getCode();
+ }
+}
Modified: trunk/wao-persistence/src/main/resources/db/migration/V4_0__clean_database.sql
===================================================================
--- trunk/wao-persistence/src/main/resources/db/migration/V4_0__clean_database.sql 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-persistence/src/main/resources/db/migration/V4_0__clean_database.sql 2014-08-06 15:49:06 UTC (rev 2202)
@@ -53,9 +53,9 @@
-- Erreur de l'unicité dans le référentiel des codes DCF
-update dcf5code_sampleRow set dcf5code='fr.ifremer.wao.entities.DCF5Code#1289320029000#798260963OTB' where dcf5code='fr.ifremer.wao.entities.DCF5Code#1289320029000#798260963OTBDES';
+update dcf5code_sampleRow set dcf5code='fr.ifremer.wao.entities.Dcf5Code#1289320029000#798260963OTB' where dcf5code='fr.ifremer.wao.entities.Dcf5Code#1289320029000#798260963OTBDES';
-delete from dcf5code where topiaId='fr.ifremer.wao.entities.DCF5Code#1289320029000#798260963OTBDES';
+delete from dcf5code where topiaId='fr.ifremer.wao.entities.Dcf5Code#1289320029000#798260963OTBDES';
-- Erreur de l'unicité dans le référentiel des codes DCF
Modified: trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties
===================================================================
--- trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties 2014-08-06 15:49:06 UTC (rev 2202)
@@ -53,87 +53,87 @@
fr.ifremer.wao.entity.Boat=Boats
fr.ifremer.wao.entity.BoatGroup=Boat groups
fr.ifremer.wao.entity.ContactStateMotif=Refusal movites
-fr.ifremer.wao.entity.FishingGearDCF.=Not specified
-fr.ifremer.wao.entity.FishingGearDCF.DRB=Boat dredges
-fr.ifremer.wao.entity.FishingGearDCF.DRH=Hand dredges
-fr.ifremer.wao.entity.FishingGearDCF.FAR=Aerial traps
-fr.ifremer.wao.entity.FishingGearDCF.FCN=Cast nets
-fr.ifremer.wao.entity.FishingGearDCF.FG=Falling gear (not specified)
-fr.ifremer.wao.entity.FishingGearDCF.FIX=Traps (not specified)
-fr.ifremer.wao.entity.FishingGearDCF.FPN=Stationary uncovered pound nets
-fr.ifremer.wao.entity.FishingGearDCF.FPO=Pots
-fr.ifremer.wao.entity.FishingGearDCF.FSN=Stow nets
-fr.ifremer.wao.entity.FishingGearDCF.FWR=Barriers, fences, weirs, etc.
-fr.ifremer.wao.entity.FishingGearDCF.FYK=Fyke nets
-fr.ifremer.wao.entity.FishingGearDCF.GEN=Gillnets and entangling nets (not specified)
-fr.ifremer.wao.entity.FishingGearDCF.GES=
-fr.ifremer.wao.entity.FishingGearDCF.GN=Gillnets (not specified)
-fr.ifremer.wao.entity.FishingGearDCF.GNC=Encircling gillnets
-fr.ifremer.wao.entity.FishingGearDCF.GND=Driftnets
-fr.ifremer.wao.entity.FishingGearDCF.GNF=Fixed gillnets
-fr.ifremer.wao.entity.FishingGearDCF.GNS=Set gillnets (anchored)
-fr.ifremer.wao.entity.FishingGearDCF.GT=Gillnetters
-fr.ifremer.wao.entity.FishingGearDCF.GTN=Combined gillnets-trammel nets
-fr.ifremer.wao.entity.FishingGearDCF.GTR=Trammel nets
-fr.ifremer.wao.entity.FishingGearDCF.HAR=Harpoons
-fr.ifremer.wao.entity.FishingGearDCF.HMD=Mechanized dredges
-fr.ifremer.wao.entity.FishingGearDCF.HMP=Pumps
-fr.ifremer.wao.entity.FishingGearDCF.HMX=Harvesting machines (not specified)
-fr.ifremer.wao.entity.FishingGearDCF.LA=Wihtout purse lines (lampara)
-fr.ifremer.wao.entity.FishingGearDCF.LHM=Handlines and pole-lines (mechanized)
-fr.ifremer.wao.entity.FishingGearDCF.LHP=Handlines and pole-lines (hand-operated)
-fr.ifremer.wao.entity.FishingGearDCF.LL=Longlines (not specified)
-fr.ifremer.wao.entity.FishingGearDCF.LLD=Drifting longlines
-fr.ifremer.wao.entity.FishingGearDCF.LLS=Set longlines
-fr.ifremer.wao.entity.FishingGearDCF.LN=Lift nets (not specified)
-fr.ifremer.wao.entity.FishingGearDCF.LNB=Boat-operated lift nets
-fr.ifremer.wao.entity.FishingGearDCF.LNP=Portable lift nets
-fr.ifremer.wao.entity.FishingGearDCF.LNS=Shore-operated stationary lift nets
-fr.ifremer.wao.entity.FishingGearDCF.LTL=Trolling lines
-fr.ifremer.wao.entity.FishingGearDCF.LX=Hooks and lines (not specified)
-fr.ifremer.wao.entity.FishingGearDCF.MIS=Miscellaneous
-fr.ifremer.wao.entity.FishingGearDCF.NK=Gear not know or not specified
-fr.ifremer.wao.entity.FishingGearDCF.OT=Otter trawls (not specified)
-fr.ifremer.wao.entity.FishingGearDCF.OTB=Otter trawls
-fr.ifremer.wao.entity.FishingGearDCF.OTM=Otter trawls
-fr.ifremer.wao.entity.FishingGearDCF.OTT=Other twin trawls
-fr.ifremer.wao.entity.FishingGearDCF.PS=With purse lines (purse seines)
-fr.ifremer.wao.entity.FishingGearDCF.PS1=One boat operated purse seines
-fr.ifremer.wao.entity.FishingGearDCF.PS2=Tow boats operated purse seines
-fr.ifremer.wao.entity.FishingGearDCF.PT=Pair trawls (not specified)
-fr.ifremer.wao.entity.FishingGearDCF.PTB=Pair trawls
-fr.ifremer.wao.entity.FishingGearDCF.PTM=Pair trawls
-fr.ifremer.wao.entity.FishingGearDCF.RG=Recreational fishing gear
-fr.ifremer.wao.entity.FishingGearDCF.SB=Beach seines
-fr.ifremer.wao.entity.FishingGearDCF.SDN=Danish seines
-fr.ifremer.wao.entity.FishingGearDCF.SPR=Pair seines
-fr.ifremer.wao.entity.FishingGearDCF.SSC=Scottish seines
-fr.ifremer.wao.entity.FishingGearDCF.SV=Boat or vessel seines
-fr.ifremer.wao.entity.FishingGearDCF.SW=Seine nets (not specified)
-fr.ifremer.wao.entity.FishingGearDCF.TB=Bottom trawls (not specified)
-fr.ifremer.wao.entity.FishingGearDCF.TBB=Beam trawls
-fr.ifremer.wao.entity.FishingGearDCF.TBN=Nephrops trawls
-fr.ifremer.wao.entity.FishingGearDCF.TBS=Shrimp trawls
-fr.ifremer.wao.entity.FishingGearDCF.TM=Midwater trawls (not specified)
-fr.ifremer.wao.entity.FishingGearDCF.TMS=Shrimp trawls
-fr.ifremer.wao.entity.FishingGearDCF.TX=Other trawls (not specified)
+fr.ifremer.wao.entity.FishingGearDcf.=Not specified
+fr.ifremer.wao.entity.FishingGearDcf.DRB=Boat dredges
+fr.ifremer.wao.entity.FishingGearDcf.DRH=Hand dredges
+fr.ifremer.wao.entity.FishingGearDcf.FAR=Aerial traps
+fr.ifremer.wao.entity.FishingGearDcf.FCN=Cast nets
+fr.ifremer.wao.entity.FishingGearDcf.FG=Falling gear (not specified)
+fr.ifremer.wao.entity.FishingGearDcf.FIX=Traps (not specified)
+fr.ifremer.wao.entity.FishingGearDcf.FPN=Stationary uncovered pound nets
+fr.ifremer.wao.entity.FishingGearDcf.FPO=Pots
+fr.ifremer.wao.entity.FishingGearDcf.FSN=Stow nets
+fr.ifremer.wao.entity.FishingGearDcf.FWR=Barriers, fences, weirs, etc.
+fr.ifremer.wao.entity.FishingGearDcf.FYK=Fyke nets
+fr.ifremer.wao.entity.FishingGearDcf.GEN=Gillnets and entangling nets (not specified)
+fr.ifremer.wao.entity.FishingGearDcf.GES=
+fr.ifremer.wao.entity.FishingGearDcf.GN=Gillnets (not specified)
+fr.ifremer.wao.entity.FishingGearDcf.GNC=Encircling gillnets
+fr.ifremer.wao.entity.FishingGearDcf.GND=Driftnets
+fr.ifremer.wao.entity.FishingGearDcf.GNF=Fixed gillnets
+fr.ifremer.wao.entity.FishingGearDcf.GNS=Set gillnets (anchored)
+fr.ifremer.wao.entity.FishingGearDcf.GT=Gillnetters
+fr.ifremer.wao.entity.FishingGearDcf.GTN=Combined gillnets-trammel nets
+fr.ifremer.wao.entity.FishingGearDcf.GTR=Trammel nets
+fr.ifremer.wao.entity.FishingGearDcf.HAR=Harpoons
+fr.ifremer.wao.entity.FishingGearDcf.HMD=Mechanized dredges
+fr.ifremer.wao.entity.FishingGearDcf.HMP=Pumps
+fr.ifremer.wao.entity.FishingGearDcf.HMX=Harvesting machines (not specified)
+fr.ifremer.wao.entity.FishingGearDcf.LA=Wihtout purse lines (lampara)
+fr.ifremer.wao.entity.FishingGearDcf.LHM=Handlines and pole-lines (mechanized)
+fr.ifremer.wao.entity.FishingGearDcf.LHP=Handlines and pole-lines (hand-operated)
+fr.ifremer.wao.entity.FishingGearDcf.LL=Longlines (not specified)
+fr.ifremer.wao.entity.FishingGearDcf.LLD=Drifting longlines
+fr.ifremer.wao.entity.FishingGearDcf.LLS=Set longlines
+fr.ifremer.wao.entity.FishingGearDcf.LN=Lift nets (not specified)
+fr.ifremer.wao.entity.FishingGearDcf.LNB=Boat-operated lift nets
+fr.ifremer.wao.entity.FishingGearDcf.LNP=Portable lift nets
+fr.ifremer.wao.entity.FishingGearDcf.LNS=Shore-operated stationary lift nets
+fr.ifremer.wao.entity.FishingGearDcf.LTL=Trolling lines
+fr.ifremer.wao.entity.FishingGearDcf.LX=Hooks and lines (not specified)
+fr.ifremer.wao.entity.FishingGearDcf.MIS=Miscellaneous
+fr.ifremer.wao.entity.FishingGearDcf.NK=Gear not know or not specified
+fr.ifremer.wao.entity.FishingGearDcf.OT=Otter trawls (not specified)
+fr.ifremer.wao.entity.FishingGearDcf.OTB=Otter trawls
+fr.ifremer.wao.entity.FishingGearDcf.OTM=Otter trawls
+fr.ifremer.wao.entity.FishingGearDcf.OTT=Other twin trawls
+fr.ifremer.wao.entity.FishingGearDcf.PS=With purse lines (purse seines)
+fr.ifremer.wao.entity.FishingGearDcf.PS1=One boat operated purse seines
+fr.ifremer.wao.entity.FishingGearDcf.PS2=Tow boats operated purse seines
+fr.ifremer.wao.entity.FishingGearDcf.PT=Pair trawls (not specified)
+fr.ifremer.wao.entity.FishingGearDcf.PTB=Pair trawls
+fr.ifremer.wao.entity.FishingGearDcf.PTM=Pair trawls
+fr.ifremer.wao.entity.FishingGearDcf.RG=Recreational fishing gear
+fr.ifremer.wao.entity.FishingGearDcf.SB=Beach seines
+fr.ifremer.wao.entity.FishingGearDcf.SDN=Danish seines
+fr.ifremer.wao.entity.FishingGearDcf.SPR=Pair seines
+fr.ifremer.wao.entity.FishingGearDcf.SSC=Scottish seines
+fr.ifremer.wao.entity.FishingGearDcf.SV=Boat or vessel seines
+fr.ifremer.wao.entity.FishingGearDcf.SW=Seine nets (not specified)
+fr.ifremer.wao.entity.FishingGearDcf.TB=Bottom trawls (not specified)
+fr.ifremer.wao.entity.FishingGearDcf.TBB=Beam trawls
+fr.ifremer.wao.entity.FishingGearDcf.TBN=Nephrops trawls
+fr.ifremer.wao.entity.FishingGearDcf.TBS=Shrimp trawls
+fr.ifremer.wao.entity.FishingGearDcf.TM=Midwater trawls (not specified)
+fr.ifremer.wao.entity.FishingGearDcf.TMS=Shrimp trawls
+fr.ifremer.wao.entity.FishingGearDcf.TX=Other trawls (not specified)
fr.ifremer.wao.entity.FishingZone=Fishing zones
-fr.ifremer.wao.entity.TargetSpeciesDCF.=Not specified
-fr.ifremer.wao.entity.TargetSpeciesDCF.ALG=Algae
-fr.ifremer.wao.entity.TargetSpeciesDCF.ANA=Espèces anadromes
-fr.ifremer.wao.entity.TargetSpeciesDCF.CAT=Catadromous species
-fr.ifremer.wao.entity.TargetSpeciesDCF.CEP=Cephalopods
-fr.ifremer.wao.entity.TargetSpeciesDCF.CRU=Crustacean
-fr.ifremer.wao.entity.TargetSpeciesDCF.CRW=Langouste
-fr.ifremer.wao.entity.TargetSpeciesDCF.CSJ=Scallop
-fr.ifremer.wao.entity.TargetSpeciesDCF.DEF=Demersal species
-fr.ifremer.wao.entity.TargetSpeciesDCF.DWS=Deep water species
-fr.ifremer.wao.entity.TargetSpeciesDCF.FIF=Finfish
-fr.ifremer.wao.entity.TargetSpeciesDCF.FIN=Flatfishes
-fr.ifremer.wao.entity.TargetSpeciesDCF.LP=Tall pelagic
-fr.ifremer.wao.entity.TargetSpeciesDCF.LPF=Tall pelagic
-fr.ifremer.wao.entity.TargetSpeciesDCF.MOL=Molluscs
-fr.ifremer.wao.entity.TargetSpeciesDCF.SPF=Small pelagic
+fr.ifremer.wao.entity.TargetSpeciesDcf.=Not specified
+fr.ifremer.wao.entity.TargetSpeciesDcf.ALG=Algae
+fr.ifremer.wao.entity.TargetSpeciesDcf.ANA=Espèces anadromes
+fr.ifremer.wao.entity.TargetSpeciesDcf.CAT=Catadromous species
+fr.ifremer.wao.entity.TargetSpeciesDcf.CEP=Cephalopods
+fr.ifremer.wao.entity.TargetSpeciesDcf.CRU=Crustacean
+fr.ifremer.wao.entity.TargetSpeciesDcf.CRW=Langouste
+fr.ifremer.wao.entity.TargetSpeciesDcf.CSJ=Scallop
+fr.ifremer.wao.entity.TargetSpeciesDcf.DEF=Demersal species
+fr.ifremer.wao.entity.TargetSpeciesDcf.DWS=Deep water species
+fr.ifremer.wao.entity.TargetSpeciesDcf.FIF=Finfish
+fr.ifremer.wao.entity.TargetSpeciesDcf.FIN=Flatfishes
+fr.ifremer.wao.entity.TargetSpeciesDcf.LP=Tall pelagic
+fr.ifremer.wao.entity.TargetSpeciesDcf.LPF=Tall pelagic
+fr.ifremer.wao.entity.TargetSpeciesDcf.MOL=Molluscs
+fr.ifremer.wao.entity.TargetSpeciesDcf.SPF=Small pelagic
fr.ifremer.wao.entity.TerrestrialDivision=Terrestrial divisions
fr.ifremer.wao.entity.TerrestrialLocation=Terrestrial locations
wao.business.other=
Modified: trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties
===================================================================
--- trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties 2014-08-06 15:49:06 UTC (rev 2202)
@@ -53,86 +53,86 @@
fr.ifremer.wao.entity.Boat=Navires
fr.ifremer.wao.entity.BoatGroup=Stratification des navires
fr.ifremer.wao.entity.ContactStateMotif=Motifs de refus
-fr.ifremer.wao.entity.FishingGearDCF.=Non spécifié
-fr.ifremer.wao.entity.FishingGearDCF.DRB=Dragues remorquées par bateau
-fr.ifremer.wao.entity.FishingGearDCF.DRH=Dragues à main
-fr.ifremer.wao.entity.FishingGearDCF.FAR=Pièges aériens
-fr.ifremer.wao.entity.FishingGearDCF.FCN=Éperviers
-fr.ifremer.wao.entity.FishingGearDCF.FG=Autres engins retombants (non-spécifiés)
-fr.ifremer.wao.entity.FishingGearDCF.FIX=Pièges (non-spécifiés)
-fr.ifremer.wao.entity.FishingGearDCF.FPN=Filets-pièges fixes non couverts
-fr.ifremer.wao.entity.FishingGearDCF.FPO=Nasses (casiers)
-fr.ifremer.wao.entity.FishingGearDCF.FSN=Filets à l'étalage (diables)
-fr.ifremer.wao.entity.FishingGearDCF.FWR=Barrages, parcs, bordigues, etc.
-fr.ifremer.wao.entity.FishingGearDCF.FYK=Verveux
-fr.ifremer.wao.entity.FishingGearDCF.GEN=Filets maillants et filets emmélants (non spécifiés)
-fr.ifremer.wao.entity.FishingGearDCF.GES=Tamis à civelles
-fr.ifremer.wao.entity.FishingGearDCF.GN=Filets maillants (non spécifiés)
-fr.ifremer.wao.entity.FishingGearDCF.GNC=Filets maillants encerclants
-fr.ifremer.wao.entity.FishingGearDCF.GND=Filets maillants dérivants (filets dérivants)
-fr.ifremer.wao.entity.FishingGearDCF.GNF=Filets maillants fixes (sur perches)
-fr.ifremer.wao.entity.FishingGearDCF.GNS=Filets maillants calés (ancrés)
-fr.ifremer.wao.entity.FishingGearDCF.GT=Trémailleurs
-fr.ifremer.wao.entity.FishingGearDCF.GTN=Trémails et filets maillants combinés
-fr.ifremer.wao.entity.FishingGearDCF.GTR=Trémails
-fr.ifremer.wao.entity.FishingGearDCF.HAR=Harpons
-fr.ifremer.wao.entity.FishingGearDCF.HMD=Dragues mécanisées
-fr.ifremer.wao.entity.FishingGearDCF.HMP=Pompes
-fr.ifremer.wao.entity.FishingGearDCF.HMX=Engins de récolte (non spécifiés)
-fr.ifremer.wao.entity.FishingGearDCF.LA=Filets tournants sans coulisse (filet lamparo)
-fr.ifremer.wao.entity.FishingGearDCF.LHM=Lignes à main et lignes avec cannes (mécanisées)
-fr.ifremer.wao.entity.FishingGearDCF.LHP=Lignes à main et lignes à cannes (manœuvrées à la main)
-fr.ifremer.wao.entity.FishingGearDCF.LL=Palangres (non spécifiées)
-fr.ifremer.wao.entity.FishingGearDCF.LLD=Palangres dérivantes
-fr.ifremer.wao.entity.FishingGearDCF.LLS=Palangres calées ou semi-flottantes
-fr.ifremer.wao.entity.FishingGearDCF.LN=Filets soulevés (non spécifiés)
-fr.ifremer.wao.entity.FishingGearDCF.LNB=Filets soulevés manœuvrées du bateau
-fr.ifremer.wao.entity.FishingGearDCF.LNP=Filets soulevés portatifs
-fr.ifremer.wao.entity.FishingGearDCF.LNS=Filets soulevés fixes manœuvrées du rivage
-fr.ifremer.wao.entity.FishingGearDCF.LTL=lignes de traîne
-fr.ifremer.wao.entity.FishingGearDCF.LX=Lignes et palangres
-fr.ifremer.wao.entity.FishingGearDCF.MIS=Divers
-fr.ifremer.wao.entity.FishingGearDCF.NK=Engins inconnus ou non spécifiés
-fr.ifremer.wao.entity.FishingGearDCF.OT=Chaluts à panneaux (non spécifié)
-fr.ifremer.wao.entity.FishingGearDCF.OTB=Chalut de fond à panneaux
-fr.ifremer.wao.entity.FishingGearDCF.OTM=Chaluts pélagiques à panneaux
-fr.ifremer.wao.entity.FishingGearDCF.OTT=Chaluts jumeaux à panneaux
-fr.ifremer.wao.entity.FishingGearDCF.PS=Filets tournants avec coulisse (sennes coulissantes)
-fr.ifremer.wao.entity.FishingGearDCF.PS1=Filets tournants, sennes coulissantes manœuvrées par un bateau
-fr.ifremer.wao.entity.FishingGearDCF.PS2=Filets tournants, sennes coulissantes manœuvrées par deux bateaux
-fr.ifremer.wao.entity.FishingGearDCF.PT=Chalut-bœufs (non spécifié)
-fr.ifremer.wao.entity.FishingGearDCF.PTB=Chalut-bœufs de fond
-fr.ifremer.wao.entity.FishingGearDCF.PTM=Chalut-bœufs pélagiques
-fr.ifremer.wao.entity.FishingGearDCF.RG=Engins de pêche révréative
-fr.ifremer.wao.entity.FishingGearDCF.SB=Sennes de plages
-fr.ifremer.wao.entity.FishingGearDCF.SDN=Sennes danoises
-fr.ifremer.wao.entity.FishingGearDCF.SPR=Sennes manœuvrées par deux bateaux
-fr.ifremer.wao.entity.FishingGearDCF.SSC=Sennes écossaises
-fr.ifremer.wao.entity.FishingGearDCF.SV=Sennes halées à bord
-fr.ifremer.wao.entity.FishingGearDCF.SW=Sennes (non spécifiées)
-fr.ifremer.wao.entity.FishingGearDCF.TB=Chalut de fond (non spécifié)
-fr.ifremer.wao.entity.FishingGearDCF.TBB=Chaluts à perche
-fr.ifremer.wao.entity.FishingGearDCF.TBN=Chalut à langoustines
-fr.ifremer.wao.entity.FishingGearDCF.TBS=Chalut à crevettes
-fr.ifremer.wao.entity.FishingGearDCF.TM=Chalut pélagique (non spécifié)
-fr.ifremer.wao.entity.FishingGearDCF.TMS=Chalut pélagique à crevettes
-fr.ifremer.wao.entity.FishingGearDCF.TX=Autre chalut (non spécifié)
+fr.ifremer.wao.entity.FishingGearDcf.=Non spécifié
+fr.ifremer.wao.entity.FishingGearDcf.DRB=Dragues remorquées par bateau
+fr.ifremer.wao.entity.FishingGearDcf.DRH=Dragues à main
+fr.ifremer.wao.entity.FishingGearDcf.FAR=Pièges aériens
+fr.ifremer.wao.entity.FishingGearDcf.FCN=Éperviers
+fr.ifremer.wao.entity.FishingGearDcf.FG=Autres engins retombants (non-spécifiés)
+fr.ifremer.wao.entity.FishingGearDcf.FIX=Pièges (non-spécifiés)
+fr.ifremer.wao.entity.FishingGearDcf.FPN=Filets-pièges fixes non couverts
+fr.ifremer.wao.entity.FishingGearDcf.FPO=Nasses (casiers)
+fr.ifremer.wao.entity.FishingGearDcf.FSN=Filets à l'étalage (diables)
+fr.ifremer.wao.entity.FishingGearDcf.FWR=Barrages, parcs, bordigues, etc.
+fr.ifremer.wao.entity.FishingGearDcf.FYK=Verveux
+fr.ifremer.wao.entity.FishingGearDcf.GEN=Filets maillants et filets emmélants (non spécifiés)
+fr.ifremer.wao.entity.FishingGearDcf.GES=Tamis à civelles
+fr.ifremer.wao.entity.FishingGearDcf.GN=Filets maillants (non spécifiés)
+fr.ifremer.wao.entity.FishingGearDcf.GNC=Filets maillants encerclants
+fr.ifremer.wao.entity.FishingGearDcf.GND=Filets maillants dérivants (filets dérivants)
+fr.ifremer.wao.entity.FishingGearDcf.GNF=Filets maillants fixes (sur perches)
+fr.ifremer.wao.entity.FishingGearDcf.GNS=Filets maillants calés (ancrés)
+fr.ifremer.wao.entity.FishingGearDcf.GT=Trémailleurs
+fr.ifremer.wao.entity.FishingGearDcf.GTN=Trémails et filets maillants combinés
+fr.ifremer.wao.entity.FishingGearDcf.GTR=Trémails
+fr.ifremer.wao.entity.FishingGearDcf.HAR=Harpons
+fr.ifremer.wao.entity.FishingGearDcf.HMD=Dragues mécanisées
+fr.ifremer.wao.entity.FishingGearDcf.HMP=Pompes
+fr.ifremer.wao.entity.FishingGearDcf.HMX=Engins de récolte (non spécifiés)
+fr.ifremer.wao.entity.FishingGearDcf.LA=Filets tournants sans coulisse (filet lamparo)
+fr.ifremer.wao.entity.FishingGearDcf.LHM=Lignes à main et lignes avec cannes (mécanisées)
+fr.ifremer.wao.entity.FishingGearDcf.LHP=Lignes à main et lignes à cannes (manœuvrées à la main)
+fr.ifremer.wao.entity.FishingGearDcf.LL=Palangres (non spécifiées)
+fr.ifremer.wao.entity.FishingGearDcf.LLD=Palangres dérivantes
+fr.ifremer.wao.entity.FishingGearDcf.LLS=Palangres calées ou semi-flottantes
+fr.ifremer.wao.entity.FishingGearDcf.LN=Filets soulevés (non spécifiés)
+fr.ifremer.wao.entity.FishingGearDcf.LNB=Filets soulevés manœuvrées du bateau
+fr.ifremer.wao.entity.FishingGearDcf.LNP=Filets soulevés portatifs
+fr.ifremer.wao.entity.FishingGearDcf.LNS=Filets soulevés fixes manœuvrées du rivage
+fr.ifremer.wao.entity.FishingGearDcf.LTL=lignes de traîne
+fr.ifremer.wao.entity.FishingGearDcf.LX=Lignes et palangres
+fr.ifremer.wao.entity.FishingGearDcf.MIS=Divers
+fr.ifremer.wao.entity.FishingGearDcf.NK=Engins inconnus ou non spécifiés
+fr.ifremer.wao.entity.FishingGearDcf.OT=Chaluts à panneaux (non spécifié)
+fr.ifremer.wao.entity.FishingGearDcf.OTB=Chalut de fond à panneaux
+fr.ifremer.wao.entity.FishingGearDcf.OTM=Chaluts pélagiques à panneaux
+fr.ifremer.wao.entity.FishingGearDcf.OTT=Chaluts jumeaux à panneaux
+fr.ifremer.wao.entity.FishingGearDcf.PS=Filets tournants avec coulisse (sennes coulissantes)
+fr.ifremer.wao.entity.FishingGearDcf.PS1=Filets tournants, sennes coulissantes manœuvrées par un bateau
+fr.ifremer.wao.entity.FishingGearDcf.PS2=Filets tournants, sennes coulissantes manœuvrées par deux bateaux
+fr.ifremer.wao.entity.FishingGearDcf.PT=Chalut-bœufs (non spécifié)
+fr.ifremer.wao.entity.FishingGearDcf.PTB=Chalut-bœufs de fond
+fr.ifremer.wao.entity.FishingGearDcf.PTM=Chalut-bœufs pélagiques
+fr.ifremer.wao.entity.FishingGearDcf.RG=Engins de pêche révréative
+fr.ifremer.wao.entity.FishingGearDcf.SB=Sennes de plages
+fr.ifremer.wao.entity.FishingGearDcf.SDN=Sennes danoises
+fr.ifremer.wao.entity.FishingGearDcf.SPR=Sennes manœuvrées par deux bateaux
+fr.ifremer.wao.entity.FishingGearDcf.SSC=Sennes écossaises
+fr.ifremer.wao.entity.FishingGearDcf.SV=Sennes halées à bord
+fr.ifremer.wao.entity.FishingGearDcf.SW=Sennes (non spécifiées)
+fr.ifremer.wao.entity.FishingGearDcf.TB=Chalut de fond (non spécifié)
+fr.ifremer.wao.entity.FishingGearDcf.TBB=Chaluts à perche
+fr.ifremer.wao.entity.FishingGearDcf.TBN=Chalut à langoustines
+fr.ifremer.wao.entity.FishingGearDcf.TBS=Chalut à crevettes
+fr.ifremer.wao.entity.FishingGearDcf.TM=Chalut pélagique (non spécifié)
+fr.ifremer.wao.entity.FishingGearDcf.TMS=Chalut pélagique à crevettes
+fr.ifremer.wao.entity.FishingGearDcf.TX=Autre chalut (non spécifié)
fr.ifremer.wao.entity.FishingZone=Zones de pêche
-fr.ifremer.wao.entity.TargetSpeciesDCF.=Non spécifié
-fr.ifremer.wao.entity.TargetSpeciesDCF.ALG=Algues
-fr.ifremer.wao.entity.TargetSpeciesDCF.ANA=Espèces anadromes
-fr.ifremer.wao.entity.TargetSpeciesDCF.CAT=Espèces catadromes
-fr.ifremer.wao.entity.TargetSpeciesDCF.CEP=Céphalopodes
-fr.ifremer.wao.entity.TargetSpeciesDCF.CRU=Crustacés
-fr.ifremer.wao.entity.TargetSpeciesDCF.CRW=Langouste
-fr.ifremer.wao.entity.TargetSpeciesDCF.CSJ=Coquilles Saint-Jacques
-fr.ifremer.wao.entity.TargetSpeciesDCF.DEF=Espèces démersales
-fr.ifremer.wao.entity.TargetSpeciesDCF.DWS=Espèces d'eaux profondes
-fr.ifremer.wao.entity.TargetSpeciesDCF.FIF=Poissons
-fr.ifremer.wao.entity.TargetSpeciesDCF.FIN=Poisson plats
-fr.ifremer.wao.entity.TargetSpeciesDCF.LPF=Grands pélagiques
-fr.ifremer.wao.entity.TargetSpeciesDCF.MOL=Mollusques
-fr.ifremer.wao.entity.TargetSpeciesDCF.SPF=Petits pélagiques
+fr.ifremer.wao.entity.TargetSpeciesDcf.=Non spécifié
+fr.ifremer.wao.entity.TargetSpeciesDcf.ALG=Algues
+fr.ifremer.wao.entity.TargetSpeciesDcf.ANA=Espèces anadromes
+fr.ifremer.wao.entity.TargetSpeciesDcf.CAT=Espèces catadromes
+fr.ifremer.wao.entity.TargetSpeciesDcf.CEP=Céphalopodes
+fr.ifremer.wao.entity.TargetSpeciesDcf.CRU=Crustacés
+fr.ifremer.wao.entity.TargetSpeciesDcf.CRW=Langouste
+fr.ifremer.wao.entity.TargetSpeciesDcf.CSJ=Coquilles Saint-Jacques
+fr.ifremer.wao.entity.TargetSpeciesDcf.DEF=Espèces démersales
+fr.ifremer.wao.entity.TargetSpeciesDcf.DWS=Espèces d'eaux profondes
+fr.ifremer.wao.entity.TargetSpeciesDcf.FIF=Poissons
+fr.ifremer.wao.entity.TargetSpeciesDcf.FIN=Poisson plats
+fr.ifremer.wao.entity.TargetSpeciesDcf.LPF=Grands pélagiques
+fr.ifremer.wao.entity.TargetSpeciesDcf.MOL=Mollusques
+fr.ifremer.wao.entity.TargetSpeciesDcf.SPF=Petits pélagiques
fr.ifremer.wao.entity.TerrestrialDivision=Stratification géographique
fr.ifremer.wao.entity.TerrestrialLocation=Lieux terrestres
wao.business.other=
Modified: trunk/wao-persistence/src/main/xmi/wao-model.properties
===================================================================
--- trunk/wao-persistence/src/main/xmi/wao-model.properties 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-persistence/src/main/xmi/wao-model.properties 2014-08-06 15:49:06 UTC (rev 2202)
@@ -34,9 +34,9 @@
#fr.ifremer.wao.entity.SampleRow.attribute.fishingZone.tagValue.lazy=false
#fr.ifremer.wao.entity.SampleRow.attribute.company.tagValue.lazy=false
#fr.ifremer.wao.entity.SampleRow.attribute.profession.tagValue.lazy=false
-#fr.ifremer.wao.entity.SampleRow.attribute.dCF5Code.tagValue.lazy=false
-#fr.ifremer.wao.entity.DCF5Code.attribute.fishingGearDCF.tagValue.lazy=false
-#fr.ifremer.wao.entity.DCF5Code.attribute.targetSpeciesDCF.tagValue.lazy=false
+#fr.ifremer.wao.entity.SampleRow.attribute.dcf5Code.tagValue.lazy=false
+#fr.ifremer.wao.entity.Dcf5Code.attribute.fishingGearDcf.tagValue.lazy=false
+#fr.ifremer.wao.entity.Dcf5Code.attribute.targetSpeciesDcf.tagValue.lazy=false
#fr.ifremer.wao.entity.ElligibleBoat.attribute.boat.tagValue.lazy=false
#fr.ifremer.wao.entity.ElligibleBoat.attribute.sampleRow.tagValue.lazy=false
#fr.ifremer.wao.entity.Contact.attribute.sampleRow.tagValue.lazy=false
Modified: trunk/wao-persistence/src/main/xmi/wao-model.zargo
===================================================================
(Binary files differ)
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/ObsMerFixtures.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/ObsMerFixtures.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/ObsMerFixtures.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -24,11 +24,11 @@
import fr.ifremer.wao.WaoTechnicalException;
import fr.ifremer.wao.entity.Company;
import fr.ifremer.wao.entity.CompanyTopiaDao;
-import fr.ifremer.wao.entity.FishingGearDCF;
-import fr.ifremer.wao.entity.FishingGearDCFTopiaDao;
+import fr.ifremer.wao.entity.FishingGearDcf;
+import fr.ifremer.wao.entity.FishingGearDcfTopiaDao;
import fr.ifremer.wao.entity.ObsProgram;
-import fr.ifremer.wao.entity.TargetSpeciesDCF;
-import fr.ifremer.wao.entity.TargetSpeciesDCFTopiaDao;
+import fr.ifremer.wao.entity.TargetSpeciesDcf;
+import fr.ifremer.wao.entity.TargetSpeciesDcfTopiaDao;
import fr.ifremer.wao.entity.UserProfile;
import fr.ifremer.wao.entity.UserProfileImpl;
import fr.ifremer.wao.entity.UserProfileTopiaDao;
@@ -207,15 +207,15 @@
}
}
- public FishingGearDCF ptb() {
- FishingGearDCFTopiaDao fishingGearDCFDao = serviceContext.getPersistenceContext().getFishingGearDCFDao();
- FishingGearDCF ptb = fishingGearDCFDao.forCodeEquals("PTB").findUnique();
+ public FishingGearDcf ptb() {
+ FishingGearDcfTopiaDao fishingGearDcfDao = serviceContext.getPersistenceContext().getFishingGearDcfDao();
+ FishingGearDcf ptb = fishingGearDcfDao.forCodeEquals("PTB").findUnique();
return ptb;
}
- public TargetSpeciesDCF def() {
- TargetSpeciesDCFTopiaDao fishingGearDCFDao = serviceContext.getPersistenceContext().getTargetSpeciesDCFDao();
- TargetSpeciesDCF def = fishingGearDCFDao.forCodeEquals("DEF").findUnique();
+ public TargetSpeciesDcf def() {
+ TargetSpeciesDcfTopiaDao fishingGearDcfDao = serviceContext.getPersistenceContext().getTargetSpeciesDcfDao();
+ TargetSpeciesDcf def = fishingGearDcfDao.forCodeEquals("DEF").findUnique();
return def;
}
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -23,12 +23,12 @@
import com.google.common.base.Optional;
import fr.ifremer.wao.entity.Company;
-import fr.ifremer.wao.entity.DCF5Code;
-import fr.ifremer.wao.entity.FishingGearDCF;
+import fr.ifremer.wao.entity.Dcf5Code;
+import fr.ifremer.wao.entity.FishingGearDcf;
import fr.ifremer.wao.entity.FishingZone;
import fr.ifremer.wao.entity.ObsProgram;
import fr.ifremer.wao.entity.SampleRow;
-import fr.ifremer.wao.entity.TargetSpeciesDCF;
+import fr.ifremer.wao.entity.TargetSpeciesDcf;
import fr.ifremer.wao.entity.TerrestrialLocation;
import java.util.Locale;
@@ -128,20 +128,20 @@
terrestrialDistrict.getDescription())
);
}
- for (DCF5Code dcf5Code : sampleRow.getdCF5Code()) {
- FishingGearDCF fishingGearDCF = dcf5Code.getFishingGearDCF();
- String fishingGearLabel = fishingGearDCF.getCode() + " - " + l(locale, fishingGearDCF.getI18nKey());
+ for (Dcf5Code dcf5Code : sampleRow.getDcf5Code()) {
+ FishingGearDcf fishingGearDcf = dcf5Code.getFishingGearDcf();
+ String fishingGearLabel = fishingGearDcf.getCode() + " - " + l(locale, fishingGearDcf.getI18nKey());
fishingGearDcfs.add(
FilterOption.forValueAndLabel(
- fishingGearDCF.getTopiaId(),
+ fishingGearDcf.getTopiaId(),
fishingGearLabel)
);
- TargetSpeciesDCF targetSpeciesDCF = dcf5Code.getTargetSpeciesDCF();
- if (targetSpeciesDCF != null) {
- String targetspeciesLabel = targetSpeciesDCF.getCode() + " - " + l(locale, targetSpeciesDCF.getI18nKey());
+ TargetSpeciesDcf targetSpeciesDcf = dcf5Code.getTargetSpeciesDcf();
+ if (targetSpeciesDcf != null) {
+ String targetspeciesLabel = targetSpeciesDcf.getCode() + " - " + l(locale, targetSpeciesDcf.getI18nKey());
targetSpeciesDcfs.add(
FilterOption.forValueAndLabel(
- targetSpeciesDCF.getTopiaId(),
+ targetSpeciesDcf.getTopiaId(),
targetspeciesLabel)
);
}
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -22,7 +22,7 @@
*/
import fr.ifremer.wao.WaoUtils;
-import fr.ifremer.wao.entity.DCF5Code;
+import fr.ifremer.wao.entity.Dcf5Code;
import fr.ifremer.wao.entity.FishingZone;
import fr.ifremer.wao.entity.SampleMonth;
import fr.ifremer.wao.entity.SampleRow;
@@ -406,16 +406,16 @@
professionLibelle = sampleRow.getProfession().getLibelle();
professionSpecies = sampleRow.getProfession().getSpecies();
dcf5CodesAndDescriptions = new LinkedHashMap<>();
- for (DCF5Code dcf5Code : sampleRow.getdCF5Code()) {
+ for (Dcf5Code dcf5Code : sampleRow.getDcf5Code()) {
String key = dcf5Code.getCode();
- String description = dcf5Code.getFishingGearCode() + " - " + WaoUtils.l(locale, dcf5Code.getFishingGearDCF());
+ String description = dcf5Code.getFishingGearCode() + " - " + WaoUtils.l(locale, dcf5Code.getFishingGearDcf());
if (dcf5Code.getTargetSpeciesCode() != null) {
- description += " ; " + dcf5Code.getTargetSpeciesCode() + " - " + WaoUtils.l(locale, dcf5Code.getTargetSpeciesDCF());
+ description += " ; " + dcf5Code.getTargetSpeciesCode() + " - " + WaoUtils.l(locale, dcf5Code.getTargetSpeciesDcf());
}
dcf5CodesAndDescriptions.put(key, description);
}
- professionDescriptionWithoutDCF5 = sampleRow.getProfessionDescriptionWithoutDCF5();
+ professionDescriptionWithoutDCF5 = sampleRow.getProfessionDescriptionWithoutDcf5();
sampleRowId = sampleRow.getTopiaId();
// consider a recently created sample row as recently updated
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlanService.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlanService.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlanService.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -39,7 +39,7 @@
import fr.ifremer.wao.entity.CompanyTopiaDao;
import fr.ifremer.wao.entity.Contact;
import fr.ifremer.wao.entity.ContactState;
-import fr.ifremer.wao.entity.DCF5Code;
+import fr.ifremer.wao.entity.Dcf5Code;
import fr.ifremer.wao.entity.ElligibleBoat;
import fr.ifremer.wao.entity.ElligibleBoatImpl;
import fr.ifremer.wao.entity.ElligibleBoatTopiaDao;
@@ -349,7 +349,7 @@
);
updateSampleRowCommand.setAllCompanies(allCompanies);
- ImmutableMap<String, DCF5Code> allDcf5Codes =
+ ImmutableMap<String, Dcf5Code> allDcf5Codes =
Maps.uniqueIndex(
getReferentialService().getAllDcf5Codes(),
TopiaEntities.getTopiaIdFunction()
@@ -751,7 +751,7 @@
}
}
- if (CollectionUtils.isEmpty(sampleRow.getdCF5Code())) {
+ if (sampleRow.isDcf5CodeEmpty()) {
throw new MissingDcf5CodesException(sampleRow);
}
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateSampleRowCommand.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateSampleRowCommand.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/UpdateSampleRowCommand.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -26,7 +26,7 @@
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
import fr.ifremer.wao.entity.Company;
-import fr.ifremer.wao.entity.DCF5Code;
+import fr.ifremer.wao.entity.Dcf5Code;
import fr.ifremer.wao.entity.FishingZone;
import fr.ifremer.wao.entity.SampleMonth;
import fr.ifremer.wao.entity.SampleRow;
@@ -62,7 +62,7 @@
protected ImmutableMap<String, Company> allCompanies;
- protected ImmutableMap<String, DCF5Code> allDcf5Codes;
+ protected ImmutableMap<String, Dcf5Code> allDcf5Codes;
protected String elligibleBoatRegistrationCodes;
@@ -109,14 +109,14 @@
}
public Set<String> getDcf5CodesIds() {
- return sampleRow.getdCF5CodeTopiaIds();
+ return sampleRow.getDcf5CodeTopiaIds();
}
public void setDcf5CodesIds(Set<String> dcf5CodesIds) {
- sampleRow.cleardCF5Code();
+ sampleRow.clearDcf5Code();
for (String dcf5CodesId : dcf5CodesIds) {
- DCF5Code dcf5Code = allDcf5Codes.get(dcf5CodesId);
- sampleRow.adddCF5Code(dcf5Code);
+ Dcf5Code dcf5Code = allDcf5Codes.get(dcf5CodesId);
+ sampleRow.addDcf5Code(dcf5Code);
}
}
@@ -194,11 +194,11 @@
this.allCompanies = allCompanies;
}
- public ImmutableMap<String, DCF5Code> getAllDcf5Codes() {
+ public ImmutableMap<String, Dcf5Code> getAllDcf5Codes() {
return allDcf5Codes;
}
- public void setAllDcf5Codes(ImmutableMap<String, DCF5Code> allDcf5Codes) {
+ public void setAllDcf5Codes(ImmutableMap<String, Dcf5Code> allDcf5Codes) {
this.allDcf5Codes = allDcf5Codes;
}
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/WaoServiceSupport.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/WaoServiceSupport.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/WaoServiceSupport.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -28,9 +28,9 @@
import fr.ifremer.wao.entity.CompanyTopiaDao;
import fr.ifremer.wao.entity.ContactStateMotifTopiaDao;
import fr.ifremer.wao.entity.ContactTopiaDao;
-import fr.ifremer.wao.entity.DCF5CodeTopiaDao;
+import fr.ifremer.wao.entity.Dcf5CodeTopiaDao;
import fr.ifremer.wao.entity.ElligibleBoatTopiaDao;
-import fr.ifremer.wao.entity.FishingGearDCFTopiaDao;
+import fr.ifremer.wao.entity.FishingGearDcfTopiaDao;
import fr.ifremer.wao.entity.FishingZoneTopiaDao;
import fr.ifremer.wao.entity.NewsTopiaDao;
import fr.ifremer.wao.entity.ProfessionTopiaDao;
@@ -39,7 +39,7 @@
import fr.ifremer.wao.entity.SampleRowLogTopiaDao;
import fr.ifremer.wao.entity.SampleRowTopiaDao;
import fr.ifremer.wao.entity.ShipOwnerTopiaDao;
-import fr.ifremer.wao.entity.TargetSpeciesDCFTopiaDao;
+import fr.ifremer.wao.entity.TargetSpeciesDcfTopiaDao;
import fr.ifremer.wao.entity.TerrestrialLocationTopiaDao;
import fr.ifremer.wao.entity.UserProfileTopiaDao;
import fr.ifremer.wao.entity.WaoUserTopiaDao;
@@ -127,16 +127,16 @@
return getPersistenceContext().getContactStateMotifDao();
}
- protected DCF5CodeTopiaDao getDCF5CodeDao() {
- return getPersistenceContext().getDCF5CodeDao();
+ protected Dcf5CodeTopiaDao getDcf5CodeDao() {
+ return getPersistenceContext().getDcf5CodeDao();
}
protected ElligibleBoatTopiaDao getElligibleBoatDao() {
return getPersistenceContext().getElligibleBoatDao();
}
- protected FishingGearDCFTopiaDao getFishingGearDCFDao() {
- return getPersistenceContext().getFishingGearDCFDao();
+ protected FishingGearDcfTopiaDao getFishingGearDcfDao() {
+ return getPersistenceContext().getFishingGearDcfDao();
}
protected FishingZoneTopiaDao getFishingZoneDao() {
@@ -171,8 +171,8 @@
return getPersistenceContext().getShipOwnerDao();
}
- protected TargetSpeciesDCFTopiaDao getTargetSpeciesDCFDao() {
- return getPersistenceContext().getTargetSpeciesDCFDao();
+ protected TargetSpeciesDcfTopiaDao getTargetSpeciesDcfDao() {
+ return getPersistenceContext().getTargetSpeciesDcfDao();
}
protected TerrestrialLocationTopiaDao getTerrestrialLocationDao() {
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/administration/ReferentialService.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -35,10 +35,10 @@
import fr.ifremer.wao.entity.ContactState;
import fr.ifremer.wao.entity.ContactStateMotif;
import fr.ifremer.wao.entity.ContactStateMotifTopiaDao;
-import fr.ifremer.wao.entity.DCF5Code;
-import fr.ifremer.wao.entity.DCF5CodeTopiaDao;
-import fr.ifremer.wao.entity.FishingGearDCF;
-import fr.ifremer.wao.entity.FishingGearDCFTopiaDao;
+import fr.ifremer.wao.entity.Dcf5Code;
+import fr.ifremer.wao.entity.Dcf5CodeTopiaDao;
+import fr.ifremer.wao.entity.FishingGearDcf;
+import fr.ifremer.wao.entity.FishingGearDcfTopiaDao;
import fr.ifremer.wao.entity.FishingZone;
import fr.ifremer.wao.entity.FishingZoneTopiaDao;
import fr.ifremer.wao.entity.LocationType;
@@ -50,8 +50,8 @@
import fr.ifremer.wao.entity.SampleRowTopiaDao;
import fr.ifremer.wao.entity.ShipOwner;
import fr.ifremer.wao.entity.ShipOwnerTopiaDao;
-import fr.ifremer.wao.entity.TargetSpeciesDCF;
-import fr.ifremer.wao.entity.TargetSpeciesDCFTopiaDao;
+import fr.ifremer.wao.entity.TargetSpeciesDcf;
+import fr.ifremer.wao.entity.TargetSpeciesDcfTopiaDao;
import fr.ifremer.wao.entity.TerrestrialLocation;
import fr.ifremer.wao.entity.TerrestrialLocationImpl;
import fr.ifremer.wao.entity.TerrestrialLocationTopiaDao;
@@ -481,10 +481,10 @@
}
- protected void initialDCF5CodesImport() {
+ protected void initialDcf5CodesImport() {
- FishingGearDCFTopiaDao fishingGearDCFDao = getPersistenceContext().getFishingGearDCFDao();
- TargetSpeciesDCFTopiaDao targetSpeciesDCFDao = getPersistenceContext().getTargetSpeciesDCFDao();
+ FishingGearDcfTopiaDao fishingGearDcfDao = getPersistenceContext().getFishingGearDcfDao();
+ TargetSpeciesDcfTopiaDao targetSpeciesDcfDao = getPersistenceContext().getTargetSpeciesDcfDao();
final String[] gearCodesBase = {"DRB", "DRH",
"FPN", "FPO", "FSN", "FWR", "FYK", "GES", "GNC",
@@ -497,7 +497,7 @@
final String[] speciesCodesBase = {"ALG", "ANA", "CAT", "CRU",
"DEF", "DWS", "LPF", "MOL", "SPF", "FIF", "CEP"};
- long nbCodes = fishingGearDCFDao.count() + targetSpeciesDCFDao.count();
+ long nbCodes = fishingGearDcfDao.count() + targetSpeciesDcfDao.count();
if (nbCodes == 0) {
@@ -506,11 +506,11 @@
}
for (String code : gearCodesBase) {
- fishingGearDCFDao.create(FishingGearDCF.PROPERTY_CODE, code);
+ fishingGearDcfDao.create(FishingGearDcf.PROPERTY_CODE, code);
}
for (String code : speciesCodesBase) {
- targetSpeciesDCFDao.create(TargetSpeciesDCF.PROPERTY_CODE, code);
+ targetSpeciesDcfDao.create(TargetSpeciesDcf.PROPERTY_CODE, code);
}
} else {
@@ -520,33 +520,33 @@
}
for (String code : gearCodesBase) {
- FishingGearDCF fishingGearDCF = fishingGearDCFDao.forCodeEquals(code).findUniqueOrNull();
- if (fishingGearDCF == null) {
+ FishingGearDcf fishingGearDcf = fishingGearDcfDao.forCodeEquals(code).findUniqueOrNull();
+ if (fishingGearDcf == null) {
log.info("add missing fishing gear DCF: '" + code + "'");
- fishingGearDCFDao.create(FishingGearDCF.PROPERTY_CODE, code);
+ fishingGearDcfDao.create(FishingGearDcf.PROPERTY_CODE, code);
}
}
for (String code : speciesCodesBase) {
- TargetSpeciesDCF targetSpeciesDCF = targetSpeciesDCFDao.forCodeEquals(code).findUniqueOrNull();
- if (targetSpeciesDCF == null) {
+ TargetSpeciesDcf targetSpeciesDcf = targetSpeciesDcfDao.forCodeEquals(code).findUniqueOrNull();
+ if (targetSpeciesDcf == null) {
log.info("add missing target species DCF: '" + code + "'");
- targetSpeciesDCFDao.create(TargetSpeciesDCF.PROPERTY_CODE, code);
+ targetSpeciesDcfDao.create(TargetSpeciesDcf.PROPERTY_CODE, code);
}
}
// on supprime ce qu'il y a en trop
- for (FishingGearDCF fishingGearDCF : fishingGearDCFDao.findAll()) {
- if ( ! ArrayUtils.contains(gearCodesBase, fishingGearDCF.getCode())) {
- List<DCF5Code> usages = fishingGearDCFDao.findUsages(DCF5Code.class, fishingGearDCF);
+ for (FishingGearDcf fishingGearDcf : fishingGearDcfDao.findAll()) {
+ if ( ! ArrayUtils.contains(gearCodesBase, fishingGearDcf.getCode())) {
+ List<Dcf5Code> usages = fishingGearDcfDao.findUsages(Dcf5Code.class, fishingGearDcf);
if (usages.isEmpty()) {
- log.info("will delete code " + fishingGearDCF);
- fishingGearDCFDao.delete(fishingGearDCF);
+ log.info("will delete code " + fishingGearDcf);
+ fishingGearDcfDao.delete(fishingGearDcf);
} else {
- log.warn("will not delete " + fishingGearDCF);
+ log.warn("will not delete " + fishingGearDcf);
SampleRowTopiaDao sampleRowDao = getPersistenceContext().getSampleRowDao();
- for (DCF5Code usage : usages) {
- List<SampleRow> sampleRows = sampleRowDao.fordCF5CodeContains(usage).findAll();
+ for (Dcf5Code usage : usages) {
+ List<SampleRow> sampleRows = sampleRowDao.forDcf5CodeContains(usage).findAll();
for (SampleRow sampleRow : sampleRows) {
log.warn("sampleRow " + sampleRow.getCode() + " use " + usage);
}
@@ -555,52 +555,52 @@
}
}
- for (TargetSpeciesDCF targetSpeciesDCF : targetSpeciesDCFDao.findAll()) {
- if ( ! ArrayUtils.contains(speciesCodesBase, targetSpeciesDCF.getCode())) {
- List<DCF5Code> usages = targetSpeciesDCFDao.findUsages(DCF5Code.class, targetSpeciesDCF);
+ for (TargetSpeciesDcf targetSpeciesDcf : targetSpeciesDcfDao.findAll()) {
+ if ( ! ArrayUtils.contains(speciesCodesBase, targetSpeciesDcf.getCode())) {
+ List<Dcf5Code> usages = targetSpeciesDcfDao.findUsages(Dcf5Code.class, targetSpeciesDcf);
if (usages.isEmpty()) {
- log.info("will delete code " + targetSpeciesDCF);
- targetSpeciesDCFDao.delete(targetSpeciesDCF);
+ log.info("will delete code " + targetSpeciesDcf);
+ targetSpeciesDcfDao.delete(targetSpeciesDcf);
} else {
- log.warn("will not delete " + targetSpeciesDCF);
+ log.warn("will not delete " + targetSpeciesDcf);
}
}
}
}
if (log.isInfoEnabled()) {
- nbCodes = fishingGearDCFDao.count() + targetSpeciesDCFDao.count();
+ nbCodes = fishingGearDcfDao.count() + targetSpeciesDcfDao.count();
log.info(nbCodes + " dcf codes in database");
}
- DCF5CodeTopiaDao dcf5CodeDao = getDCF5CodeDao();
+ Dcf5CodeTopiaDao dcf5CodeDao = getDcf5CodeDao();
if (log.isInfoEnabled()) {
log.info(dcf5CodeDao.count() + " dcf5 codes in database before filling");
}
- List<FishingGearDCF> fishingGearDCFs = fishingGearDCFDao.findAll();
- List<TargetSpeciesDCF> targetSpeciesDCFs = targetSpeciesDCFDao.findAll();
+ List<FishingGearDcf> fishingGearDcfs = fishingGearDcfDao.findAll();
+ List<TargetSpeciesDcf> targetSpeciesDcfs = targetSpeciesDcfDao.findAll();
- Set<Pair<FishingGearDCF, TargetSpeciesDCF>> pairs = new HashSet<>();
+ Set<Pair<FishingGearDcf, TargetSpeciesDcf>> pairs = new HashSet<>();
- for (FishingGearDCF fishingGearDCF : fishingGearDCFs) {
- for (TargetSpeciesDCF targetSpeciesDCF : targetSpeciesDCFs) {
- pairs.add(Pair.of(fishingGearDCF, targetSpeciesDCF));
+ for (FishingGearDcf fishingGearDcf : fishingGearDcfs) {
+ for (TargetSpeciesDcf targetSpeciesDcf : targetSpeciesDcfs) {
+ pairs.add(Pair.of(fishingGearDcf, targetSpeciesDcf));
}
- pairs.add(Pair.of(fishingGearDCF, (TargetSpeciesDCF) null));
+ pairs.add(Pair.of(fishingGearDcf, (TargetSpeciesDcf) null));
}
- for (Pair<FishingGearDCF, TargetSpeciesDCF> pair : pairs) {
+ for (Pair<FishingGearDcf, TargetSpeciesDcf> pair : pairs) {
- FishingGearDCF fishingGearDCF = pair.getLeft();
- TargetSpeciesDCF targetSpeciesDCF = pair.getRight();
+ FishingGearDcf fishingGearDcf = pair.getLeft();
+ TargetSpeciesDcf targetSpeciesDcf = pair.getRight();
Map<String, Object> properties = new HashMap<>();
- properties.put(DCF5Code.PROPERTY_FISHING_GEAR_DCF, fishingGearDCF);
- properties.put(DCF5Code.PROPERTY_TARGET_SPECIES_DCF, targetSpeciesDCF);
+ properties.put(Dcf5Code.PROPERTY_FISHING_GEAR_DCF, fishingGearDcf);
+ properties.put(Dcf5Code.PROPERTY_TARGET_SPECIES_DCF, targetSpeciesDcf);
- DCF5Code dcf5code = dcf5CodeDao.forProperties(properties).findUniqueOrNull();
+ Dcf5Code dcf5code = dcf5CodeDao.forProperties(properties).findUniqueOrNull();
if (dcf5code == null) {
dcf5CodeDao.create(properties);
}
@@ -616,7 +616,7 @@
public void initialImport() {
- initialDCF5CodesImport();
+ initialDcf5CodesImport();
InputStream input = null;
@@ -689,15 +689,15 @@
return referentialStates;
}
- public List<FishingGearDCF> getAllFishingGearDCF() {
- FishingGearDCFTopiaDao dao = getPersistenceContext().getFishingGearDCFDao();
- List<FishingGearDCF> all = dao.findAll();
+ public List<FishingGearDcf> getAllFishingGearDcf() {
+ FishingGearDcfTopiaDao dao = getPersistenceContext().getFishingGearDcfDao();
+ List<FishingGearDcf> all = dao.findAll();
return all;
}
- public List<TargetSpeciesDCF> getAllTargetSpeciesDCF() {
- TargetSpeciesDCFTopiaDao dao = getPersistenceContext().getTargetSpeciesDCFDao();
- List<TargetSpeciesDCF> all = dao.findAll();
+ public List<TargetSpeciesDcf> getAllTargetSpeciesDcf() {
+ TargetSpeciesDcfTopiaDao dao = getPersistenceContext().getTargetSpeciesDcfDao();
+ List<TargetSpeciesDcf> all = dao.findAll();
return all;
}
@@ -796,14 +796,14 @@
/**
* Étant donné une suite de codes DCF séparés par des caractères blancs, on retourne
- * les instances de {@link fr.ifremer.wao.entity.DCF5Code} correspondantes en ajoutant
+ * les instances de {@link fr.ifremer.wao.entity.Dcf5Code} correspondantes en ajoutant
* les manquantes au référentiel au besoin.
*/
- public Set<DCF5Code> getDcf5Codes(String joinedDcf5Codes) throws UnknownFishingGearDcfCodeException, UnknownTargetSpeciesDcfCodeException {
+ public Set<Dcf5Code> getDcf5Codes(String joinedDcf5Codes) throws UnknownFishingGearDcfCodeException, UnknownTargetSpeciesDcfCodeException {
- Set<DCF5Code> dcf5Codes = new HashSet<>();
+ Set<Dcf5Code> dcf5Codes = new HashSet<>();
- DCF5CodeTopiaDao dao = getDCF5CodeDao();
+ Dcf5CodeTopiaDao dao = getDcf5CodeDao();
if (StringUtils.isNotBlank(joinedDcf5Codes)) {
@@ -813,29 +813,29 @@
String[] codeParts = code.split("_");
- FishingGearDCF fishingGearDCF;
+ FishingGearDcf fishingGearDcf;
try {
- fishingGearDCF = getFishingGearDCFDao().forCodeEquals(codeParts[0]).findUnique();
+ fishingGearDcf = getFishingGearDcfDao().forCodeEquals(codeParts[0]).findUnique();
} catch (TopiaNoResultException e) {
throw new UnknownFishingGearDcfCodeException(codeParts[0]);
}
- TargetSpeciesDCF targetSpeciesDCF = null;
+ TargetSpeciesDcf targetSpeciesDcf = null;
if (codeParts.length == 2) {
try {
- targetSpeciesDCF = getTargetSpeciesDCFDao().forCodeEquals(codeParts[1]).findUnique();
+ targetSpeciesDcf = getTargetSpeciesDcfDao().forCodeEquals(codeParts[1]).findUnique();
} catch (TopiaNoResultException e) {
throw new UnknownTargetSpeciesDcfCodeException(codeParts[1]);
}
}
Map<String, Object> properties = new HashMap<>();
- properties.put(DCF5Code.PROPERTY_FISHING_GEAR_DCF, fishingGearDCF);
- properties.put(DCF5Code.PROPERTY_TARGET_SPECIES_DCF, targetSpeciesDCF);
+ properties.put(Dcf5Code.PROPERTY_FISHING_GEAR_DCF, fishingGearDcf);
+ properties.put(Dcf5Code.PROPERTY_TARGET_SPECIES_DCF, targetSpeciesDcf);
- Optional<DCF5Code> optionalDcf5Code = dao.forProperties(properties).tryFindUnique();
+ Optional<Dcf5Code> optionalDcf5Code = dao.forProperties(properties).tryFindUnique();
- DCF5Code dcf5Code;
+ Dcf5Code dcf5Code;
if (optionalDcf5Code.isPresent()) {
dcf5Code = optionalDcf5Code.get();
} else {
@@ -850,9 +850,9 @@
return dcf5Codes;
}
- public List<DCF5Code> getAllDcf5Codes() {
+ public List<Dcf5Code> getAllDcf5Codes() {
- List<DCF5Code> dcf5Codes = getDCF5CodeDao().findAll();
+ List<Dcf5Code> dcf5Codes = getDcf5CodeDao().findAll();
return dcf5Codes;
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ObsMerObsVenteSamplingPlanImportExportModel.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ObsMerObsVenteSamplingPlanImportExportModel.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/ObsMerObsVenteSamplingPlanImportExportModel.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -39,7 +39,7 @@
import fr.ifremer.wao.entity.TerrestrialLocation;
import fr.ifremer.wao.services.service.administration.ReferentialService;
import fr.ifremer.wao.services.service.csv.operations.CompanyParserFormatter;
-import fr.ifremer.wao.services.service.csv.operations.DCF5CodesParserFormatter;
+import fr.ifremer.wao.services.service.csv.operations.Dcf5CodesParserFormatter;
import fr.ifremer.wao.services.service.csv.operations.DistrictNamesFormatter;
import fr.ifremer.wao.services.service.csv.operations.DistrictsParserFormatter;
import fr.ifremer.wao.services.service.csv.operations.FishingZonesParserFormatter;
@@ -204,7 +204,7 @@
modelBuilder.newColumnForImportExport("PECHE_DIVISION", SampleRow.PROPERTY_FISHING_ZONE, new FishingZonesParserFormatter(locale, fishingZones));
modelBuilder.newColumnForImportExport("PECHE_AUTRE", SampleRow.PROPERTY_FISHING_ZONES_INFOS);
- modelBuilder.newColumnForImportExport("METIER_CODE_DCF5", SampleRow.PROPERTY_D_CF5_CODE, new DCF5CodesParserFormatter(locale, referentialService));
+ modelBuilder.newColumnForImportExport("METIER_CODE_DCF5", SampleRow.PROPERTY_DCF5_CODE, new Dcf5CodesParserFormatter(locale, referentialService));
modelBuilder.newColumnForImportExport("METIER_MAILLAGE", SampleRow.PROPERTY_PROFESSION + "." + Profession.PROPERTY_MESH_SIZE);
modelBuilder.newColumnForImportExport("METIER_TAILLE", SampleRow.PROPERTY_PROFESSION + "." + Profession.PROPERTY_SIZE);
modelBuilder.newColumnForImportExport("METIER_AUTRE", SampleRow.PROPERTY_PROFESSION + "." + Profession.PROPERTY_OTHER);
Deleted: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DCF5CodesParserFormatter.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DCF5CodesParserFormatter.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DCF5CodesParserFormatter.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -1,73 +0,0 @@
-/*
- * #%L
- * Wao :: Business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2012 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package fr.ifremer.wao.services.service.csv.operations;
-
-import com.google.common.collect.Iterables;
-import fr.ifremer.wao.entity.DCF5Code;
-import fr.ifremer.wao.entity.DCF5Codes;
-import fr.ifremer.wao.services.service.administration.ReferentialService;
-import fr.ifremer.wao.services.service.administration.UnknownFishingGearDcfCodeException;
-import fr.ifremer.wao.services.service.administration.UnknownTargetSpeciesDcfCodeException;
-import org.nuiton.csv.ValueParserFormatter;
-import org.nuiton.i18n.I18n;
-import org.nuiton.util.StringUtil;
-
-import java.util.Locale;
-import java.util.Set;
-
-public class DCF5CodesParserFormatter implements ValueParserFormatter<Set<DCF5Code>> {
-
- protected static final String DCF5_CODES_SEPARATOR = ",";
-
- protected final Locale locale;
-
- protected ReferentialService referentialService;
-
- public DCF5CodesParserFormatter(Locale locale) {
- this.locale = locale;
- }
-
- public DCF5CodesParserFormatter(Locale locale, ReferentialService referentialService) {
- this.locale = locale;
- this.referentialService = referentialService;
- }
-
- @Override
- public String format(Set<DCF5Code> dcf5Codes) {
- String join = StringUtil.join(Iterables.transform(dcf5Codes, DCF5Codes.getCode()), DCF5_CODES_SEPARATOR, true);
- return join;
- }
-
- @Override
- public Set<DCF5Code> parse(String codes) {
- try {
- Set<DCF5Code> dcf5Codes = referentialService.getDcf5Codes(codes);
- return dcf5Codes;
- } catch (UnknownFishingGearDcfCodeException e) {
- throw new IllegalArgumentException(I18n.l(locale,"wao.import.sampleRow.failure.unknownFishingGearDcfCode", e.getCode()), e);
- } catch (UnknownTargetSpeciesDcfCodeException e) {
- throw new IllegalArgumentException(I18n.l(locale, "wao.import.sampleRow.failure.unknownTargetSpeciesDcfCode", e.getCode()), e);
- }
- }
-}
Copied: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/Dcf5CodesParserFormatter.java (from rev 2201, trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DCF5CodesParserFormatter.java)
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/Dcf5CodesParserFormatter.java (rev 0)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/Dcf5CodesParserFormatter.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -0,0 +1,73 @@
+/*
+ * #%L
+ * Wao :: Business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package fr.ifremer.wao.services.service.csv.operations;
+
+import com.google.common.collect.Iterables;
+import fr.ifremer.wao.entity.Dcf5Code;
+import fr.ifremer.wao.entity.Dcf5Codes;
+import fr.ifremer.wao.services.service.administration.ReferentialService;
+import fr.ifremer.wao.services.service.administration.UnknownFishingGearDcfCodeException;
+import fr.ifremer.wao.services.service.administration.UnknownTargetSpeciesDcfCodeException;
+import org.nuiton.csv.ValueParserFormatter;
+import org.nuiton.i18n.I18n;
+import org.nuiton.util.StringUtil;
+
+import java.util.Locale;
+import java.util.Set;
+
+public class Dcf5CodesParserFormatter implements ValueParserFormatter<Set<Dcf5Code>> {
+
+ protected static final String DCF5_CODES_SEPARATOR = ",";
+
+ protected final Locale locale;
+
+ protected ReferentialService referentialService;
+
+ public Dcf5CodesParserFormatter(Locale locale) {
+ this.locale = locale;
+ }
+
+ public Dcf5CodesParserFormatter(Locale locale, ReferentialService referentialService) {
+ this.locale = locale;
+ this.referentialService = referentialService;
+ }
+
+ @Override
+ public String format(Set<Dcf5Code> dcf5Codes) {
+ String join = StringUtil.join(Iterables.transform(dcf5Codes, Dcf5Codes.getCode()), DCF5_CODES_SEPARATOR, true);
+ return join;
+ }
+
+ @Override
+ public Set<Dcf5Code> parse(String codes) {
+ try {
+ Set<Dcf5Code> dcf5Codes = referentialService.getDcf5Codes(codes);
+ return dcf5Codes;
+ } catch (UnknownFishingGearDcfCodeException e) {
+ throw new IllegalArgumentException(I18n.l(locale,"wao.import.sampleRow.failure.unknownFishingGearDcfCode", e.getCode()), e);
+ } catch (UnknownTargetSpeciesDcfCodeException e) {
+ throw new IllegalArgumentException(I18n.l(locale, "wao.import.sampleRow.failure.unknownTargetSpeciesDcfCode", e.getCode()), e);
+ }
+ }
+}
Modified: trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/administration/ReferentialServiceTest.java
===================================================================
--- trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/administration/ReferentialServiceTest.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/administration/ReferentialServiceTest.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -22,7 +22,7 @@
*/
import fr.ifremer.wao.entity.Boat;
-import fr.ifremer.wao.entity.DCF5Code;
+import fr.ifremer.wao.entity.Dcf5Code;
import fr.ifremer.wao.services.AbstractWaoServiceTest;
import fr.ifremer.wao.services.service.ImportErrorException;
import org.apache.commons.io.IOUtils;
@@ -131,14 +131,14 @@
@Test
public void testGetDcf5Codes() {
- service.initialDCF5CodesImport();
+ service.initialDcf5CodesImport();
try {
- Collection<DCF5Code> dcf5Codes = service.getDcf5Codes("OTT_DWS OTB_DEF OTB OTT_DEF");
+ Collection<Dcf5Code> dcf5Codes = service.getDcf5Codes("OTT_DWS OTB_DEF OTB OTT_DEF");
Assert.assertEquals(4, dcf5Codes.size());
- for (DCF5Code dcf5Code : dcf5Codes) {
+ for (Dcf5Code dcf5Code : dcf5Codes) {
Assert.assertTrue(dcf5Code.isPersisted());
}
Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/ContactsAction.java
===================================================================
--- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/ContactsAction.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/ContactsAction.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -27,7 +27,7 @@
import fr.ifremer.wao.WaoUtils;
import fr.ifremer.wao.entity.Contact;
import fr.ifremer.wao.entity.ContactState;
-import fr.ifremer.wao.entity.DCF5Code;
+import fr.ifremer.wao.entity.Dcf5Code;
import fr.ifremer.wao.entity.FishingZone;
import fr.ifremer.wao.entity.SampleRow;
import fr.ifremer.wao.services.service.ContactsFilterValues;
@@ -209,11 +209,11 @@
public Map<String, String> getDcf5CodesAndDescriptions(SampleRow sampleRow) {
Map<String, String> dcf5CodesAndDescriptions = new LinkedHashMap<>();
- for (DCF5Code dcf5Code : sampleRow.getdCF5Code()) {
+ for (Dcf5Code dcf5Code : sampleRow.getDcf5Code()) {
String key = dcf5Code.getCode();
- String description = dcf5Code.getFishingGearCode() + " - " + WaoUtils.l(getLocale(), dcf5Code.getFishingGearDCF());
+ String description = dcf5Code.getFishingGearCode() + " - " + WaoUtils.l(getLocale(), dcf5Code.getFishingGearDcf());
if (dcf5Code.getTargetSpeciesCode() != null) {
- description += " ; " + dcf5Code.getTargetSpeciesCode() + " - " + WaoUtils.l(getLocale(), dcf5Code.getTargetSpeciesDCF());
+ description += " ; " + dcf5Code.getTargetSpeciesCode() + " - " + WaoUtils.l(getLocale(), dcf5Code.getTargetSpeciesDcf());
}
dcf5CodesAndDescriptions.put(key, description);
}
Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/EditSampleRowAction.java
===================================================================
--- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/EditSampleRowAction.java 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/EditSampleRowAction.java 2014-08-06 15:49:06 UTC (rev 2202)
@@ -42,7 +42,6 @@
import fr.ifremer.wao.services.service.WrongSampleRowCodeFormatException;
import fr.ifremer.wao.services.service.administration.UnknownBoatRegistrationCodesException;
import fr.ifremer.wao.web.WaoJspActionSupport;
-import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.convention.annotation.Result;
@@ -95,7 +94,7 @@
service.validate(getAuthenticatedWaoUser(), updateSampleRowCommand);
- if (CollectionUtils.isEmpty(sampleRow.getdCF5Code())) {
+ if (sampleRow.isDcf5CodeEmpty()) {
addFieldError("updateSampleRowCommand.dcf5Codes", t("wao.ui.form.SampleRow.error.missingDcf5Codes"));
}
Modified: trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties
===================================================================
--- trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties 2014-08-06 15:49:06 UTC (rev 2202)
@@ -159,8 +159,8 @@
wao.ui.entity.SampleRow=Sample row
wao.ui.entity.SampleRow.day=Day
wao.ui.entity.TerrestrialLocation=Place
-wao.ui.entity.fishingGearDCF=Gear DCF code
-wao.ui.entity.targetSpeciesDCF=Target species DCF code
+wao.ui.entity.fishingGearDcf=Gear DCF code
+wao.ui.entity.targetSpeciesDcf=Target species DCF code
wao.ui.error.unknownContactId=This contact doesn't exist
wao.ui.field.Boat.boatGroup=Boat group
wao.ui.field.Boat.boatLength=Length
Modified: trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties
===================================================================
--- trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties 2014-08-06 15:49:06 UTC (rev 2202)
@@ -160,8 +160,8 @@
wao.ui.entity.SampleRow=Ligne du plan d'échantillonnage
wao.ui.entity.SampleRow.day=Jour
wao.ui.entity.TerrestrialLocation=Lieu
-wao.ui.entity.fishingGearDCF=Engin code DCF
-wao.ui.entity.targetSpeciesDCF=Ensembles d'espèces-cible code DCF
+wao.ui.entity.fishingGearDcf=Engin code DCF
+wao.ui.entity.targetSpeciesDcf=Ensembles d'espèces-cible code DCF
wao.ui.error.unknownContactId=Ce contact n'existe pas
wao.ui.field.Boat.boatGroup=Strate
wao.ui.field.Boat.boatLength=Longueur
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/contacts.jsp 2014-08-06 15:49:06 UTC (rev 2202)
@@ -69,12 +69,12 @@
</s:if>
{
filterName: 'sampleRowFilter.fishingGearDcfIds',
- filterLabel: "<s:text name="wao.ui.entity.fishingGearDCF"/>",
+ filterLabel: "<s:text name="wao.ui.entity.fishingGearDcf"/>",
filterValuesField: 'sampleRowsFilterValues.fishingGearDcfs',
},
{
filterName: 'sampleRowFilter.targetSpeciesDcfIds',
- filterLabel: "<s:text name="wao.ui.entity.targetSpeciesDCF"/>",
+ filterLabel: "<s:text name="wao.ui.entity.targetSpeciesDcf"/>",
filterValuesField: 'sampleRowsFilterValues.targetSpeciesDcfs',
},
<s:if test="authenticatedWaoUser.authorizedToFilterOnBoats">
@@ -428,7 +428,7 @@
<s:iterator value="getDcf5CodesAndDescriptions(sampleRow)">
<abbr title="<s:property value="value"/>"><s:property value="key"/></abbr>
</s:iterator>
- <s:property value="sampleRow.professionDescriptionWithoutDCF5" />
+ <s:property value="sampleRow.professionDescriptionWithoutDcf5" />
</td>
<td class="only-in-full-view">
<s:property value="sampleRow.profession.libelle"/>
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-08-06 15:49:06 UTC (rev 2202)
@@ -65,12 +65,12 @@
},
{
filterName: 'fishingGearDcfIds',
- filterLabel: "<s:text name="wao.ui.entity.fishingGearDCF"/>",
+ filterLabel: "<s:text name="wao.ui.entity.fishingGearDcf"/>",
filterValuesField: 'fishingGearDcfs',
},
{
filterName: 'targetSpeciesDcfIds',
- filterLabel: "<s:text name="wao.ui.entity.targetSpeciesDCF"/>",
+ filterLabel: "<s:text name="wao.ui.entity.targetSpeciesDcf"/>",
filterValuesField: 'targetSpeciesDcfs',
}
];
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsvente/sampling-plan.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/obsvente/sampling-plan.jsp 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsvente/sampling-plan.jsp 2014-08-06 15:49:06 UTC (rev 2202)
@@ -65,12 +65,12 @@
},
{
filterName: 'fishingGearDcfIds',
- filterLabel: "<s:text name="wao.ui.entity.fishingGearDCF"/>",
+ filterLabel: "<s:text name="wao.ui.entity.fishingGearDcf"/>",
filterValuesField: 'fishingGearDcfs',
},
{
filterName: 'targetSpeciesDcfIds',
- filterLabel: "<s:text name="wao.ui.entity.targetSpeciesDCF"/>",
+ filterLabel: "<s:text name="wao.ui.entity.targetSpeciesDcf"/>",
filterValuesField: 'targetSpeciesDcfs',
},
{
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/synthesis.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/synthesis.jsp 2014-08-06 12:52:31 UTC (rev 2201)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/synthesis.jsp 2014-08-06 15:49:06 UTC (rev 2202)
@@ -64,12 +64,12 @@
},
{
filterName: 'sampleRowFilter.fishingGearDcfIds',
- filterLabel: "<s:text name="wao.ui.entity.fishingGearDCF"/>",
+ filterLabel: "<s:text name="wao.ui.entity.fishingGearDcf"/>",
filterValuesField: 'sampleRowsFilterValues.fishingGearDcfs',
},
{
filterName: 'sampleRowFilter.targetSpeciesDcfIds',
- filterLabel: "<s:text name="wao.ui.entity.targetSpeciesDCF"/>",
+ filterLabel: "<s:text name="wao.ui.entity.targetSpeciesDcf"/>",
filterValuesField: 'sampleRowsFilterValues.targetSpeciesDcfs',
},
<s:if test="obsVente">
1
0