From tchemit@users.forge.codelutin.com Wed Apr  9 10:08:55 2014
From: tchemit@users.forge.codelutin.com
To: tutti-commits@list.forge.codelutin.com
Subject: [Tutti-commits] r1682 -
	trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic
Date: Wed, 09 Apr 2014 10:08:55 +0200
Message-ID: <20140409080855.1247D181506@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0606640309250202360=="

--===============0606640309250202360==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Author: tchemit
Date: 2014-04-09 10:08:54 +0200 (Wed, 09 Apr 2014)
New Revision: 1682

Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1682

Log:
fixes #4904 [EXPORT GENERIQUE] Les cat?\195?\169gorisations ne sont pas bien =
export?\195?\169es (table catch)

Modified:
   trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic/=
CatchExportModel.java
   trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic/=
CatchExportRow.java

Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/g=
eneric/CatchExportModel.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic=
/CatchExportModel.java	2014-03-31 08:18:54 UTC (rev 1681)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic=
/CatchExportModel.java	2014-04-09 08:08:54 UTC (rev 1682)
@@ -77,7 +77,16 @@
         newColumnForExport("Commentaire", SpeciesBatch.PROPERTY_COMMENT, Tut=
tiCsvUtil.COMMENT_FORMATTER);
=20
         for (SampleCategoryModelEntry entry : sampleCategoryModel.getCategor=
y()) {
-            addSampleCategory(entry.getCanonicalLabel(), entry.getOrder());
+
+            String headerPrefix =3D entry.getCanonicalLabel();
+            int categoryOrder =3D entry.getOrder();
+            String categoryName =3D CatchExportRow.SAMPLE_CATEGORY;
+            newIndexNullableColumnForExport(headerPrefix, categoryName, cate=
goryOrder, ExportSampleCategory.PROPERTY_CATEGORY_VALUE, TuttiCsvUtil.CARACTE=
RISTIC_VALUE_FORMATTER);
+            newIndexNullableColumnForExport("Num_Ordre_" + headerPrefix + "_=
H2", categoryName, categoryOrder, ExportSampleCategory.PROPERTY_RANK_ORDER, T=
uttiCsvUtil.INTEGER);
+            newIndexNullableColumnForExport("Tot_" + headerPrefix, categoryN=
ame, categoryOrder, ExportSampleCategory.PROPERTY_CATEGORY_WEIGHT, TuttiCsvUt=
il.FLOAT);
+            newIndexNullableColumnForExport("Ech_" + headerPrefix, categoryN=
ame, categoryOrder, ExportSampleCategory.PROPERTY_SAMPLE_WEIGHT, TuttiCsvUtil=
.FLOAT);
+            newIndexNullableColumnForExport("Type_Volume_Poids_" + headerPre=
fix, categoryName, categoryOrder, ExportSampleCategory.PROPERTY_WEIGHT_OR_VOL=
_TYPE);
+            newNullableColumnForExport("Unite_Volume_Poids_" + headerPrefix,=
 CatchExportRow.BATCH_WEIGHT_UNIT);
         }
=20
         // mensuration
@@ -128,33 +137,13 @@
             float totalBatchWeight =3D batchWeight =3D=3D null ? 0 : species=
CatchRaisingFactor *
                                                                batchWeight;
=20
-            prepareRows(persistenceService,
-                        row,
-                        rows,
-                        speciesBatch,
-                        totalBatchWeight);
-
-//            if (persistenceService.isVracBatch(speciesBatch)) {
-//
-//                // compute species total weight in catch
-//
-//                Float sortedBatchWeight =3D TuttiEntities.getValueOrComput=
edValue(
-//                        speciesBatch.getSampleCategoryWeight(),
-//                        speciesBatch.getSampleCategoryComputedWeight());
-//
-//                float totalBatchWeight =3D sortedBatchWeight =3D=3D null ?=
 0 : speciesCatchRaisingFactor *
-//                                                                         s=
ortedBatchWeight;
-//
-//                prepareSortedRows(persistenceService,
-//                                  row,
-//                                  rows,
-//                                  speciesBatch,
-//                                  totalBatchWeight);
-//            } else {
-//                prepareUnsortedRows(row, rows, speciesBatch);
-//            }
-
+            addSpeciesBatch(persistenceService,
+                            row,
+                            rows,
+                            speciesBatch,
+                            totalBatchWeight);
         }
+
         for (BenthosBatch benthosBatch : rootBenthosBatch.getChildren()) {
             CatchExportRow row =3D new CatchExportRow();
             row.setCruise(cruise);
@@ -175,31 +164,11 @@
             float totalBatchWeight =3D batchWeight =3D=3D null ? 0 : benthos=
CatchRaisingFactor *
                                                                batchWeight;
=20
-            prepareRows(persistenceService,
-                        row,
-                        rows,
-                        benthosBatch,
-                        totalBatchWeight);
-
-//            if (persistenceService.isVracBatch(benthosBatch)) {
-//
-//                // compute species total weight in catch
-//
-//                Float sortedBatchWeight =3D TuttiEntities.getValueOrComput=
edValue(
-//                        benthosBatch.getSampleCategoryWeight(),
-//                        benthosBatch.getSampleCategoryComputedWeight());
-//
-//                float totalBatchWeight =3D sortedBatchWeight =3D=3D null ?=
 0 : benthosCatchRaisingFactor *
-//                                                                         s=
ortedBatchWeight;
-//
-//                prepareSortedRows(persistenceService,
-//                                  row,
-//                                  rows,
-//                                  benthosBatch,
-//                                  totalBatchWeight);
-//            } else {
-//                prepareUnsortedRows(row, rows, benthosBatch);
-//            }
+            addBenthosBatch(persistenceService,
+                            row,
+                            rows,
+                            benthosBatch,
+                            totalBatchWeight);
         }
=20
         // compute final raising factor
@@ -226,24 +195,24 @@
         }
     }
=20
-    protected void prepareRows(PersistenceService persistenceService,
-                               CatchExportRow currentRow,
-                               List<CatchExportRow> rows,
-                               SpeciesBatch speciesBatch,
-                               float totalBatchWeight) {
+    protected void addSpeciesBatch(PersistenceService persistenceService,
+                                   CatchExportRow currentRow,
+                                   List<CatchExportRow> rows,
+                                   SpeciesBatch speciesBatch,
+                                   float totalBatchWeight) {
=20
         currentRow.addComment(speciesBatch.getComment());
=20
         Integer number =3D TuttiEntities.getValueOrComputedValue(speciesBatc=
h.getNumber(),
                                                                speciesBatch.=
getComputedNumber());
-        prepareBatch(currentRow,
-                     speciesBatch.getSampleCategoryId(),
-                     speciesBatch.getSampleCategoryValue(),
-                     speciesBatch.getSampleCategoryWeight(),
-                     speciesBatch.getSampleCategoryComputedWeight(),
-                     speciesBatch.getWeight(),
-                     number,
-                     speciesBatch.getRankOrder());
+        addBatchSampleCategory(currentRow,
+                               speciesBatch.getSampleCategoryId(),
+                               speciesBatch.getSampleCategoryValue(),
+                               speciesBatch.getSampleCategoryWeight(),
+                               speciesBatch.getSampleCategoryComputedWeight(=
),
+                               speciesBatch.getWeight(),
+                               number,
+                               speciesBatch.getRankOrder());
=20
         if (speciesBatch.isChildBatchsEmpty()) {
=20
@@ -314,24 +283,23 @@
         } else {
=20
             for (SpeciesBatch childBatch : speciesBatch.getChildBatchs()) {
-                prepareRows(persistenceService,
-                            currentRow,
-                            rows,
-                            childBatch,
-                            totalBatchWeight
+                // always use a copy, otherwise sample categories can be sha=
red by brothers
+                CatchExportRow childRow =3D currentRow.copy();
+                addSpeciesBatch(persistenceService,
+                                childRow,
+                                rows,
+                                childBatch,
+                                totalBatchWeight
                 );
             }
         }
-
-        // remove last comment (otherwise next brother will have this one to=
o...)
-        currentRow.popLastComment();
     }
=20
-    protected void prepareRows(PersistenceService persistenceService,
-                               CatchExportRow currentRow,
-                               List<CatchExportRow> rows,
-                               BenthosBatch benthosBatch,
-                               final float totalBatchWeight) {
+    protected void addBenthosBatch(PersistenceService persistenceService,
+                                   CatchExportRow currentRow,
+                                   List<CatchExportRow> rows,
+                                   BenthosBatch benthosBatch,
+                                   final float totalBatchWeight) {
=20
         currentRow.addComment(benthosBatch.getComment());
=20
@@ -339,14 +307,14 @@
                 benthosBatch.getNumber(),
                 benthosBatch.getComputedNumber());
=20
-        prepareBatch(currentRow,
-                     benthosBatch.getSampleCategoryId(),
-                     benthosBatch.getSampleCategoryValue(),
-                     benthosBatch.getSampleCategoryWeight(),
-                     benthosBatch.getSampleCategoryComputedWeight(),
-                     benthosBatch.getWeight(),
-                     number,
-                     benthosBatch.getRankOrder());
+        addBatchSampleCategory(currentRow,
+                               benthosBatch.getSampleCategoryId(),
+                               benthosBatch.getSampleCategoryValue(),
+                               benthosBatch.getSampleCategoryWeight(),
+                               benthosBatch.getSampleCategoryComputedWeight(=
),
+                               benthosBatch.getWeight(),
+                               number,
+                               benthosBatch.getRankOrder());
=20
         if (benthosBatch.isChildBatchsEmpty()) {
=20
@@ -417,275 +385,17 @@
         } else {
=20
             for (BenthosBatch childBatch : benthosBatch.getChildBatchs()) {
-                prepareRows(persistenceService,
-                            currentRow,
-                            rows,
-                            childBatch,
-                            totalBatchWeight);
+                // always use a copy, otherwise sample categories can be sha=
red by brothers
+                CatchExportRow childRow =3D currentRow.copy();
+                addBenthosBatch(persistenceService,
+                                childRow,
+                                rows,
+                                childBatch,
+                                totalBatchWeight);
             }
         }
-
-        // remove last comment (otherwise next brother will have this one to=
o...)
-        currentRow.popLastComment();
     }
