Package net.solarnetwork.ocpp.domain
Class ChargingProfileInfo
java.lang.Object
net.solarnetwork.ocpp.domain.ChargingProfileInfo
- All Implemented Interfaces:
net.solarnetwork.domain.Differentiable<ChargingProfileInfo>
public class ChargingProfileInfo
extends Object
implements net.solarnetwork.domain.Differentiable<ChargingProfileInfo>
Information about a charging profile.
- Version:
- 1.0
- Author:
- matt
-
Constructor Summary
ConstructorsConstructorDescriptionCopy constructor.ChargingProfileInfo(ChargingProfilePurpose purpose, ChargingProfileKind kind, ChargingScheduleInfo schedule) Constructor.ChargingProfileInfo(ChargingProfilePurpose purpose, ChargingProfileKind kind, ChargingScheduleRecurrency recurrency, Instant validFrom, Instant validTo, ChargingScheduleInfo schedule) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleandiffersFrom(ChargingProfileInfo other) getKind()Get the profile kind.intGet the profile kind as a code value.Get the purpose.intGet the purpose as a code value.Get the recurrency.intGet the recurrency as a code value.Get the schedule.Get the valid from date.Get the valid from date as a formatted instant.Get the valid to date.Get the valid to date as a formatted instant.booleanisSameAs(ChargingProfileInfo other) Test if the properties of another entity are the same as in this instance.voidsetKind(ChargingProfileKind kind) Set the profile kind.voidsetKindCode(int code) Set the profile kind as a code value.voidsetPurpose(ChargingProfilePurpose purpose) Set the purpose.voidsetPurposeCode(int code) Set the purpose as a code value.voidsetRecurrency(ChargingScheduleRecurrency recurrency) Set the recurrency.voidsetRecurrencyCode(int code) Set the recurrency as a code value.voidsetSchedule(ChargingScheduleInfo schedule) Set the schedule.voidsetValidFrom(Instant validFrom) Set the valid from date.voidsetValidFromValue(String value) Set the valid from date as an ISO 8601 formatted timestamp.voidsetValidTo(Instant validTo) Set the valid to date.voidsetValidToValue(String value) Set the valid to date as an ISO 8601 formatted timestamp.toString()
-
Constructor Details
-
ChargingProfileInfo
public ChargingProfileInfo(ChargingProfilePurpose purpose, ChargingProfileKind kind, ChargingScheduleInfo schedule) Constructor.- Parameters:
purpose- the purposekind- the kindschedule- the schedule- Throws:
IllegalArgumentException- ifpurpose,kind, orscheduleare null
-
ChargingProfileInfo
public ChargingProfileInfo(ChargingProfilePurpose purpose, ChargingProfileKind kind, ChargingScheduleRecurrency recurrency, Instant validFrom, Instant validTo, ChargingScheduleInfo schedule) Constructor.- Parameters:
purpose- the purposekind- the kindrecurrency- the recurrencyvalidFrom- the valid from datevalidTo- the valid to dateschedule- the schedule- Throws:
IllegalArgumentException- ifpurpose,kind, orscheduleare null
-
ChargingProfileInfo
Copy constructor.- Parameters:
other- the info to copy
-
-
Method Details
-
isSameAs
Test if the properties of another entity are the same as in this instance.- 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<ChargingProfileInfo>
-
toString
-
getPurpose
Get the purpose.- Returns:
- the purpose; never null
-
setPurpose
Set the purpose.- Parameters:
purpose- the purpose to set- Throws:
IllegalArgumentException- ifpurposeis null
-
getPurposeCode
public int getPurposeCode()Get the purpose as a code value.- Returns:
- the purpose code
-
setPurposeCode
public void setPurposeCode(int code) Set the purpose as a code value.- Parameters:
code- the purpose code
-
getKind
Get the profile kind.- Returns:
- the kind; never null
-
setKind
Set the profile kind.- Parameters:
kind- the kind to set- Throws:
IllegalArgumentException- ifkindis null
-
getKindCode
public int getKindCode()Get the profile kind as a code value.- Returns:
- the kind code
-
setKindCode
public void setKindCode(int code) Set the profile kind as a code value.- Parameters:
code- the kind code
-
getRecurrency
Get the recurrency.- Returns:
- the recurrency
-
setRecurrency
Set the recurrency.- Parameters:
recurrency- the recurrency to set
-
getRecurrencyCode
public int getRecurrencyCode()Get the recurrency as a code value.- Returns:
- the recurrency code
-
setRecurrencyCode
public void setRecurrencyCode(int code) Set the recurrency as a code value.- Parameters:
code- the recurrency code
-
getValidFrom
Get the valid from date.- Returns:
- the date
-
setValidFrom
Set the valid from date.- Parameters:
validFrom- the date to set
-
getValidFromValue
Get the valid from date as a formatted instant.- Returns:
- the date, as an ISO 8601 formatted string
-
setValidFromValue
Set the valid from date as an ISO 8601 formatted timestamp.- Parameters:
value- the date string
-
getValidTo
Get the valid to date.- Returns:
- the date
-
setValidTo
Set the valid to date.- Parameters:
validTo- the date to set
-
getValidToValue
Get the valid to date as a formatted instant.- Returns:
- the date, as an ISO 8601 formatted string
-
setValidToValue
Set the valid to date as an ISO 8601 formatted timestamp.- Parameters:
value- the date string
-
getSchedule
Get the schedule.- Returns:
- the schedule
-
setSchedule
Set the schedule.- Parameters:
schedule- the schedule to set- Throws:
IllegalArgumentException- ifscheduleis null
-