A class that can be used in an ORDER BY clause to sort the items of a resulting query. More...
#include <OrderByItem.h>
Public Member Functions | |
Expression * | getExpression () const |
It returns the exprsssion to be used to sort the result of a query. More... | |
SortOrder | getSortOrder () const |
It returns the order of sorting: Asc or Desc. More... | |
OrderByItem & | operator= (const OrderByItem &rhs) |
OrderByItem (const Expression &e, SortOrder order=ASC) | |
Constructor. More... | |
OrderByItem (Expression *e, SortOrder order=ASC) | |
Constructor. More... | |
OrderByItem (const std::string &propertyName, SortOrder order=ASC) | |
Constructor. More... | |
OrderByItem (const OrderByItem &rhs) | |
Copy constructor. More... | |
void | setExpression (Expression *e) |
It sets the expression to sort the result of a query. More... | |
void | setSortOrder (SortOrder o) |
It sets the order to be used during the sorting of a query. More... | |
~OrderByItem () | |
Destructor. More... | |
Private Attributes | |
std::auto_ptr< Expression > | m_field |
A valid expression. More... | |
SortOrder | m_order |
Sort order. More... | |
A class that can be used in an ORDER BY clause to sort the items of a resulting query.
The order default will be ascendent if none is informed.
Definition at line 53 of file OrderByItem.h.
|
explicit |
Constructor.
e | An expression to be used in an ORDER BY clause. |
order | The sort order. |
|
explicit |
Constructor.
e | An expression to be used in an ORDER BY clause. |
order | The sort order. |
|
explicit |
Constructor.
propertyName | A property name. |
order | The sort order. |
|
explicit |
Copy constructor.
te::da::OrderByItem::~OrderByItem | ( | ) |
Destructor.
Expression* te::da::OrderByItem::getExpression | ( | ) | const |
It returns the exprsssion to be used to sort the result of a query.
SortOrder te::da::OrderByItem::getSortOrder | ( | ) | const |
It returns the order of sorting: Asc or Desc.
OrderByItem& te::da::OrderByItem::operator= | ( | const OrderByItem & | rhs | ) |
Assignment operator.
void te::da::OrderByItem::setExpression | ( | Expression * | e | ) |
It sets the expression to sort the result of a query.
e | The expression to be used to sort the result of a query. |
void te::da::OrderByItem::setSortOrder | ( | SortOrder | o | ) |
It sets the order to be used during the sorting of a query.
o | The order to be used during the sorting of a query. |
|
private |
A valid expression.
Definition at line 124 of file OrderByItem.h.
|
private |
Sort order.
Definition at line 125 of file OrderByItem.h.