Class UserMetadataEntity

java.lang.Object
net.solarnetwork.dao.BasicIdentity<Long>
net.solarnetwork.dao.BasicEntity<Long>
net.solarnetwork.central.domain.UserMetadataEntity
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Long>, UserIdRelated, UserMetadata, net.solarnetwork.dao.Entity<Long>, net.solarnetwork.domain.Identity<Long>

public class UserMetadataEntity extends net.solarnetwork.dao.BasicEntity<Long> implements UserMetadata, Cloneable, Serializable
Metadata about a SolarNode. Note that JsonUtils.getObjectFromJSON(String, Class) is used to manage the JSON value passed to setMetaJson(String).
Since:
1.23
See Also:
  • Constructor Details

    • UserMetadataEntity

      public UserMetadataEntity(Long id, Instant created)
      Constructor.
      Parameters:
      id - the ID
      created - the creation date
      Throws:
      IllegalArgumentException - if any argument is null
  • Method Details

    • getUserId

      public Long getUserId()
      Convenience getter for BasicIdentity.getId().
      Specified by:
      getUserId in interface UserIdRelated
      Specified by:
      getUserId in interface UserMetadata
      Returns:
      the userId
    • getMetadata

      public net.solarnetwork.domain.datum.GeneralDatumMetadata getMetadata()
      Alternative for getMeta(). This method exists so that we can configure @JsonUnwrapped on our GeneralDatumMetadata but still support setting it in a normal, wrapped fashion via setMeta(GeneralDatumMetadata).
      Specified by:
      getMetadata in interface UserMetadata
      Returns:
      GeneralDatumMetadata
    • getMeta

      public net.solarnetwork.domain.datum.GeneralDatumMetadata getMeta()
    • setMeta

      public void setMeta(net.solarnetwork.domain.datum.GeneralDatumMetadata meta)
    • getMetaJson

      public String getMetaJson()
    • setMetaJson

      public void setMetaJson(String infoJson)
    • getUpdated

      public Instant getUpdated()
      Description copied from interface: UserMetadata
      Get the updated date.
      Specified by:
      getUpdated in interface UserMetadata
      Returns:
      the updated date
    • setUpdated

      public void setUpdated(Instant updated)