Class SetExpirationDateOnOutputJobEntityListener
java.lang.Object
ch.tocco.nice2.outputcenter.impl.entitylistener.SetExpirationDateOnOutputJobEntityListener
- All Implemented Interfaces:
EntityFacadeListener
,EventListener
public class SetExpirationDateOnOutputJobEntityListener
extends Object
implements EntityFacadeListener
Sets the 'expiration_date' field depending on the boolean field 'archive'.
On false set the date to (now + daysTillExpiration).
On true set the date to null.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Fired when a relation of an entity has been changed.void
setDaysTillExpiration
(int daysTillExpiration) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.entity.events.EntityFacadeListener
entityChanging, entityCreating, entityDeleting, entityReceivedValues, handleSessionOnlyEntity
-
Constructor Details
-
SetExpirationDateOnOutputJobEntityListener
-
-
Method Details
-
entityRelationChanging
Description copied from interface:EntityFacadeListener
Fired when a relation of an entity has been changed.- Specified by:
entityRelationChanging
in interfaceEntityFacadeListener
- Parameters:
event
- The event object.
-
setDaysTillExpiration
@Value("${nice2.outputcenter.daysTillExpiration}") public void setDaysTillExpiration(int daysTillExpiration)
-