public interface CatchBatchExtendDao extends CatchBatchDao
Modifier and Type | Field and Description |
---|---|
static String |
PMFM_ID
Property name used to walk in a sorting batch identified by a pmfm.
|
static String |
REFERENCE_TAXON_ID
Property name used to walk in a sorting batch identified by a reference
taxon.
|
TRANSFORM_NONE
Modifier and Type | Method and Description |
---|---|
SortingBatch |
createSortingBatch(SortingBatch sortingBatch,
CatchBatch parentCatchBatch)
Create a new batch
|
List<Integer> |
getAllChildrenIds(Integer batchId)
Walk throw the batch given by the id and grab ids of all his shell.
|
Integer |
getIdByFishingOperationId(Integer fishingOperationId)
Retrieve a catch batch Id, from a fishing operation id
|
Integer |
getIdBySortingBatchId(Integer sortingBatchId)
Retrieve a catch batch Id, from a sorting batch id
|
SortingMeasurement |
getInheritedSortingMeasurement(SortingBatch sortingBatch,
Integer pmfmId) |
QuantificationMeasurement |
getQuantificationMeasurement(Batch batch,
Integer pmfmId,
Integer recorderDepartmentId,
boolean createIfNotExists) |
SortingBatch |
getSortingBatch(Collection<Batch> batchs,
Object... params)
retrieve a sorting batch, from path give in params. i.e:
getSortingBatch(sortingBatchCollection, PMFM_ID, PmfmId.SEX, QualitativeValueId.FEMALE) |
SortingBatch |
getSortingBatchById(CatchBatch catchBatch,
Integer sortingBatchId)
Retrieve a child (in all tree depth) of the given catch batch, using an sorting batch id.
|
SortingMeasurement |
getSortingMeasurement(SortingBatch sortingBatch,
Integer pmfmId,
Integer recorderDepartmentId,
boolean createIfNotExists) |
boolean |
isCatchBatchExistsForFishingOperation(Integer fishingOperationId) |
CatchBatch |
loadFullTree(Integer catchBatchId)
Load a catch batch and all its childrens.
|
CatchBatch |
loadFullTree(Integer catchBatchId,
boolean validate,
boolean quickFix)
Load a catch batch and all its childrens.
|
CatchBatch |
loadFullTreeWithCache(Integer catchBatchId,
boolean useCache,
boolean forceReload)
Method typically using by other loadFullTree() methods.
|
SortingBatch |
loadSortingBatch(Integer sortingBatchId,
CatchBatch parentCatchBatch)
Load a batch.
|
void |
registerCatchBatchValidator(CatchBatchValidator validator) |
void |
remove(Integer catchBatchId)
Remove a batch and evict all the cache
|
void |
removeWithChildren(Integer batchId)
Remove a batch, with all children (could be CatchBatch or a SortingBatch)
-> Method NOT optimize for cache using in loadFullTree : will evict all the cache
|
void |
removeWithChildren(Integer batchId,
CatchBatch parentCatchBatch)
Remove a batch, with all children (could be CatchBatch or a SortingBatch)
-> Method optimize for cache using in loadFullTree()
|
QuantificationMeasurement |
setQuantificationMeasurement(Batch batch,
Integer pmfmId,
Integer recorderDepartmentId,
Float weightValue,
boolean isReferenceQuantitification) |
void |
setSortingBatchReferenceTaxon(String batchId,
Integer referenceTaxonId)
Change the species of a batch.
-> Method NOT optimize for cache using in loadFullTree : will evict all the cache
|
void |
unregisterCatchBatchValidator(CatchBatchValidator validator) |
void |
update(CatchBatch catchBatch)
Updates the
catchBatch instance in the persistent store. |
void |
updateSortingBatch(List<SortingBatch> sortingBatchs,
CatchBatch parentCatchBatch) |
void |
updateSortingBatch(SortingBatch sortingBatch,
CatchBatch parentCatchBatch) |
List<CatchBatchValidationError> |
validate(CatchBatch catchBatch)
Validate a catch batch, using all registered validators that are enable for this catchBatch
|
static final String PMFM_ID
getSortingBatch(Collection, Object...)
,
Constant Field Valuesstatic final String REFERENCE_TAXON_ID
getSortingBatch(Collection, Object...)
,
Constant Field Valuesvoid registerCatchBatchValidator(CatchBatchValidator validator)
void unregisterCatchBatchValidator(CatchBatchValidator validator)
CatchBatch loadFullTree(Integer catchBatchId)
catchBatchId
- id of the catch batch to loadCatchBatch loadFullTree(Integer catchBatchId, boolean validate, boolean quickFix) throws CatchBatchValidationException
catchBatchId
- id of the catch batch to loadvalidate
- if true, method validate() is typically calledquickFix
- if true, will try to quick fix validation errorCatchBatchValidationException
- only if valaidate = true, and error found (with gravity ERROR or FATAL)@Cacheable(value="fr.ifremer.adagio.core.dao.data.batch.CatchBatchCache", key="#catchBatchId", condition="#useCache == true") @CacheEvict(value="fr.ifremer.adagio.core.dao.data.batch.CatchBatchCache", beforeInvocation=true, key="#catchBatchId", condition="#useCache==true and #forceReload==true") CatchBatch loadFullTreeWithCache(Integer catchBatchId, boolean useCache, boolean forceReload)
catchBatchId
- id of the catch batch to loaduseCache
- must the be enable ?forceReload
- is cache is enable, force a eviction to refresh the cacheList<CatchBatchValidationError> validate(CatchBatch catchBatch)
catchBatch
- batch to validateSortingBatch getSortingBatch(Collection<Batch> batchs, Object... params)
batchs
- incoming batchs to filterparams
- SortingBatch getSortingBatchById(CatchBatch catchBatch, Integer sortingBatchId)
catchBatch
- sortingBatchId
- id of the sorting batch to retrieveDataRetrievalFailureException
- if the sorting batch could not be foundboolean isCatchBatchExistsForFishingOperation(Integer fishingOperationId)
fishingOperationId
- id of the fishing operationtrue
if there is a catchBatch for the given fishing
operation, false
otherwise.Integer getIdByFishingOperationId(Integer fishingOperationId) throws DataRetrievalFailureException
fishingOperationId
- id of the fishing operationDataRetrievalFailureException
- if catch batch id not foundInteger getIdBySortingBatchId(Integer sortingBatchId) throws DataRetrievalFailureException
sortingBatchId
- DataRetrievalFailureException
- if catch batch id not found@CacheEvict(value="fr.ifremer.adagio.core.dao.data.batch.CatchBatchCache", key="#parentCatchBatch.id") void removeWithChildren(Integer batchId, CatchBatch parentCatchBatch)
batchId
- id of the batch to remove@CacheEvict(value="fr.ifremer.adagio.core.dao.data.batch.CatchBatchCache", allEntries=true) void removeWithChildren(Integer batchId)
batchId
- id of the batch to remove@CacheEvict(value="fr.ifremer.adagio.core.dao.data.batch.CatchBatchCache", allEntries=true) void remove(Integer catchBatchId)
remove
in interface CatchBatchDao
catchBatchId
- id of the catch batch to removeList<Integer> getAllChildrenIds(Integer batchId)
batchId
- id of the batch to scanSortingMeasurement getSortingMeasurement(SortingBatch sortingBatch, Integer pmfmId, Integer recorderDepartmentId, boolean createIfNotExists)
QuantificationMeasurement getQuantificationMeasurement(Batch batch, Integer pmfmId, Integer recorderDepartmentId, boolean createIfNotExists)
QuantificationMeasurement setQuantificationMeasurement(Batch batch, Integer pmfmId, Integer recorderDepartmentId, Float weightValue, boolean isReferenceQuantitification)
SortingMeasurement getInheritedSortingMeasurement(SortingBatch sortingBatch, Integer pmfmId)
@CacheEvict(value="fr.ifremer.adagio.core.dao.data.batch.CatchBatchCache", allEntries=true) void setSortingBatchReferenceTaxon(String batchId, Integer referenceTaxonId)
batchId
- referenceTaxonId
- @CacheEvict(value="fr.ifremer.adagio.core.dao.data.batch.CatchBatchCache", key="#catchBatch.id") void update(CatchBatch catchBatch)
CatchBatchDao
catchBatch
instance in the persistent store.update
in interface CatchBatchDao
@CacheEvict(value="fr.ifremer.adagio.core.dao.data.batch.CatchBatchCache", key="#parentCatchBatch.id") SortingBatch createSortingBatch(SortingBatch sortingBatch, CatchBatch parentCatchBatch)
sortingBatch
- parentCatchBatch
- SortingBatch loadSortingBatch(Integer sortingBatchId, CatchBatch parentCatchBatch)
sortingBatchId
- parentCatchBatch
- @CacheEvict(value="fr.ifremer.adagio.core.dao.data.batch.CatchBatchCache", key="#parentCatchBatch.id") void updateSortingBatch(SortingBatch sortingBatch, CatchBatch parentCatchBatch)
@CacheEvict(value="fr.ifremer.adagio.core.dao.data.batch.CatchBatchCache", key="#parentCatchBatch.id") void updateSortingBatch(List<SortingBatch> sortingBatchs, CatchBatch parentCatchBatch)
Copyright © 2012–2014 IFREMER. All rights reserved.