@AccessLevel(value=EXTERNAL) @Implementable public class CREOLECustomCaseGroupsMaintainerImpl extends java.lang.Object implements CREOLECustomCaseGroupsMaintainer
CREOLECaseGroupsMaintainer
that writes
eligible decisions to
nonmagieligibility
on activation and change of decision. The
approach taken is to store only the latest decision by deleting existing
records by case and concern then inserting the latest details.
To avoid triggering unnecessary reassessments, database records that are
identical to those being persisted are are not deleted and re-inserted, but
instead, left as is.
This implementation will persist the eligibility details from the
following products.
nonmagieligibility
but
want to change the delivered behaviour in one of two ways:
#useExpectedEndDateForOpenEndedCases()
:
defaults to true meaning the nonmagieligibility.enddate will be set with the
expected end date if it is open ended.#shouldPersist(long)
:
override this to control which cases will be persisted.Constructor and Description |
---|
CREOLECustomCaseGroupsMaintainerImpl() |
Modifier and Type | Method and Description |
---|---|
protected curam.util.type.Date |
getExpectedEndDate(long pdCaseID)
Helper method to return the expected end date for the product delivery
case.
|
protected java.lang.String |
getProductName(java.lang.Long pdCaseID)
Helper method to return the String product name code for the product
delivery case.
|
void |
maintainCustomCaseGroups(long pdCaseID,
java.util.Set<curam.core.struct.CaseGroupDetails> eligibleMembers)
See class level comments for the strategy employed for persisting
decisions.
|
protected boolean |
shouldPersist(long productDeliveryCaseID)
Return true if the eligibility for the case identified by
productDeliveryCaseID should be persisted, false otherwise. |
protected boolean |
useExpectedEndDateForOpenEndedCases()
Defaults to true.
|
public CREOLECustomCaseGroupsMaintainerImpl()
public void maintainCustomCaseGroups(long pdCaseID, java.util.Set<curam.core.struct.CaseGroupDetails> eligibleMembers) throws curam.util.exception.AppException, curam.util.exception.InformationalException
maintainCustomCaseGroups
in interface CREOLECustomCaseGroupsMaintainer
productDeliveryCaseID
- Long.Set
- of CaseGroupsDtls
curam.util.exception.AppException
curam.util.exception.InformationalException
protected boolean useExpectedEndDateForOpenEndedCases()
protected boolean shouldPersist(long productDeliveryCaseID)
productDeliveryCaseID
should be persisted, false otherwise.
This method returns true if the product name of the case identified by
productDeliveryCaseID
is one of the following:
productDeliveryCaseID
- Long.protected java.lang.String getProductName(java.lang.Long pdCaseID)
pdCaseID
- Long product delivery case ID.PRODUCTNAME
code.protected curam.util.type.Date getExpectedEndDate(long pdCaseID)
pdCaseID
- Long ID of product delivery case.