C++  1.4.6
CloudBackend Software Development Kit - SDK API for C++
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
CBE::Filter Class Reference
Collaboration diagram for CBE::Filter:
Collaboration graph
[legend]

Classes

struct  Term
 

Public Member Functions

CBE::item_t getDataType () const
 
std::string getQuery () const
 
bool getAscending () const
 
bool getDeleted () const
 
bool getContainerFirst () const
 
bool isJoinedResult () const
 
uint32_t getOffset () const
 
uint32_t getCount () const
 
bool getByPassCache () const
 
CBE::FilterOrder getItemOrder () const
 
CBE::ContainerPtr container ()
 
void setDataType (CBE::item_t)
 
void setQuery (std::string)
 
void setAscending (bool)
 
void setDeleted (bool)
 
void setContainerFirst (bool)
 
void setOffset (uint32_t)
 
void setCount (uint32_t)
 
void setItemOrder (CBE::FilterOrder order)
 
void setByPassCache (bool)
 

Protected Member Functions

void parseQueryString ()
 

Protected Attributes

std::map< FilterOrder, std::string > orderStrings
 
uint32_t offset
 
uint32_t count
 
bool ascending
 
bool deleted
 
bool containerFirst
 
bool isJoined
 
std::string query
 
CBE::item_t dataType
 
std::string _order
 
bool bypassCache
 
CBE::ContainerPtr _container
 
std::vector< Term_parsedQueryString
 

Static Protected Attributes

static std::vector< std::string > _approvedOrder
 

Member Function Documentation

◆ getDataType()

CBE::item_t CBE::Filter::getDataType ( ) const

Get the Data Type object I.E CBE::ItemType::Container, Object, Tag, ...

Returns
CBE::item_t

◆ getQuery()

std::string CBE::Filter::getQuery ( ) const

Get the Query object Returns the query string that was set on the filter. I.e. key:value (name:*) would be an example.

Returns
std::string

◆ getAscending()

bool CBE::Filter::getAscending ( ) const

Use the Ascending sorting in the resultset. Returns the settings on how the data is sorted and displayed, ascending or descending.

Returns
true
false

◆ getDeleted()

bool CBE::Filter::getDeleted ( ) const

Include any deleted objects.

Returns
true
false

◆ getContainerFirst()

bool CBE::Filter::getContainerFirst ( ) const

Get the Container First filter order.

Returns
true
false

◆ isJoinedResult()

bool CBE::Filter::isJoinedResult ( ) const

If a join resultset.

Returns
true
false

◆ getOffset()

uint32_t CBE::Filter::getOffset ( ) const

Get the Offset counter i.e. number of items to skip in the resultset returned.

Returns
uint32_t

◆ getCount()

uint32_t CBE::Filter::getCount ( ) const

Get the Count object i.e. maximum number of items in the resultset. System has maximum limit of 1000 items returned in a resultset.

Returns
uint32_t

◆ getByPassCache()

bool CBE::Filter::getByPassCache ( ) const

Get the By Pass Cache seting.

Returns
true
false

◆ getItemOrder()

CBE::FilterOrder CBE::Filter::getItemOrder ( ) const

Get the Item CBE::FilterOrder.

Returns
CBE::FilterOrder

◆ container()

CBE::ContainerPtr CBE::Filter::container ( )

Returns the parent container / container that was queried, if it is in the cache. If not available, a nullptr will be returned. This is after a query was done, not before.

Returns
CBE::ContainerPtr

◆ setQuery()

void CBE::Filter::setQuery ( std::string  )

Set the query string, e.g: Name:* (would search for all objects with the metadata key of Name). Note* If used with rootContainer id search in the whole account will be performed.

◆ setOffset()

void CBE::Filter::setOffset ( uint32_t  )

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()

void CBE::Filter::setCount ( uint32_t  )

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()

void CBE::Filter::setItemOrder ( CBE::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()

void CBE::Filter::setByPassCache ( bool  )

Set bool to true, to skip the cache. Force update from Server.

Member Data Documentation

◆ orderStrings

std::map<FilterOrder, std::string> CBE::Filter::orderStrings
protected
Initial value:
= {
{ FilterOrder::Title, "title"},
{ FilterOrder::Relevance, "relevance"},
{ FilterOrder::Published, "published"},
{ FilterOrder::Updated, "updated"},
{ FilterOrder::Length, "length"},
{ FilterOrder::S1, "s1"},
{ FilterOrder::S2, "s2"},
{ FilterOrder::S3, "s3"},
{ FilterOrder::S4, "s4"}
}

The documentation for this class was generated from the following file: