@ApplicationScoped public class CleanEntity extends ObjectDefault implementation to clean up an entity. In case specific actions are required for a concrete entity, this class can be extended using as
Qualifierthe name of the entity, in this way that class will be invoked instead of this default one.
Constructors Constructor Description
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
clean(LogCleanUpConfig config, Client client, Organization org, ProcessLogger bgLogger)Clean logs for an entity
getClientOrgFilter(Client client, Organization org)Returns the where clause to add to the HQL query to add client/org filtering
public int clean(LogCleanUpConfig config, Client client, Organization org, ProcessLogger bgLogger)Clean logs for an entity
config- Configuration regarding how the entity should be cleaned up, such as the number of days of info to keep, where clauses, etc.
client- Client to remove data from, in case it is System, all clients will be cleaned up
org- If client is not System, data from this organization and the ones in its tree will be removed
bgLogger- Log to be displayed in Process Request window
- number of deleted rows