Package org.openremote.model.attribute
Class AttributeEvent
java.lang.Object
org.openremote.model.event.Event
org.openremote.model.event.shared.SharedEvent
org.openremote.model.attribute.AttributeEvent
- All Implemented Interfaces:
Comparable<AttributeInfo>
,AssetInfo
,AttributeInfo
,MetaHolder
,NameHolder
,NameValueHolder<Object>
,ValueHolder<Object>
Represents an
Attribute
value at a point in time.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interface
static interface
Nested classes/interfaces inherited from interface org.openremote.model.value.NameHolder
NameHolder.NameHolderToStringConverter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String
protected Date
protected boolean
protected MetaMap
protected Object
protected Long
protected String
protected String[]
protected String
protected AttributeRef
protected String
protected Object
protected ValueDescriptor
<?> Fields inherited from class org.openremote.model.event.shared.SharedEvent
MESSAGE_PREFIX
-
Constructor Summary
ConstructorsModifierConstructorDescriptionAttributeEvent
(String assetId, String attributeName, Object value) AttributeEvent
(String assetId, String attributeName, Object value, Long timestamp) AttributeEvent
(String assetId, AttributeDescriptor<T> attributeDescriptor, T value) AttributeEvent
(AssetInfo asset, Attribute<?> attribute, String source, Object value, Long valueTimestamp, Object oldValue, Long oldValueTimestamp) AttributeEvent
(AttributeRef attributeRef, Object value) AttributeEvent
(AttributeRef ref, Object value, Long timestamp) AttributeEvent
(AttributeState attributeState) AttributeEvent
(AttributeState attributeState, Long timestamp) protected
AttributeEvent
(AttributeState attributeState, AttributeRef ref, Object value, Long timestamp) -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(AttributeInfo that) boolean
String[]
getId()
getMeta()
getName()
<U> Optional
<U> getOldValue
(Class<U> valueType) long
String[]
getPath()
getRealm()
getRef()
getState()
long
getType()
Class
<?> getValue()
<U> Optional
<U> Provides basic type casting/coercion useful for unknown valuesint
hashCode()
boolean
boolean
boolean
matches
(AttributeEvent event) Compares entity identifier, attribute name, value, source, and optional timestamp.setDeleted
(boolean deleted) setParentId
(String parentId) toString()
boolean
Methods inherited from class org.openremote.model.event.Event
getEventType, getEventType, getEventType, getMessageID, setMessageID, setTimestamp
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.openremote.model.value.MetaHolder
getMetaItem, getMetaValue, hasMeta, hasMeta
-
Field Details
-
ref
-
value
-
deleted
protected boolean deleted -
source
-
realm
-
parentId
-
valueType
-
oldValue
-
oldValueTimestamp
-
path
-
assetName
-
assetType
-
assetClass
-
createdOn
-
meta
-
-
Constructor Details
-
AttributeEvent
-
AttributeEvent
-
AttributeEvent
-
AttributeEvent
-
AttributeEvent
-
AttributeEvent
-
AttributeEvent
-
AttributeEvent
protected AttributeEvent(AttributeState attributeState, AttributeRef ref, Object value, Long timestamp) -
AttributeEvent
-
-
Method Details
-
getState
- Specified by:
getState
in interfaceAttributeInfo
-
getTimestamp
public long getTimestamp()- Specified by:
getTimestamp
in interfaceAttributeInfo
- Overrides:
getTimestamp
in classEvent
-
getOldValue
- Specified by:
getOldValue
in interfaceAttributeInfo
-
getOldValue
- Specified by:
getOldValue
in interfaceAttributeInfo
-
getOldValueTimestamp
public long getOldValueTimestamp()- Specified by:
getOldValueTimestamp
in interfaceAttributeInfo
-
getRef
- Specified by:
getRef
in interfaceAttributeInfo
-
getId
- Specified by:
getId
in interfaceAssetInfo
- Specified by:
getId
in interfaceAttributeInfo
-
getRealm
-
setRealm
-
getSource
-
setSource
-
isOutdated
public boolean isOutdated() -
getParentId
- Specified by:
getParentId
in interfaceAssetInfo
-
setParentId
-
getPath
-
getAttributeNames
- Specified by:
getAttributeNames
in interfaceAssetInfo
-
getAssetName
- Specified by:
getAssetName
in interfaceAssetInfo
-
getAssetType
- Specified by:
getAssetType
in interfaceAssetInfo
-
getAssetClass
- Specified by:
getAssetClass
in interfaceAssetInfo
-
getCreatedOn
- Specified by:
getCreatedOn
in interfaceAssetInfo
-
getType
- Specified by:
getType
in interfaceValueHolder<Object>
-
getTypeClass
- Specified by:
getTypeClass
in interfaceValueHolder<Object>
-
setValue
-
getValue
- Specified by:
getValue
in interfaceAttributeInfo
- Specified by:
getValue
in interfaceValueHolder<Object>
-
getValue
Description copied from interface:ValueHolder
Provides basic type casting/coercion useful for unknown values- Specified by:
getValue
in interfaceValueHolder<Object>
-
getMeta
- Specified by:
getMeta
in interfaceMetaHolder
-
setMeta
-
getName
- Specified by:
getName
in interfaceAttributeInfo
- Specified by:
getName
in interfaceNameHolder
-
isDeleted
public boolean isDeleted() -
setDeleted
-
matches
Compares entity identifier, attribute name, value, source, and optional timestamp. -
compareTo
- Specified by:
compareTo
in interfaceComparable<AttributeInfo>
-
valueChanged
public boolean valueChanged() -
equals
-
hashCode
public int hashCode() -
toString
-
toStringWithValue
-