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::GroupFilter Class Reference
Collaboration diagram for CBE::GroupFilter:
Collaboration graph
[legend]

Classes

struct  Term
 

Public Member Functions

std::string getQuery () const
 
std::string getFilter () const
 
bool getAscending () const
 
bool getDeleted () const
 
bool getPublicFirst () const
 
uint32_t getOffset () const
 
uint32_t getCount () const
 
std::string getOrder () const
 
CBE::FilterOrder getGroupOrder () const
 
void setQuery (std::string)
 
void setFilter (std::string)
 
void setAscending (bool)
 
void setDeleted (bool)
 
void setOffset (uint32_t)
 
void setCount (uint32_t)
 
void setGroupOrder (FilterOrder o)
 
bool matchesGroupId (uint64_t id)
 
bool matchesQuery (uint64_t parentId, CBE::application_t type, bool isDeleted)
 
bool matchesQuery (CBE::GroupPtr group)
 
bool equals (GroupFilter filter)
 
void updateCompareValue ()
 
std::string order () const
 
void order (std::string o)
 

Protected Member Functions

void parseQueryString ()
 

Protected Attributes

std::map< FilterOrder, std::string > orderStrings
 
uint32_t offset
 
uint32_t count
 
bool ascending
 
bool deleted
 
bool publicFirst
 
std::string query
 
std::string _order
 
std::string _compareValue {""}
 
std::string filter {""}
 
bool bypassCache {false}
 
CBE::application_t applicationType {CBE::ApplicationType::Open}
 
std::vector< Term_parsedQueryString = {}
 
std::vector< CBE::group_id_t > _groupIds = {}
 

Static Protected Attributes

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

Member Function Documentation

◆ getQuery()

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

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

◆ getAscending()

bool CBE::GroupFilter::getAscending ( ) const

Returns the settings on how the data was sorted and displayed.

◆ getOffset()

uint32_t CBE::GroupFilter::getOffset ( ) const

Returns the offset that was used for the filter in the query.

◆ getCount()

uint32_t CBE::GroupFilter::getCount ( ) const

Returns the value of the count that was set for the query.

◆ getOrder()

std::string CBE::GroupFilter::getOrder ( ) const

get the filterorder as a string.

◆ getGroupOrder()

CBE::FilterOrder CBE::GroupFilter::getGroupOrder ( ) const

Returns the order the query was sorted check enum FilterOrder to see options for sorting.

◆ setQuery()

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

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.

◆ setFilter()

void CBE::GroupFilter::setFilter ( std::string  )

Not fully tested but should be a regular expression.

◆ setAscending()

void CBE::GroupFilter::setAscending ( bool  )

Sets the Order in which data should be displayed: Acending meaning alfabetical

◆ setDeleted()

void CBE::GroupFilter::setDeleted ( bool  )

If you want to see deleted groups set deleted to true.

◆ setOffset()

void CBE::GroupFilter::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::GroupFilter::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.

◆ setGroupOrder()

void CBE::GroupFilter::setGroupOrder ( FilterOrder  o)

Set the order of how data will be shown by the enum of FilterOrder ex: Titel first, published e.t.c

Member Data Documentation

◆ _approvedOrder

std::vector<std::string> CBE::GroupFilter::_approvedOrder
staticprotected

Internal do not use this.

◆ orderStrings

std::map<FilterOrder, std::string> CBE::GroupFilter::orderStrings
protected
Initial value:
= {
{ FilterOrder::Title, "title"},
{ 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: