Package net.solarnetwork.central.domain
Class 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.solarnetwork.domain.datum.GeneralDatumMetadatagetMeta()net.solarnetwork.domain.datum.GeneralDatumMetadataAlternative forgetMeta().Get the updated date.Convenience getter forBasicIdentity.getId().voidsetMeta(net.solarnetwork.domain.datum.GeneralDatumMetadata meta) voidsetMetaJson(String infoJson) voidsetUpdated(Instant updated) Methods inherited from class net.solarnetwork.dao.BasicEntity
clone, getCreatedMethods inherited from class net.solarnetwork.dao.BasicIdentity
compareTo, equals, getId, hashCodeMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface net.solarnetwork.domain.Identity
getId, hasIdMethods inherited from interface net.solarnetwork.central.domain.UserMetadata
getCreated
-
Constructor Details
-
UserMetadataEntity
Constructor.- Parameters:
id- the IDcreated- the creation date- Throws:
IllegalArgumentException- if any argument is null
-
-
Method Details
-
getUserId
Convenience getter forBasicIdentity.getId().- Specified by:
getUserIdin interfaceUserIdRelated- Specified by:
getUserIdin interfaceUserMetadata- Returns:
- the userId
-
getMetadata
public net.solarnetwork.domain.datum.GeneralDatumMetadata getMetadata()Alternative forgetMeta(). This method exists so that we can configure@JsonUnwrappedon ourGeneralDatumMetadatabut still support setting it in a normal, wrapped fashion viasetMeta(GeneralDatumMetadata).- Specified by:
getMetadatain interfaceUserMetadata- Returns:
- GeneralDatumMetadata
-
getMeta
public net.solarnetwork.domain.datum.GeneralDatumMetadata getMeta() -
setMeta
public void setMeta(net.solarnetwork.domain.datum.GeneralDatumMetadata meta) -
getMetaJson
-
setMetaJson
-
getUpdated
Description copied from interface:UserMetadataGet the updated date.- Specified by:
getUpdatedin interfaceUserMetadata- Returns:
- the updated date
-
setUpdated
-