Author: tchemit Date: 2013-04-04 09:48:18 +0200 (Thu, 04 Apr 2013) New Revision: 727 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/727 Log: do not persist tremis and carroussel weights Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/CatchBatchPersistenceServiceImpl.java Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/CatchBatchPersistenceServiceImpl.java =================================================================== --- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/CatchBatchPersistenceServiceImpl.java 2013-04-04 07:47:59 UTC (rev 726) +++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/CatchBatchPersistenceServiceImpl.java 2013-04-04 07:48:18 UTC (rev 727) @@ -231,7 +231,7 @@ if (speciesBatch != null) { if (log.isInfoEnabled()) { - log.info("Loaded CatchBatch Hors Vrac> Species: " + speciesBatch.getId()); + log.info("Loaded CatchBatch Hors Vrac > Species: " + speciesBatch.getId()); } } @@ -245,7 +245,7 @@ if (benthosBatch != null) { if (log.isInfoEnabled()) { - log.info("Loaded CatchBatch Hors Vrac> Benthos: " + benthosBatch.getId()); + log.info("Loaded CatchBatch Hors Vrac > Benthos: " + benthosBatch.getId()); } } @@ -259,7 +259,7 @@ if (marineLitterBatch != null) { if (log.isInfoEnabled()) { - log.info("Loaded CatchBatch Hors Vrac> MarineLitter: " + marineLitterBatch.getId()); + log.info("Loaded CatchBatch Hors Vrac > MarineLitter: " + marineLitterBatch.getId()); } result.setMarineLitterTotalWeight(marineLitterBatch.getWeight()); @@ -373,13 +373,10 @@ if (quantificationMeasurements != null) { quantificationMeasurements.removeAll(notChangedQuantificationMeasurements); } -// if (target.getQuantificationMeasurements() != null && notChangedQuantificationMeasurements.size() > 0) { -// for (QuantificationMeasurement qm : notChangedQuantificationMeasurements) { -// target.getQuantificationMeasurements().remove(qm); -// } -// } - Map<Integer, SortingBatch> catchBatchChilds = getChildsMap(target, enumeration.PMFM_ID_SORTED_UNSORTED); + Map<Integer, SortingBatch> catchBatchChilds = getChildsMap( + target, enumeration.PMFM_ID_SORTED_UNSORTED); + // ----------------------------------------------------------------------------- // Vrac // ----------------------------------------------------------------------------- @@ -389,18 +386,17 @@ batch = SortingBatch.Factory.newInstance(); target.getChildBatchs().add(batch); } - //FIXME-TC what is the point catchTotalSortedCarousselWeight and catchTotalSortedTremisWeight ? + beanToEntitySortingBatch(target, target, batch, recorderDepartmentId, enumeration.PMFM_ID_SORTED_UNSORTED, enumeration.QUALITATIVE_VRAC_ID, - source.getCatchTotalSortedCarousselWeight(), - source.getCatchTotalSortedTremisWeight()); + null, + null); batch.setRankOrder((short) 1); - // Manage childs : { if (batch.getChildBatchs() == null) { batch.setChildBatchs(Lists.<Batch>newArrayList()); @@ -608,7 +604,6 @@ null); batch.setRankOrder((short) 2); - // Manage childs : { Map<Integer, SortingBatch> batchChilds = getChildsMap(batch, enumeration.PMFM_ID_SORTING_TYPE); @@ -699,7 +694,6 @@ source.getCatchTotalRejectedWeight(), null); unsortedBatch.setRankOrder((short) 3); - } protected Map<Integer, SortingBatch> getChildsMap(Batch parentBatch, Integer pmfmId) {