Package net.solarnetwork.ocpp.domain
Class ChargeSession
java.lang.Object
net.solarnetwork.dao.BasicIdentity<K>
net.solarnetwork.dao.BasicEntity<UUID>
net.solarnetwork.dao.BasicUuidEntity
net.solarnetwork.ocpp.domain.ChargeSession
- All Implemented Interfaces:
Serializable,Comparable<UUID>,net.solarnetwork.dao.Entity<UUID>,net.solarnetwork.domain.Identity<UUID>
public class ChargeSession
extends net.solarnetwork.dao.BasicUuidEntity
An entity for tracking an OCPP transaction, which represents a single
charging cycle from authorization to end of charging.
- Version:
- 1.1
- Author:
- matt
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionChargeSession(String authId, long chargePointId, int connectorId, int transactionId) Constructor.ChargeSession(UUID id, Instant created, String authId, long chargePointId, int connectorId, int transactionId) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet theAuthorizationID.longGet the Charge Point ID.intGet the Charge Point connection ID.The authorization ID used to end the transaction.getEnded()Get the session end date.Get the session end reason.Get the session posted date.intGet the assigned transaction ID.voidsetEndAuthId(String endAuthId) Set the authorization ID used to end the transaction.voidSet the session end date.voidsetEndReason(ChargeSessionEndReason endReason) Set the session end reason.voidSet the session posted date.toString()Methods inherited from class net.solarnetwork.dao.BasicUuidEntity
cloneMethods inherited from class net.solarnetwork.dao.BasicEntity
getCreatedMethods inherited from class net.solarnetwork.dao.BasicIdentity
compareTo, equals, getId, hashCodeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface net.solarnetwork.domain.Identity
getId, hasId
-
Constructor Details
-
ChargeSession
Constructor.- Parameters:
authId- the authorization IDchargePointId- the Charge Point IDconnectorId- the Charge Point connector IDtransactionId- the transactionID
-
ChargeSession
public ChargeSession(UUID id, Instant created, String authId, long chargePointId, int connectorId, int transactionId) Constructor.- Parameters:
id- the primary keycreated- the created dateauthId- the authorization IDchargePointId- the Charge Point IDconnectorId- the Charge Point connector IDtransactionId- the transactionID
-
-
Method Details
-
toString
-
getAuthId
Get theAuthorizationID.- Returns:
- the authorization ID
-
getChargePointId
public long getChargePointId()Get the Charge Point ID.- Returns:
- the Charge Point ID
-
getConnectorId
public int getConnectorId()Get the Charge Point connection ID.- Returns:
- the Charge Point connection ID
-
getTransactionId
public int getTransactionId()Get the assigned transaction ID.- Returns:
- the transaction ID
-
getEnded
Get the session end date.- Returns:
- the ended the end date, or null if not ended
-
setEnded
Set the session end date.- Parameters:
ended- the end date to set
-
getEndReason
Get the session end reason.- Returns:
- the the end reason
-
setEndReason
Set the session end reason.- Parameters:
endReason- the reason to set
-
getEndAuthId
The authorization ID used to end the transaction.- Returns:
- the ending authorization ID, or null
-
setEndAuthId
Set the authorization ID used to end the transaction.- Parameters:
endAuthId- the ending authorization ID to set
-
getPosted
Get the session posted date.The posted date represents a date when this transaction has been posted to some external service.
- Returns:
- the posted date or null if not posted
-
setPosted
Set the session posted date.- Parameters:
posted- the posted to set
-