Annotation Interface ActiveFlag


@Target(FIELD) @Retention(RUNTIME) @Documented public @interface ActiveFlag

The ActiveFlag annotation can be placed to an entity field. It is only processed, if the entity has the SCD annotation, otherwise it will be ignored. This annotation tells where the Active Flag field value will be written in the entity field, during the SCD persisting.

The annotation load order:
In the case of a new entity:
When creating a new entity, the ActiveFlag field value will be true or "Y" or 1 (depending on the entity field's java type) In the case of modifying an existing entity:
When modifying an entity, its last modified record will be queried first. That record's ActiveFlag field value will be false or "N" or 0 (depending on the entity field's java type). In the next step, the entity's last modified record's ActiveFlag field value will be true or "Y" or 1 (depending on the entity field's java type) In the case of deleting an existing entity:
During deletion, no real deletion takes place, the last entity record will be modified. That record's ActiveFlag field value will be false or "N" or 0 (depending on the entity field's java type).

Since:
4.0
Author:
JBStrap
See Also: