Untitled
unknown
plain_text
a year ago
889 B
10
Indexable
/**
* Updates the flag Policy.PolicyFlagForBulkChangeEU`` if specific conditions are `met.`
*
*/
public void updatePolicyFlagIfNeeded(PolicyVO newPolicy) {
// Retrieve the 'IS_MIGRATION_RUNNING' attribute from the environment's unit of work.
// This attribute can be null, so we use Boolean.TRUE.equals() to safely check if it's true.
boolean isMigrationRunning = Boolean.TRUE.equals(getEnv().getUnitOfWork().getAttribute(CommonConstantsHXDE.IS_MIGRATION_RUNNING));
// If migration is running, exit the method early. No need to process further.
if (isMigrationRunning) {
return;
}
// Cast the provided newPolicy object to PolicyHXDEVO.
PolicyHXDEVO policy = (PolicyHXDEVO) newPolicy;
// I think we don't need the rest of the conditions, unless I've missed something.
policy.setPolicyFlagForBulkChangeEU(Boolean.FALSE);
}Editor is loading...
Leave a Comment