Package com.cbe
Class Filter
- java.lang.Object
-
- com.cbe.Filter
-
public class Filter extends java.lang.Object
Class Filter, support class to set options for queries.
-
-
Constructor Summary
Constructors Constructor Description Filter()
Filter Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Container
container()
Returns the parent container / container that was queried if it is in the cache, if not nullptr will be returned.boolean
getAscending()
Returns the settings on how the data was sorted and displayed.boolean
getByPassCache()
Returns if skipping the cache was used or not.boolean
getContainerFirst()
long
getCount()
Returns the value of the count that was set for the query.int
getDataType()
Returns the requested data type I.E CBE::ItemType::Container, Object, Tag, ...boolean
getDeleted()
FilterOrder
getItemOrder()
Returns the order the query was sorted check enum FilterOrder to see options for sorting.long
getOffset()
Returns the offset that was used for the filter in the query.java.lang.String
getQuery()
Returns the query string that was set on the filter.boolean
isJoinedResult()
void
setAscending(boolean arg0)
Sets the Order in which data should be displayed: Ascending, show deleted items and if Containers should be displayed top down first.void
setByPassCache(boolean arg0)
Set bool to true, to skip the cache.void
setContainerFirst(boolean arg0)
void
setCount(long arg0)
Set the Number of items you want to get from a container.void
setDataType(int arg0)
Set which data types to query for.void
setDeleted(boolean arg0)
void
setItemOrder(FilterOrder order)
Set the order of how data will be shown by the enum of FilterOrder ex: Titel first, Relevance, published e.t.cvoid
setOffset(long arg0)
Set the offset for paging, offset is the item offset where to start your query.void
setQuery(java.lang.String arg0)
Set the query string, e.x: Name:* (would search for all objects with the metadata key of Name).
-
-
-
Method Detail
-
getDataType
public int getDataType()
Returns the requested data type I.E CBE::ItemType::Container, Object, Tag, ...
-
getQuery
public java.lang.String getQuery()
Returns the query string that was set on the filter. I.E key:value (name:*) would be an example.
-
getAscending
public boolean getAscending()
Returns the settings on how the data was sorted and displayed.
-
getDeleted
public boolean getDeleted()
-
getContainerFirst
public boolean getContainerFirst()
-
isJoinedResult
public boolean isJoinedResult()
-
getOffset
public long getOffset()
Returns the offset that was used for the filter in the query.
-
getCount
public long getCount()
Returns the value of the count that was set for the query.
-
getByPassCache
public boolean getByPassCache()
Returns if skipping the cache was used or not.
-
getItemOrder
public FilterOrder getItemOrder()
Returns the order the query was sorted check enum FilterOrder to see options for sorting.
-
container
public Container container()
Returns the parent container / container that was queried if it is in the cache, if not nullptr will be returned. (this is after a query was done not before.)
-
setDataType
public void setDataType(int arg0)
Set which data types to query for.
-
setQuery
public void setQuery(java.lang.String arg0)
Set the query string, e.x: Name:* (would search for all objects with the metadata key of Name).
Note* if used with rootContainer id as the dataId to search in the whole account will be searched.
-
setAscending
public void setAscending(boolean arg0)
Sets the Order in which data should be displayed: Ascending, show deleted items and if Containers should be displayed top down first.
-
setDeleted
public void setDeleted(boolean arg0)
-
setContainerFirst
public void setContainerFirst(boolean arg0)
-
setOffset
public void setOffset(long arg0)
Set the offset for paging, offset is the item offset where to start your query. i.e:
There is already a query of the first 99 items and to get the rest you've setOffest to 100 to get the next set.
-
setCount
public void setCount(long arg0)
Set the Number of items you want to get from a container.
So if a container has 50 items but you only want the 10 first in ascending order then set ascending to true and setCount to 10.
-
setItemOrder
public void setItemOrder(FilterOrder order)
Set the order of how data will be shown by the enum of FilterOrder ex: Titel first, Relevance, published e.t.c
-
setByPassCache
public void setByPassCache(boolean arg0)
Set bool to true, to skip the cache. Force update from Server.
-
-