Package net.solarnetwork.central.domain
Class UserEvent
java.lang.Object
net.solarnetwork.dao.BasicIdentity<UserUuidPK>
net.solarnetwork.central.domain.UserEvent
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<UserUuidPK>,UserRelatedEntity<UserUuidPK>,UserIdRelated,net.solarnetwork.dao.Entity<UserUuidPK>,net.solarnetwork.domain.Identity<UserUuidPK>
public class UserEvent
extends net.solarnetwork.dao.BasicIdentity<UserUuidPK>
implements net.solarnetwork.dao.Entity<UserUuidPK>, UserRelatedEntity<UserUuidPK>, Serializable, Cloneable
An application event related to a user.
Note that time-based UUIDs are assumed for getCreated() to work, and
microsecond precision time is assumed for V7 UUIDs. See
.
invalid reference
UuidUtils#extractTimestamp(UUID, boolean)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods 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
-
UserEvent
Constructor.- Parameters:
id- the primary keytags- the tagsmessage- the messagedata- the JSON data- Throws:
IllegalArgumentException- ifidortagsare null
-
UserEvent
Constructor.- Parameters:
userId- the user IDeventId- the event IDmessage- the messagedata- the JSON datacreated- the creation datekind- the event kind- Throws:
IllegalArgumentException- if any argument is null other thanmessageordata
-
-
Method Details
-
toString
-
clone
- Overrides:
clonein classnet.solarnetwork.dao.BasicIdentity<UserUuidPK>
-
getUserId
Description copied from interface:UserRelatedEntityGet the user ID this entity relates to.- Specified by:
getUserIdin interfaceUserIdRelated- Specified by:
getUserIdin interfaceUserRelatedEntity<UserUuidPK>- Returns:
- the user ID
-
getCreated
- Specified by:
getCreatedin interfacenet.solarnetwork.dao.Entity<UserUuidPK>
-
getEventId
Get the event ID.- Returns:
- the event ID
-
getTags
Get the event tags.- Returns:
- the tags
-
getMessage
Get the message.- Returns:
- the message
-
getData
Get the JSON data.- Returns:
- the data
-