Package net.solarnetwork.ocpp.dao
Class PurgePostedChargeSessionsTask
java.lang.Object
net.solarnetwork.ocpp.dao.PurgePostedChargeSessionsTask
Job to delete old charge sessions that have been uploaded.
- Version:
- 2.0
- Author:
- matt
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe defaultexpirationHoursproperty value. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncall()intGet the posted charge session expiration hours.voidrun()voidsetChargeSessionDao(net.solarnetwork.service.OptionalService<ChargeSessionDao> chargeSessionDao) Set the charge session DAO to use.voidsetExpirationHours(int expirationHours) Set the posted charge session expiration hours.
-
Field Details
-
DEFAULT_EXPIRATION_HOURS
public static final int DEFAULT_EXPIRATION_HOURSThe defaultexpirationHoursproperty value.- See Also:
-
-
Constructor Details
-
PurgePostedChargeSessionsTask
public PurgePostedChargeSessionsTask()
-
-
Method Details
-
run
public void run() -
call
-
setChargeSessionDao
public void setChargeSessionDao(net.solarnetwork.service.OptionalService<ChargeSessionDao> chargeSessionDao) Set the charge session DAO to use.- Parameters:
chargeSessionDao- the DAO to use
-
getExpirationHours
public int getExpirationHours()Get the posted charge session expiration hours.- Returns:
- the expiration hours
-
setExpirationHours
public void setExpirationHours(int expirationHours) Set the posted charge session expiration hours.- Parameters:
expirationHours- the minimum number of hours theposteddate a session must have before qualifying for being purged
-