001: package org.obe.client.api.model;
002:
003: import java.util.Date;
004: import org.wfmc.wapi.WMFilter;
005:
006: /**
007: * Filter class that supports an ORDER BY clause and the ability to limit the
008: * number of rows returned.
009: *
010: * @author Adrian Price
011: */
012: public class OBEFilter extends WMFilter {
013: private final String _orderBy;
014: private final int _startRow;
015: private final int _maxRows;
016:
017: public OBEFilter(String attributeName, int comparison,
018: Boolean attributeValue, String orderBy, int startAt,
019: int maxRows) {
020:
021: super (attributeName, comparison, attributeValue);
022: _orderBy = orderBy;
023: _startRow = startAt;
024: _maxRows = maxRows;
025: }
026:
027: public OBEFilter(String attributeName, int comparison,
028: boolean attributeValue, String orderBy, int startAt,
029: int maxRows) {
030:
031: super (attributeName, comparison, attributeValue);
032: _orderBy = orderBy;
033: _startRow = startAt;
034: _maxRows = maxRows;
035: }
036:
037: public OBEFilter(String attributeName, int comparison,
038: Date attributeValue, String orderBy, int startAt,
039: int maxRows) {
040:
041: super (attributeName, comparison, attributeValue);
042: _orderBy = orderBy;
043: _startRow = startAt;
044: _maxRows = maxRows;
045: }
046:
047: public OBEFilter(String attributeName, int comparison,
048: Double attributeValue, String orderBy, int startAt,
049: int maxRows) {
050:
051: super (attributeName, comparison, attributeValue);
052: _orderBy = orderBy;
053: _startRow = startAt;
054: _maxRows = maxRows;
055: }
056:
057: public OBEFilter(String attributeName, int comparison,
058: double attributeValue, String orderBy, int startAt,
059: int maxRows) {
060:
061: super (attributeName, comparison, attributeValue);
062: _orderBy = orderBy;
063: _startRow = startAt;
064: _maxRows = maxRows;
065: }
066:
067: public OBEFilter(String attributeName, int comparison,
068: Integer attributeValue, String orderBy, int startAt,
069: int maxRows) {
070:
071: super (attributeName, comparison, attributeValue);
072: _orderBy = orderBy;
073: _startRow = startAt;
074: _maxRows = maxRows;
075: }
076:
077: public OBEFilter(String attributeName, int comparison,
078: int attributeValue, String orderBy, int startRow,
079: int maxRows) {
080:
081: super (attributeName, comparison, attributeValue);
082: _orderBy = orderBy;
083: _startRow = startRow;
084: _maxRows = maxRows;
085: }
086:
087: public OBEFilter(String attributeName, int comparison,
088: String attributeValue, String orderBy, int startRow,
089: int maxRows) {
090:
091: super (attributeName, comparison, attributeValue);
092: _orderBy = orderBy;
093: _startRow = startRow;
094: _maxRows = maxRows;
095: }
096:
097: public OBEFilter(String sql, String orderBy, int startRow,
098: int maxRows) {
099: super (sql);
100: _orderBy = orderBy;
101: _startRow = startRow;
102: _maxRows = maxRows;
103: }
104:
105: public String getOrderBy() {
106: return _orderBy;
107: }
108:
109: public int getStartRow() {
110: return _startRow;
111: }
112:
113: public int getMaxRows() {
114: return _maxRows;
115: }
116: }
|