Package net.solarnetwork.ocpp.domain
Class SystemUser
java.lang.Object
net.solarnetwork.dao.BasicIdentity<K>
net.solarnetwork.dao.BasicEntity<Long>
net.solarnetwork.dao.BasicLongEntity
net.solarnetwork.ocpp.domain.SystemUser
- All Implemented Interfaces:
Serializable,Comparable<Long>,net.solarnetwork.dao.Entity<Long>,net.solarnetwork.domain.Differentiable<SystemUser>,net.solarnetwork.domain.Identity<Long>
public class SystemUser
extends net.solarnetwork.dao.BasicLongEntity
implements net.solarnetwork.domain.Differentiable<SystemUser>
An OCPP charge point system user.
- Version:
- 1.2
- Author:
- matt
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SystemUser(Long id, Instant created) Constructor.SystemUser(Instant created, String username, String password) Constructor.SystemUser(SystemUser other) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionchargePointIdentity(String identifier) Create a charge point identity based on this system user.booleandiffersFrom(SystemUser other) String[]Get the allowed charge points as an array.Get the allowed charge points as a comma-delimited list.Get the password.Get the username.booleanisSameAs(SystemUser other) Test if the properties of another entity are the same as in this instance.voidsetAllowedChargePoints(Set<String> allowedChargePoints) voidsetAllowedChargePointsArray(String[] array) Set the allowed charge points as an array.voidSet the allowed charge points as a comma-delimited list.voidsetPassword(String password) Set the password.voidsetUsername(String username) Set the username.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
-
SystemUser
public SystemUser()Default constructor. -
SystemUser
Constructor.- Parameters:
id- the primary keycreated- the creation date
-
SystemUser
Constructor.- Parameters:
created- the creation dateusername- the usernamepassword- the password
-
SystemUser
Copy constructor.- Parameters:
other- the other system
-
-
Method Details
-
chargePointIdentity
Create a charge point identity based on this system user.This implementation uses
ChargePointIdentity.ANY_USERfor the resolved username.- Parameters:
identifier- the charge point identifier- 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<SystemUser>
-
toString
-
getUsername
Get the username.- Returns:
- the username
-
setUsername
Set the username.- Parameters:
username- the username to set
-
getPassword
Get the password.- Returns:
- the password
-
setPassword
Set the password.- Parameters:
password- the password to set
-
getAllowedChargePoints
- Returns:
- the allowedChargePoints
-
setAllowedChargePoints
- Parameters:
allowedChargePoints- the allowedChargePoints to set
-
getAllowedChargePointsValue
Get the allowed charge points as a comma-delimited list.- Returns:
- the allowed charge points list value
-
setAllowedChargePointsValue
Set the allowed charge points as a comma-delimited list.- Parameters:
list- the list to set
-
getAllowedChargePointsArray
Get the allowed charge points as an array.- Returns:
- the allowed charge points array, or null
-
setAllowedChargePointsArray
Set the allowed charge points as an array.- Parameters:
array- the array to set
-