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 Details

    • ChargePoint

      public ChargePoint()
      Constructor.
    • ChargePoint

      public ChargePoint(Long id)
      Constructor.
      Parameters:
      id - the primary key
    • ChargePoint

      public ChargePoint(Long id, Instant created)
      Constructor.
      Parameters:
      id - the primary key
      created - the created date
    • ChargePoint

      public ChargePoint(Long id, Instant created, ChargePointInfo info)
      Constructor.
      Parameters:
      id - the primary key
      created - the created date
      info - the info
      Throws:
      IllegalArgumentException - if info is null
    • ChargePoint

      public ChargePoint(Instant created, String identifier, String chargePointVendor, String chargePointModel)
      Constructor.
      Parameters:
      created - the created date
      identifier - the charge point ID
      chargePointVendor - the vendor
      chargePointModel - the model
    • ChargePoint

      public ChargePoint(ChargePoint other)
      Copy constructor.
      Parameters:
      other - the other charge point to copy
  • Method Details

    • chargePointIdentity

      public ChargePointIdentity chargePointIdentity()
      Create a charge point identity based on this entity.

      This implementation uses ChargePointIdentity.ANY_USER for the resolved username.

      Returns:
      the new identity, never null
    • isSameAs

      public boolean isSameAs(ChargePoint other)
      Test if the properties of another entity are the same as in this instance.

      The id and created properties 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

      public boolean differsFrom(ChargePoint other)
      Specified by:
      differsFrom in interface net.solarnetwork.domain.Differentiable<ChargePoint>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • copyInfoFrom

      public void copyInfoFrom(ChargePointInfo info)
      Copy the properties of a ChargePointInfo.
      Parameters:
      info - the properties to copy
    • getInfo

      public ChargePointInfo 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

      public RegistrationStatus getRegistrationStatus()
      Get the registration status.
      Returns:
      the registrationStatus
    • setRegistrationStatus

      public void setRegistrationStatus(RegistrationStatus registrationStatus)
      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