com.cumulocity.model.measurement
Class Measurement

java.lang.Object
  extended by org.svenson.AbstractDynamicProperties
      extended by com.cumulocity.model.JSONBase
          extended by com.cumulocity.model.Document<GId>
              extended by com.cumulocity.model.measurement.Measurement
All Implemented Interfaces:
org.svenson.DynamicProperties

public class Measurement
extends Document<GId>

Represents a measurement document. Refers to the source of the measurements, the time at which the measurements were taken and holds the measurements themselves.


Constructor Summary
Measurement()
           
 
Method Summary
 boolean equals(Object obj)
           
 ID getSource()
           
 Date getTime()
           
 String getType()
           
 int hashCode()
           
 void setSource(ID source)
           
 void setTime(Date time)
           
 void setType(String type)
           
 String toString()
           
 
Methods inherited from class com.cumulocity.model.Document
get, get, getFragment, getId, getInternalId, getRevision, set, set, set, setId, setInternalId, setRevision
 
Methods inherited from class com.cumulocity.model.JSONBase
fromJSON, getJSONGenerator, getJSONParser, toJSON
 
Methods inherited from class org.svenson.AbstractDynamicProperties
getProperty, propertyNames, setProperty
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Measurement

public Measurement()
Method Detail

setType

public void setType(String type)

getType

public String getType()

getTime

@JSONProperty(value="time",
              ignoreIfNull=true)
@JSONConverter(type=DateConverter.class)
public Date getTime()

setTime

public void setTime(Date time)

getSource

@JSONProperty(value="source",
              ignoreIfNull=false)
@JSONConverter(type=IDTypeConverter.class)
public ID getSource()

setSource

public void setSource(ID source)

hashCode

public int hashCode()
Overrides:
hashCode in class Document<GId>

equals

public boolean equals(Object obj)
Overrides:
equals in class Document<GId>

toString

public String toString()
Overrides:
toString in class Document<GId>


Copyright © 2013 (C) Cumulocity GmbH. All Rights Reserved.