Class CleanEntity
- java.lang.Object
-
- org.openbravo.utility.cleanup.log.CleanEntity
-
@ApplicationScoped public class CleanEntity extends Object
Default implementation to clean up an entity. In case specific actions are required for a concrete entity, this class can be extended using asQualifier
the name of the entity, in this way that class will be invoked instead of this default one.- Author:
- alostale
-
-
Constructor Summary
Constructors Constructor Description CleanEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
clean(LogCleanUpConfig config, Client client, Organization org, ProcessLogger bgLogger)
Clean logs for an entityprotected String
getClientOrgFilter(Client client, Organization org)
Returns the where clause to add to the HQL query to add client/org filtering
-
-
-
Field Detail
-
SYSTEM
protected static final String SYSTEM
- See Also:
- Constant Field Values
-
-
Method Detail
-
clean
public int clean(LogCleanUpConfig config, Client client, Organization org, ProcessLogger bgLogger)
Clean logs for an entity- Parameters:
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 uporg
- If client is not System, data from this organization and the ones in its tree will be removedbgLogger
- Log to be displayed in Process Request window- Returns:
- number of deleted rows
-
getClientOrgFilter
protected String getClientOrgFilter(Client client, Organization org)
Returns the where clause to add to the HQL query to add client/org filtering
-
-