=20
-//    protected void prepareSortedRows(PersistenceService persistenceService,
-//                                     CatchExportRow currentRow,
-//                                     List<CatchExportRow> rows,
-//                                     SpeciesBatch speciesBatch,
-//                                     float totalBatchWeight) {
-//
-//        currentRow.addComment(speciesBatch.getComment());
-//
-//        Integer number =3D TuttiEntities.getValueOrComputedValue(speciesBa=
tch.getNumber(),
-//                                                               speciesBatc=
h.getComputedNumber());
-//        prepareBatch(currentRow,
-//                     speciesBatch.getSampleCategoryId(),
-//                     speciesBatch.getSampleCategoryValue(),
-//                     speciesBatch.getSampleCategoryWeight(),
-//                     speciesBatch.getSampleCategoryComputedWeight(),
-//                     speciesBatch.getWeight(),
-//                     number,
-//                     speciesBatch.getRankOrder());
-//
-//        if (speciesBatch.isChildBatchsEmpty()) {
-//
-//            // on a leaf, get frequencies
-//
-//            List<SpeciesBatchFrequency> speciesBatchFrequency =3D
-//                    persistenceService.getAllSpeciesBatchFrequency(species=
Batch.getId());
-//
-//            if (CollectionUtils.isEmpty(speciesBatchFrequency)) {
-//
-//                // no frequency
-//
-//                CatchExportRow row =3D currentRow.copy();
-//
-//                // Get reference weight
-//
-//                Float referenceWeight =3D TuttiEntities.getValueOrComputed=
Value(
-//                        speciesBatch.getWeight(),
-//                        speciesBatch.getComputedWeight());
-//
-//                if (referenceWeight =3D=3D null) {
-//
-//                    referenceWeight =3D TuttiEntities.getValueOrComputedVa=
lue(
-//                            speciesBatch.getSampleCategoryWeight(),
-//                            speciesBatch.getSampleCategoryComputedWeight()=
);
-//                }
-//                setRaisingFactor(row, totalBatchWeight, referenceWeight);
-//                rows.add(row);
-//            } else {
-//
-//                // there is some frequencies
-//
-//                boolean withNoWeightOnFrequencies =3D
-//                        speciesBatchFrequency.get(0).getWeight() =3D=3D nu=
ll;
-//
-//                Float referenceWeight =3D null;
-//
-//                if (withNoWeightOnFrequencies) {
-//
-//                    // no weight on frequencies use upper reference weight
-//
-//                    referenceWeight =3D TuttiEntities.getValueOrComputedVa=
lue(
-//                            speciesBatch.getWeight(),
-//                            speciesBatch.getComputedWeight());
-//
-//                    if (referenceWeight =3D=3D null) {
-//                        referenceWeight =3D TuttiEntities.getValueOrComput=
edValue(
-//                                speciesBatch.getSampleCategoryWeight(),
-//                                speciesBatch.getSampleCategoryComputedWeig=
ht());
-//                    }
-//                }
-//
-//                for (SpeciesBatchFrequency batchFrequency : speciesBatchFr=
equency) {
-//                    CatchExportRow row =3D currentRow.copy();
-//                    row.setSpeciesFrequency(batchFrequency);
-//                    rows.add(row);
-//
-//                    if (!withNoWeightOnFrequencies) {
-//
-//                        // use concrete frequency weight
-//                        referenceWeight =3D batchFrequency.getWeight();
-//                    }
-//
-//                    setRaisingFactor(row, totalBatchWeight, referenceWeigh=
t);
-//                }
-//            }
-//
-//        } else {
-//
-//            for (SpeciesBatch childBatch : speciesBatch.getChildBatchs()) {
-//                prepareSortedRows(persistenceService,
-//                                  currentRow,
-//                                  rows,
-//                                  childBatch,
-//                                  totalBatchWeight
-//                );
-//            }
-//        }
-//
-//        // remove last comment (otherwise next brother will have this one =
too...)
-//        currentRow.popLastComment();
-//    }
-
-//    protected void prepareUnsortedRows(CatchExportRow currentRow,
-//                                       List<CatchExportRow> rows,
-//                                       SpeciesBatch speciesBatch) {
-//        Integer number =3D TuttiEntities.getValueOrComputedValue(speciesBa=
tch.getNumber(),
-//                                                               speciesBatc=
h.getComputedNumber());
-//
-//        prepareBatch(currentRow,
-//                     speciesBatch.getSampleCategoryId(),
-//                     speciesBatch.getSampleCategoryValue(),
-//                     speciesBatch.getSampleCategoryWeight(),
-//                     speciesBatch.getSampleCategoryComputedWeight(),
-//                     speciesBatch.getWeight(),
-//                     number,
-//                     speciesBatch.getRankOrder());
-//
-//        CatchExportRow row =3D currentRow.copy();
-//        row.addComment(speciesBatch.getComment());
-//        float referenceWeight =3D TuttiEntities.getValueOrComputedValue(
-//                speciesBatch.getSampleCategoryWeight(),
-//                speciesBatch.getSampleCategoryComputedWeight());
-//
-//        setRaisingFactor(row, referenceWeight, referenceWeight);
-//        rows.add(row);
-//    }
-
-//    protected void prepareSortedRows(PersistenceService persistenceService,
-//                                     CatchExportRow currentRow,
-//                                     List<CatchExportRow> rows,
-//                                     BenthosBatch benthosBatch,
-//                                     final float totalBatchWeight) {
-//
-//        currentRow.addComment(benthosBatch.getComment());
-//
-//        Integer number =3D TuttiEntities.getValueOrComputedValue(
-//                benthosBatch.getNumber(),
-//                benthosBatch.getComputedNumber());
-//
-//        prepareBatch(currentRow,
-//                     benthosBatch.getSampleCategoryId(),
-//                     benthosBatch.getSampleCategoryValue(),
-//                     benthosBatch.getSampleCategoryWeight(),
-//                     benthosBatch.getSampleCategoryComputedWeight(),
-//                     benthosBatch.getWeight(),
-//                     number,
-//                     benthosBatch.getRankOrder());
-//
-//        if (benthosBatch.isChildBatchsEmpty()) {
-//
-//            // on a leaf, get frequencies
-//
-//            List<BenthosBatchFrequency> benthosBatchFrequency =3D
-//                    persistenceService.getAllBenthosBatchFrequency(benthos=
Batch.getId());
-//
-//            if (CollectionUtils.isEmpty(benthosBatchFrequency)) {
-//
-//                // no frequency
-//
-//                CatchExportRow row =3D currentRow.copy();
-//
-//                // Get reference weight
-//
-//                Float referenceWeight =3D TuttiEntities.getValueOrComputed=
Value(
-//                        benthosBatch.getWeight(),
-//                        benthosBatch.getComputedWeight());
-//
-//                if (referenceWeight =3D=3D null) {
-//                    referenceWeight =3D TuttiEntities.getValueOrComputedVa=
lue(
-//                            benthosBatch.getSampleCategoryWeight(),
-//                            benthosBatch.getSampleCategoryComputedWeight()=
);
-//                }
-//
-//                setRaisingFactor(row, totalBatchWeight, referenceWeight);
-//                rows.add(row);
-//            } else {
-//
-//                // there is some frequencies
-//
-//                Float referenceWeight =3D null;
-//
-//                boolean withNoWeightOnFrequencies =3D
-//                        benthosBatchFrequency.get(0).getWeight() =3D=3D nu=
ll;
-//
-//                if (withNoWeightOnFrequencies) {
-//
-//                    // no weight on frequencies use upper reference weight
-//
-//                    referenceWeight =3D TuttiEntities.getValueOrComputedVa=
lue(
-//                            benthosBatch.getWeight(),
-//                            benthosBatch.getComputedWeight());
-//
-//                    if (referenceWeight =3D=3D null) {
-//                        referenceWeight =3D TuttiEntities.getValueOrComput=
edValue(
-//                                benthosBatch.getSampleCategoryWeight(),
-//                                benthosBatch.getSampleCategoryComputedWeig=
ht());
-//                    }
-//                }
-//
-//                for (BenthosBatchFrequency batchFrequency : benthosBatchFr=
equency) {
-//                    CatchExportRow row =3D currentRow.copy();
-//                    row.setBenthosFrequency(batchFrequency);
-//                    rows.add(row);
-//
-//                    if (!withNoWeightOnFrequencies) {
-//
-//                        // use concrete frequency weight
-//                        referenceWeight =3D batchFrequency.getWeight();
-//                    }
-//
-//                    setRaisingFactor(row, totalBatchWeight, referenceWeigh=
t);
-//                }
-//            }
-//
-//        } else {
-//
-//            for (BenthosBatch childBatch : benthosBatch.getChildBatchs()) {
-//                prepareSortedRows(persistenceService,
-//                                  currentRow,
-//                                  rows,
-//                                  childBatch,
-//                                  totalBatchWeight);
-//            }
-//        }
-//
-//        // remove last comment (otherwise next brother will have this one =
too...)
-//        currentRow.popLastComment();
-//    }
-//
-//    protected void prepareUnsortedRows(CatchExportRow currentRow,
-//                                       List<CatchExportRow> rows,
-//                                       BenthosBatch benthosBatch) {
-//
-//        Integer number =3D TuttiEntities.getValueOrComputedValue(
-//                benthosBatch.getNumber(),
-//                benthosBatch.getComputedNumber());
-//
-//        prepareBatch(currentRow,
-//                     benthosBatch.getSampleCategoryId(),
-//                     benthosBatch.getSampleCategoryValue(),
-//                     benthosBatch.getSampleCategoryWeight(),
-//                     benthosBatch.getSampleCategoryComputedWeight(),
-//                     benthosBatch.getWeight(),
-//                     number,
-//                     benthosBatch.getRankOrder());
-//
-//        CatchExportRow row =3D currentRow.copy();
-//        row.addComment(benthosBatch.getComment());
-//
-//        Float referenceWeight =3D TuttiEntities.getValueOrComputedValue(
-//                benthosBatch.getSampleCategoryWeight(),
-//                benthosBatch.getSampleCategoryComputedWeight());
-//
-//        setRaisingFactor(row, referenceWeight, referenceWeight);
-//
-//        rows.add(row);
-//    }
-
     protected void setRaisingFactor(CatchExportRow row,
                                     float totalBatchWeight,
                                     Float referenceWeight) {
@@ -693,14 +403,14 @@
         row.setRaisingFactor(referenceWeight =3D=3D null ? 1.0f : (totalBatc=
hWeight / referenceWeight));
     }
