Package com.cumulocity.sdk.client.event
Class EventFilter
- java.lang.Object
-
- com.cumulocity.sdk.client.Filter
-
- com.cumulocity.sdk.client.event.EventFilter
-
public class EventFilter extends Filter
A filter to be used in event queries. The setter (by*) methods return the filter itself to provide chaining:EventFilter filter = new EventFilter().byType(type).bySource(source);
-
-
Constructor Summary
Constructors Constructor Description EventFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description EventFilter
byCreationDate(Date fromDate, Date toDate)
EventFilter
byDate(Date fromDate, Date toDate)
EventFilter
byFragmentType(Class<?> fragmentType)
EventFilter
byFragmentType(String fragmentType)
EventFilter
byFragmentValue(String fragmentValue)
EventFilter
byFromCreationDate(Date fromDate)
EventFilter
byFromDate(Date fromDate)
EventFilter
bySource(GId id)
Specifies thesource
query parameterEventFilter
bySource(ManagedObjectRepresentation source)
Deprecated.EventFilter
byType(String type)
Specifies thetype
query parameterString
getCreatedFrom()
String
getCreatedTo()
String
getFragmentType()
String
getFragmentValue()
String
getFromDate()
String
getSource()
String
getToDate()
String
getType()
-
Methods inherited from class com.cumulocity.sdk.client.Filter
encode, getQueryParams
-
-
-
-
Method Detail
-
byType
public EventFilter byType(String type)
Specifies thetype
query parameter- Parameters:
type
- the type of the event(s)- Returns:
- the event filter with
type
set
-
bySource
public EventFilter bySource(GId id)
Specifies thesource
query parameter- Parameters:
id
- the managed object id that generated the event(s)- Returns:
- the event filter with
source
set
-
bySource
@Deprecated public EventFilter bySource(ManagedObjectRepresentation source)
Deprecated.Specifies thesource
query parameter- Parameters:
source
- the managed object that generated the event(s)- Returns:
- the event filter with
source
set
-
getType
public String getType()
- Returns:
- the
type
parameter of the query
-
getSource
public String getSource()
- Returns:
- the
source
parameter of the query
-
byFragmentType
public EventFilter byFragmentType(Class<?> fragmentType)
-
byFragmentType
public EventFilter byFragmentType(String fragmentType)
-
byFragmentValue
public EventFilter byFragmentValue(String fragmentValue)
-
getFragmentType
public String getFragmentType()
-
getFragmentValue
public String getFragmentValue()
-
byDate
public EventFilter byDate(Date fromDate, Date toDate)
-
byFromDate
public EventFilter byFromDate(Date fromDate)
-
getFromDate
public String getFromDate()
-
getToDate
public String getToDate()
-
getCreatedFrom
public String getCreatedFrom()
-
getCreatedTo
public String getCreatedTo()
-
byCreationDate
public EventFilter byCreationDate(Date fromDate, Date toDate)
-
byFromCreationDate
public EventFilter byFromCreationDate(Date fromDate)
-
-