|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.compoze.ebusiness.AbstractFilter
This class is the base class for filters.
Field Summary | |
protected java.util.Map |
m_rules
|
protected com.compoze.ejb.persistence.database.WhereFilterRule |
m_where
|
Constructor Summary | |
AbstractFilter()
|
Method Summary | |
void |
clearWhereClause()
Clears the where clause. |
protected com.compoze.ejb.persistence.database.IComparisonFilterRule |
getBaseRule()
Gets the base rule using the or'd setting. |
com.compoze.ejb.persistence.database.IFilterRule |
getFilterRule()
|
boolean |
getOr()
Gets or property. |
java.lang.String |
getWhereClause()
Gets the where clause. |
boolean |
isEmpty()
Checks if the filter is empty. |
protected void |
setBeginsRule(java.lang.String field,
java.lang.String value)
Sets filtering by the specified field and values. |
protected void |
setGreaterThanRule(java.lang.String field,
java.util.Date givenDate)
Sets the rule. |
protected void |
setLessThanRule(java.lang.String field,
java.util.Date givenDate)
Sets the rule. |
protected void |
setNotRule(java.lang.String field,
int[] values)
Sets filtering by 'not' the specified field and values. |
void |
setOr(boolean bOr)
Sets or property. |
protected void |
setRule(java.lang.String field,
boolean bFlag)
Sets filtering by the specified field and value. |
protected void |
setRule(java.lang.String field,
java.util.Date startDate,
java.util.Date endDate)
Sets the rule. |
protected void |
setRule(java.lang.String field,
int iValue)
Sets filtering by the specified field and value. |
protected void |
setRule(java.lang.String field,
int[] values)
Sets filtering by the specified field and values. |
protected void |
setRule(java.lang.String field,
int iValue,
boolean bGreaterThan)
Sets filtering by the specified field and value. |
protected void |
setRule(java.lang.String field,
int iFromValue,
int iToValue)
Sets filtering by the specified field and betweent the specified to and from values. |
protected void |
setRule(java.lang.String field,
long[] values)
Sets filtering by the specified field and values. |
protected void |
setRule(java.lang.String field,
long lValue,
boolean bGreaterThan)
Sets filtering by the specified field and value. |
protected void |
setRule(java.lang.String field,
long lFromValue,
long lToValue)
Sets filtering by the specified field and betweent the specified to and from values. |
protected void |
setRule(java.lang.String field,
java.lang.String[] values,
boolean bExactMatch)
Sets fitlering by the specified field and values. |
void |
setWhereClause(java.lang.String sWhereClause)
Sets the where clause for filtering. |
java.lang.String |
toRule()
|
java.lang.String |
toString()
Returns a string representation of the object. |
protected void |
unsetBeginsRule(java.lang.String field)
Unsets the begins string rule. |
protected void |
unsetNotRule(java.lang.String field)
Unsets filtering by 'not' the specified field and values. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.Map m_rules
protected com.compoze.ejb.persistence.database.WhereFilterRule m_where
Constructor Detail |
public AbstractFilter()
Method Detail |
public void setWhereClause(java.lang.String sWhereClause)
Warning: the where clause should be valid for the configured database. This method should be used with extreme caution.
sWhereClause
- the where clause or null
to clear the where clausepublic java.lang.String getWhereClause()
null
if not setpublic void clearWhereClause()
public void setOr(boolean bOr)
or
is specified then the restriction
values are or'd instead of and'd to specify the filter.bOr
- if true
, filter is or'dpublic boolean getOr()
or
is specified then the restriction
values are or'd instead of and'd to specify the filter.true
, filter is or'dprotected com.compoze.ejb.persistence.database.IComparisonFilterRule getBaseRule()
protected void setRule(java.lang.String field, java.lang.String[] values, boolean bExactMatch)
field
- the fieldvalues
- the values to testbExactMatch
- true
for an exact match of the values; false
otherwiseprotected void setRule(java.lang.String field, int[] values)
field
- the fieldvalues
- the values to testprotected void setNotRule(java.lang.String field, int[] values)
field
- the fieldvalues
- the values to testprotected void unsetNotRule(java.lang.String field)
field
- the fieldprotected void setRule(java.lang.String field, boolean bFlag)
field
- the fieldbFlag
- the value to testprotected void setRule(java.lang.String field, int iValue, boolean bGreaterThan)
field
- the fieldiValue
- the value to testbGreaterThan
- true
for topic count greater than specified count; false
for count less than specified countprotected void setRule(java.lang.String field, int iValue)
field
- the fieldiValue
- the value to testprotected void setRule(java.lang.String field, int iFromValue, int iToValue)
field
- the fieldiFromValue
- the from valueiToValue
- the to valueprotected void setRule(java.lang.String field, long[] values)
field
- the fieldvalues
- the values to testprotected void setRule(java.lang.String field, long lValue, boolean bGreaterThan)
field
- the fieldiValue
- the value to testbGreaterThan
- true
for topic count greater than specified count; false
for count less than specified countprotected void setRule(java.lang.String field, long lFromValue, long lToValue)
field
- the fieldiFromValue
- the from valueiToValue
- the to valueprotected void setRule(java.lang.String field, java.util.Date startDate, java.util.Date endDate)
field
- the fieldgivenDate
- the given date to testprotected void setGreaterThanRule(java.lang.String field, java.util.Date givenDate)
field
- the fieldgivenDate
- the given date to testprotected void setLessThanRule(java.lang.String field, java.util.Date givenDate)
field
- the fieldgivenDate
- the given date to testprotected void setBeginsRule(java.lang.String field, java.lang.String value)
field
- the fieldvalues
- the values to testbExactMatch
- true
for an exact match of the values; false
otherwiseprotected void unsetBeginsRule(java.lang.String field)
field
- the fieldpublic java.lang.String toRule()
public boolean isEmpty()
true
if the filter is empty; false
otherwisepublic com.compoze.ejb.persistence.database.IFilterRule getFilterRule()
public java.lang.String toString()
toString
in class java.lang.Object
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |