public class Thing extends Sysprop
Votable.VoteValue| Constructor and Description |
|---|
Thing()
No-args constructor.
|
Thing(String id)
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Thing |
addStateProperty(String key,
Object value)
Adds a new key/value pair to the map.
|
String |
create()
Stores this object in the data store.
|
void |
delete()
Deletes the object permanently by removing it from the data store.
|
boolean |
equals(Object obj) |
Map<String,Object> |
getDeviceDetails()
Temporarily set when a Thing is created.
|
Map<String,Object> |
getDeviceMetadata()
Returns the device's metadata.
|
Map<String,Object> |
getDeviceState()
The deviceState of the device.
|
String |
getServiceBroker()
Returns the service broker, e.g.
|
Object |
getStateProperty(String key)
Returns the value of a property for a given key.
|
int |
hashCode() |
boolean |
hasStateProperty(String key)
Checks for the existence of a property.
|
Thing |
removeStateProperty(String key)
Removes a property from the map.
|
void |
setDeviceMetadata(Map<String,Object> deviceMetadata)
Sets the device's metadata.
|
void |
setDeviceState(Map<String,Object> state)
Sets the device's deviceState.
|
void |
setServiceBroker(String serviceBroker)
Sets the service broker which will handle the messages in the cloud.
|
void |
update()
Updates the object permanently.
|
addProperty, countChildren, countLinks, deleteChildren, exists, findChildren, findLinkedObjects, getAppid, getCached, getChildren, getChildren, getCreatorid, getId, getIndexed, getLinkedObjects, getLinks, getName, getObjectURI, getParentid, getPlural, getProperties, getProperty, getStored, getTags, getTimestamp, getType, getUpdated, getVersion, getVotes, hasProperty, isLinked, isLinked, link, removeProperty, setAppid, setCached, setCreatorid, setId, setIndexed, setName, setParentid, setProperties, setStored, setTags, setTimestamp, setType, setUpdated, setVersion, setVotes, toString, unlink, unlinkAll, voteDown, voteUppublic Thing()
public Thing(String id)
id - the object idpublic String getServiceBroker()
public void setServiceBroker(String serviceBroker)
serviceBroker - a namepublic Map<String,Object> getDeviceMetadata()
public void setDeviceMetadata(Map<String,Object> deviceMetadata)
deviceMetadata - a mappublic Map<String,Object> getDeviceState()
public void setDeviceState(Map<String,Object> state)
state - a map of keys/valuespublic Thing addStateProperty(String key, Object value)
key - a keyvalue - a valuepublic Object getStateProperty(String key)
key - the keypublic Thing removeStateProperty(String key)
key - the keypublic boolean hasStateProperty(String key)
key - the keypublic Map<String,Object> getDeviceDetails()
create()public void delete()
ParaObjectdelete in interface ParaObjectdelete in class SyspropDAO.delete(com.erudika.para.core.ParaObject)public void update()
ParaObjectLocked fields are ignored.update in interface ParaObjectupdate in class SyspropLocked,
DAO.update(com.erudika.para.core.ParaObject)public String create()
ParaObjectcreate in interface ParaObjectcreate in class SyspropStored,
DAO.create(com.erudika.para.core.ParaObject)Copyright © 2018 Erudika. All rights reserved.