Kanzi Connect 3.9.10
kanzi::connect::ContentQueryArguments Class Reference

Encapsulates arguments passed with content queries. More...

#include <content_query_arguments.hpp>

Public Member Functions

 ContentQueryArguments ()
 C++ constructor. initialize the object.
 
 ContentQueryArguments (const string &uri, const vector< string > &columns, const string &filter, const string &limit, const string &sort)
 C++ constructor.
 
 ContentQueryArguments (const string &uri, const vector< string > &columns, string filter=string(""), int limitIndex=0, int limitCount=INT_MAX, string sort=string(""))
 C++ constructor.
 
const vector< string > getColumns () const
 Retrieve column names.
 
const string getFilter () const
 Retrieves the filter string.
 
size_t getLimitCount () const
 Retrieves limit count.
 
size_t getLimitIndex () const
 Retrieves limit index.
 
const string getLimitString () const
 Retrieves limit as a string.
 
const string getSort () const
 Retrieves the sort order.
 
const string getUri () const
 Retrieve the URI.
 
void setColumns (const vector< string > &columns)
 Set column names.
 
void setFilter (const string &filter)
 Sets the filter string.
 
void setLimit (size_t limitIndex, size_t limitCount=0)
 Sets the limit.
 
void setLimitString (const string &limit)
 Sets limit as a string.
 
void setSort (const string &sort)
 Sets the sort order.
 
void setUri (const string &uri)
 Set the URI.
 
QueryArgumentDataSharedPtr toQueryArgumentData ()
 Converts this internal representation into a format that is transfered over the wire.
 
virtual ~ContentQueryArguments ()
 Virtual destructor.
 

Static Public Member Functions

static ContentQueryArgumentsSharedPtr create (const string &uri, const vector< string > &columns)
 Factory function to create instance of class with certain set of parameters.
 
static ContentQueryArgumentsSharedPtr createFromQueryArgumentData (const QueryArgumentData &source)
 Factory function to create instance of the class based on information transfered over the wire.
 

Detailed Description

Encapsulates arguments passed with content queries.

Constructor & Destructor Documentation

◆ ~ContentQueryArguments()

virtual kanzi::connect::ContentQueryArguments::~ContentQueryArguments ( )
inlinevirtual

Virtual destructor.

◆ ContentQueryArguments() [1/3]

kanzi::connect::ContentQueryArguments::ContentQueryArguments ( )

C++ constructor. initialize the object.

◆ ContentQueryArguments() [2/3]

kanzi::connect::ContentQueryArguments::ContentQueryArguments ( const string & uri,
const vector< string > & columns,
string filter = string(""),
int limitIndex = 0,
int limitCount = INT_MAX,
string sort = string("") )

C++ constructor.

initialize the object.

Parameters
uriURI to query
columnscolumns to query
filterfilter string
limitIndexindex of the record where to start fetching. Zero based.
limitCountmaximum amount of elements to fetch.
sortsort order (SQL like).

◆ ContentQueryArguments() [3/3]

kanzi::connect::ContentQueryArguments::ContentQueryArguments ( const string & uri,
const vector< string > & columns,
const string & filter,
const string & limit,
const string & sort )

C++ constructor.

initialize the object.

Parameters
uriURI to query
columnscolums to query
filterfilter string
limitstring to limit results (SQL like).
sortsort order (SQL like).

Member Function Documentation

◆ create()

static ContentQueryArgumentsSharedPtr kanzi::connect::ContentQueryArguments::create ( const string & uri,
const vector< string > & columns )
static

Factory function to create instance of class with certain set of parameters.

Parameters
uricontent uri
columnslist of columns to query.
Returns
newly allocated instance.

◆ createFromQueryArgumentData()

static ContentQueryArgumentsSharedPtr kanzi::connect::ContentQueryArguments::createFromQueryArgumentData ( const QueryArgumentData & source)
static

Factory function to create instance of the class based on information transfered over the wire.

Parameters
sourcethe source received from wire
Returns
newly allocated instance.

◆ getColumns()

const vector< string > kanzi::connect::ContentQueryArguments::getColumns ( ) const

Retrieve column names.

Returns
vector of column names.

◆ getFilter()

const string kanzi::connect::ContentQueryArguments::getFilter ( ) const

Retrieves the filter string.

Returns
the filter string.

◆ getLimitCount()

size_t kanzi::connect::ContentQueryArguments::getLimitCount ( ) const

Retrieves limit count.

Returns
limit count. 0 indicates that there is no limit set.

◆ getLimitIndex()

size_t kanzi::connect::ContentQueryArguments::getLimitIndex ( ) const

Retrieves limit index.

Returns
limit index

◆ getLimitString()

const string kanzi::connect::ContentQueryArguments::getLimitString ( ) const

Retrieves limit as a string.

Empty string is returned if no special limits are defined.

Returns
limit as string accepted directly by SQL databases. (empty, count or index,count).

◆ getSort()

const string kanzi::connect::ContentQueryArguments::getSort ( ) const

Retrieves the sort order.

Returns
previously set sort order.

◆ getUri()

const string kanzi::connect::ContentQueryArguments::getUri ( ) const

Retrieve the URI.

Returns
uri

◆ setColumns()

void kanzi::connect::ContentQueryArguments::setColumns ( const vector< string > & columns)

Set column names.

Parameters
columnsthe columns

◆ setFilter()

void kanzi::connect::ContentQueryArguments::setFilter ( const string & filter)

Sets the filter string.

Parameters
filterthe filter string.

◆ setLimit()

void kanzi::connect::ContentQueryArguments::setLimit ( size_t limitIndex,
size_t limitCount = 0 )

Sets the limit.

Parameters
limitIndexstart index where to start fetching
limitCountmaximum amount of elements to fetch.

◆ setLimitString()

void kanzi::connect::ContentQueryArguments::setLimitString ( const string & limit)

Sets limit as a string.

Parameters
limitthe string representing the limit. INDEX,COUNT or just INDEX

◆ setSort()

void kanzi::connect::ContentQueryArguments::setSort ( const string & sort)

Sets the sort order.

Parameters
sortsort string line in SQL (ASC, DESC).

◆ setUri()

void kanzi::connect::ContentQueryArguments::setUri ( const string & uri)

Set the URI.

Parameters
urithe uri to set.

◆ toQueryArgumentData()

QueryArgumentDataSharedPtr kanzi::connect::ContentQueryArguments::toQueryArgumentData ( )

Converts this internal representation into a format that is transfered over the wire.

Returns
QueryArgumentData instance that can be sent to wire.

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