BigSWAF::DBCapsulator::SearchFilter Class Reference

Search Filter encapsulation. More...

Inheritance diagram for BigSWAF::DBCapsulator::SearchFilter:

BigSWAF::DBCapsulator List of all members.

Public Class Methods

SearchFilter new ()
 Create a new SearchFilter.

Public Object Methods

scalar sqlexpr (scalar expr)
 Set or fetch the SQL expression that corresponds with this filter.
void addorder (scalar field, scalar descending)
 Add a field name to the list of fields the search result should be ordered by.
list orderfields (list fields)
 Get or set a list of fields the search results should be ordered by.
boolean isdescending (scalar field, scalar descending)
 Get or set if a field is to be sorted in descending order.
scalar sqlorder ()
 Get the ordering settings as a string ready for inclusion in an SQL SELECT statement.

Detailed Description

Search Filter encapsulation.


Member Function Documentation

void BigSWAF::DBCapsulator::SearchFilter::addorder scalar  field,
scalar  descending
 

Add a field name to the list of fields the search result should be ordered by.

Parameters:
field The name of the field that should be added.
descending (optional) must be "1" if order should be descending.

boolean BigSWAF::DBCapsulator::SearchFilter::isdescending scalar  field,
scalar  descending
 

Get or set if a field is to be sorted in descending order.

Parameters:
field The name of the field.
descending (optional) If set, the descending status is set to this value
Returns:
true if the field is to be ordered in descending order, false otherwise

SearchFilter BigSWAF::DBCapsulator::SearchFilter::new  ) 
 

Create a new SearchFilter.

list BigSWAF::DBCapsulator::SearchFilter::orderfields list  fields  ) 
 

Get or set a list of fields the search results should be ordered by.

Parameters:
fields (optional) If set, the list of order field names is set to this list.
Returns:
The list of field names.

scalar BigSWAF::DBCapsulator::SearchFilter::sqlexpr scalar  expr  ) 
 

Set or fetch the SQL expression that corresponds with this filter.

This expression can be used as is in a SQL SELECT statement.

Parameters:
expr String specifying the SQL expression. If this parameter is undefined the current expression is returned without any change.
Returns:
The current search filter expression.

scalar BigSWAF::DBCapsulator::SearchFilter::sqlorder  ) 
 

Get the ordering settings as a string ready for inclusion in an SQL SELECT statement.

Returns:
String with an "ORDER BY" statement or an empty string if no order has been requested.


The documentation for this class was generated from the following file:
Generated on Sat May 19 01:18:29 2012 for Big Sister Web Application Framework by  doxygen 1.4.5