Class MeasurementFilter
java.lang.Object
com.cumulocity.sdk.client.Filter
com.cumulocity.sdk.client.measurement.MeasurementFilter
A filter to be used in measurement queries.
The setter (by*) methods return the filter itself to provide chaining:
MeasurementFilter filter = new MeasurementFilter().byType(type).bySource(source);-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyFragmentType(Class<?> fragmentType) byFragmentType(String fragmentType) byFromDate(Date fromDate) Specifies thesourcequery parameterbySource(ManagedObjectRepresentation source) Deprecated.Specifies thetypequery parameterbyValueFragmentSeries(String valueFragmentSeries) Specify value fragment series, usually use in conjunction withbyValueFragmentType(String)byValueFragmentType(String valueFragmentType) Specify value fragment type.byValueFragmentTypeAndSeries(String valueFragmentType, String valueFragmentSeries) A short version combining ofbyValueFragmentType(String)andbyValueFragmentSeries(String).getType()Methods inherited from class com.cumulocity.sdk.client.Filter
encode, getQueryParams
-
Constructor Details
-
MeasurementFilter
public MeasurementFilter()
-
-
Method Details
-
byType
Specifies thetypequery parameter- Parameters:
type- the type of the event(s)- Returns:
- the event filter with
typeset
-
bySource
Specifies thesourcequery parameter- Parameters:
id- the managed object that generated the event(s)- Returns:
- the event filter with
sourceset
-
bySource
Deprecated.Specifies thesourcequery parameter- Parameters:
source- the managed object that generated the event(s)- Returns:
- the event filter with
sourceset
-
getType
- Returns:
- the
typeparameter of the query
-
getSource
- Returns:
- the
sourceparameter of the query
-
byFragmentType
-
byFragmentType
-
getFragmentType
-
byValueFragmentType
Specify value fragment type. This is preferred over the parameterfragmentType, because working with structured data and filtering via this parameter is lighter than filtering viafragmentType.- Parameters:
valueFragmentType- the value fragment type to filter.- Returns:
- the event filter with
valueFragmentTypeset. - See Also:
-
byValueFragmentSeries
Specify value fragment series, usually use in conjunction withbyValueFragmentType(String)- Parameters:
valueFragmentSeries- value fragment series to filter.- Returns:
- the event filter with
valueFragmentSeriesset. - See Also:
-
byValueFragmentTypeAndSeries
public MeasurementFilter byValueFragmentTypeAndSeries(String valueFragmentType, String valueFragmentSeries) A short version combining ofbyValueFragmentType(String)andbyValueFragmentSeries(String).- Parameters:
valueFragmentType- value fragment type to filter, example:c8y_TemperatureMeasurementvalueFragmentSeries- value fragment series to filter, example:T- Returns:
- the event filter with
valueFragmentTypeandvalueFragmentSeriesset.
-
getValueFragmentType
-
getValueFragmentSeries
-
byDate
-
byFromDate
-
getFromDate
-
getToDate
-