Package net.solarnetwork.ocpp.domain
Class ChargePoint
java.lang.Object
net.solarnetwork.dao.BasicIdentity<K>
net.solarnetwork.dao.BasicEntity<Long>
net.solarnetwork.dao.BasicLongEntity
net.solarnetwork.ocpp.domain.ChargePoint
- All Implemented Interfaces:
Serializable,Comparable<Long>,net.solarnetwork.dao.Entity<Long>,net.solarnetwork.domain.Differentiable<ChargePoint>,net.solarnetwork.domain.Identity<Long>
public class ChargePoint
extends net.solarnetwork.dao.BasicLongEntity
implements net.solarnetwork.domain.Differentiable<ChargePoint>
A Charge Point entity.
- Version:
- 1.2
- Author:
- matt
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.ChargePoint(Long id) Constructor.ChargePoint(Long id, Instant created) Constructor.ChargePoint(Long id, Instant created, ChargePointInfo info) Constructor.ChargePoint(Instant created, String identifier, String chargePointVendor, String chargePointModel) Constructor.ChargePoint(ChargePoint other) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionCreate a charge point identity based on this entity.voidcopyInfoFrom(ChargePointInfo info) Copy the properties of aChargePointInfo.booleandiffersFrom(ChargePoint other) intGet the total number of connectors available on this charge point.getInfo()Get the Charge Point information.Get the registration status.booleanGet the enabled flag.booleanisSameAs(ChargePoint other) Test if the properties of another entity are the same as in this instance.voidsetConnectorCount(int connectorCount) Set the total number of connectors on this charge point.voidsetEnabled(boolean enabled) Set the enabled flag.voidsetRegistrationStatus(RegistrationStatus registrationStatus) Set the registration status.toString()Methods inherited from class net.solarnetwork.dao.BasicLongEntity
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
-
ChargePoint
public ChargePoint()Constructor. -
ChargePoint
Constructor.- Parameters:
id- the primary key
-
ChargePoint
Constructor.- Parameters:
id- the primary keycreated- the created date
-
ChargePoint
Constructor.- Parameters:
id- the primary keycreated- the created dateinfo- the info- Throws:
IllegalArgumentException- ifinfois null
-
ChargePoint
public ChargePoint(Instant created, String identifier, String chargePointVendor, String chargePointModel) Constructor.- Parameters:
created- the created dateidentifier- the charge point IDchargePointVendor- the vendorchargePointModel- the model
-
ChargePoint
Copy constructor.- Parameters:
other- the other charge point to copy
-
-
Method Details
-
chargePointIdentity
Create a charge point identity based on this entity.This implementation uses
ChargePointIdentity.ANY_USERfor the resolved username.- Returns:
- the new identity, never null
-
isSameAs
Test if the properties of another entity are the same as in this instance.The
idandcreatedproperties are not compared by this method.- Parameters:
other- the other entity to compare to- Returns:
- true if the properties of this instance are equal to the other
-
differsFrom
- Specified by:
differsFromin interfacenet.solarnetwork.domain.Differentiable<ChargePoint>
-
toString
-
copyInfoFrom
Copy the properties of aChargePointInfo.- Parameters:
info- the properties to copy
-
getInfo
Get the Charge Point information.- Returns:
- the info; never null
-
isEnabled
public boolean isEnabled()Get the enabled flag.- Returns:
- the enabled flag
-
setEnabled
public void setEnabled(boolean enabled) Set the enabled flag.- Parameters:
enabled- the enabled flag to set
-
getRegistrationStatus
Get the registration status.- Returns:
- the registrationStatus
-
setRegistrationStatus
Set the registration status.- Parameters:
registrationStatus- the registrationStatus to set
-
getConnectorCount
public int getConnectorCount()Get the total number of connectors available on this charge point.- Returns:
- the total number of connectors, or 0 if not known
-
setConnectorCount
public void setConnectorCount(int connectorCount) Set the total number of connectors on this charge point.- Parameters:
connectorCount- the count to set, or 0 if not known
-