ffead.server.doc
CibernateQuery.cpp
1 /*
2  * CibernateQuery.cpp
3  *
4  * Created on: 19-Feb-2013
5  * Author: sumeetc
6  */
7 
8 #include "CibernateQuery.h"
9 
10 CibernateQuery::CibernateQuery(string query) {
11  this->query = query;
12 }
13 
14 CibernateQuery::CibernateQuery(string query, string className) {
15  this->query = query;
16  this->className = className;
17 }
18 
19 CibernateQuery CibernateQuery::addParameter(string paramName, Object paramValue) {
20  this->propNameVaues[paramName] = paramValue;
21  return *this;
22 }
23 
24 CibernateQuery CibernateQuery::addParameters(Parameters propNameVaues) {
25  this->propNameVaues = propNameVaues;
26  return *this;
27 }
28 
29 CibernateQuery CibernateQuery::addParameter(int paramPos, Object paramValue) {
30  this->propPosVaues[paramPos] = paramValue;
31  return *this;
32 }
33 
34 CibernateQuery CibernateQuery::addParameters(PosParameters propPosVaues) {
35  this->propPosVaues = propPosVaues;
36  return *this;
37 }
38 
39 CibernateQuery CibernateQuery::addColumnBinding(string columnName, Object columnValue)
40 {
41  this->columnBindings[columnName] = columnValue;
42  return *this;
43 }
44 
45 CibernateQuery CibernateQuery::addColumnBindings(Parameters columnBindings)
46 {
47  this->columnBindings = columnBindings;
48  return *this;
49 }
50 
51 CibernateQuery CibernateQuery::orderByAsc(string column) {
52  this->orderByDescCols[column] = true;
53  return *this;
54 }
55 
56 CibernateQuery CibernateQuery::orderByDesc(string column) {
57  this->orderByAscCols[column] = true;
58  return *this;
59 }
60 
61 CibernateQuery CibernateQuery::paginate(int start, int count) {
62  this->start = start;
63  this->count = count;
64  return *this;
65 }
66 
67 CibernateQuery::~CibernateQuery() {
68  // TODO Auto-generated destructor stub
69 }
70