=20
-    protected void prepareBatch(CatchExportRow currentRow,
-                                Integer sampleCategoryId,
-                                Serializable sampleCategoryValue,
-                                Float sampleCategoryWeight,
-                                Float sampleCategoryComputedWeight,
-                                Float batchWeight,
-                                Integer batchNumber,
-                                Integer batchRankOrder) {
+    protected void addBatchSampleCategory(CatchExportRow currentRow,
+                                          Integer sampleCategoryId,
+                                          Serializable sampleCategoryValue,
+                                          Float sampleCategoryWeight,
+                                          Float sampleCategoryComputedWeight,
+                                          Float batchWeight,
+                                          Integer batchNumber,
+                                          Integer batchRankOrder) {
         currentRow.setBatchNumber(batchNumber);
=20
         ExportSampleCategory<Serializable> sampleCategory =3D
@@ -718,16 +428,4 @@
=20
         currentRow.addSampleCategory(sampleCategory);
     }
-
-    protected void addSampleCategory(String headerPrefix, int categoryOrder)=
 {
-
-        String categoryName =3D CatchExportRow.SAMPLE_CATEGORY;
-        newIndexNullableColumnForExport(headerPrefix, categoryName, category=
Order, ExportSampleCategory.PROPERTY_CATEGORY_VALUE, TuttiCsvUtil.CARACTERIST=
IC_VALUE_FORMATTER);
-        newIndexNullableColumnForExport("Num_Ordre_" + headerPrefix + "_H2",=
 categoryName, categoryOrder, ExportSampleCategory.PROPERTY_RANK_ORDER, Tutti=
CsvUtil.INTEGER);
-        newIndexNullableColumnForExport("Tot_" + headerPrefix, categoryName,=
 categoryOrder, ExportSampleCategory.PROPERTY_CATEGORY_WEIGHT, TuttiCsvUtil.F=
LOAT);
-        newIndexNullableColumnForExport("Ech_" + headerPrefix, categoryName,=
 categoryOrder, ExportSampleCategory.PROPERTY_SAMPLE_WEIGHT, TuttiCsvUtil.FLO=
AT);
-        newIndexNullableColumnForExport("Type_Volume_Poids_" + headerPrefix,=
 categoryName, categoryOrder, ExportSampleCategory.PROPERTY_WEIGHT_OR_VOL_TYP=
E);
-        newNullableColumnForExport("Unite_Volume_Poids_" + headerPrefix, Cat=
chExportRow.BATCH_WEIGHT_UNIT);
-    }
-
 }
\ No newline at end of file

Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/g=
eneric/CatchExportRow.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic=
/CatchExportRow.java	2014-03-31 08:18:54 UTC (rev 1681)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic=
/CatchExportRow.java	2014-04-09 08:08:54 UTC (rev 1682)
@@ -26,7 +26,6 @@
=20
 import com.google.common.base.Joiner;
 import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
 import fr.ifremer.tutti.persistence.entities.data.BenthosBatchFrequency;
 import fr.ifremer.tutti.persistence.entities.data.Cruise;
 import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
@@ -40,6 +39,7 @@
 import org.apache.commons.logging.LogFactory;
=20
 import java.io.Serializable;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
=20
@@ -82,7 +82,7 @@
=20
     protected FishingOperation fishingOperation;
=20
-    protected final List<ExportSampleCategory> sampleCategory =3D Lists.newL=
inkedList();
+    protected final List<ExportSampleCategory> sampleCategory =3D new ArrayL=
ist<>();
=20
     protected SpeciesBatchFrequency speciesFrequency;
=20
@@ -100,7 +100,7 @@
=20
     protected String batchWeightUnit;
=20
-    protected final List<String> comment =3D Lists.newArrayList();
+    protected final List<String> comment =3D new ArrayList<>();
=20
     public void setCruise(Cruise cruise) {
         this.cruise =3D cruise;
@@ -249,12 +249,6 @@
         this.comment.add(safeComment);
     }
=20
-    public void popLastComment() {
-        if (!comment.isEmpty()) {
-            this.comment.remove(this.comment.size() - 1);
-        }
-    }
-
     public String getComment() {
         String result;
         if (comment.isEmpty()) {


--===============0606640309250202360==--


