|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enableit.db.DBFilter
Provides an encapsulated means to extend a SQL statement's WHERE clause.
Field Summary | |
static java.lang.String |
ABOUT
CVS info about this class and its current version |
static int |
EQ
A valid match type |
static int |
EXACT_MATCH
Deprecated. Use EQ |
static int |
GREATER_THAN_MATCH
Deprecated. Use GT |
static int |
GT
A valid match type |
static int |
GTEQ
A valid match type |
static int |
IS_NOT_NULL
A valid match type |
static int |
IS_NULL
A valid match type |
static int |
LESS_THAN_MATCH
Deprecated. Use LT |
static int |
LIKE
A valid match type |
static int |
LT
A valid match type |
static int |
LTEQ
A valid match type |
static int |
NE
A valid match type |
Constructor Summary | |
DBFilter()
Default Constructor |
|
DBFilter(java.lang.String name,
java.lang.Object value)
Convenience constructor. |
|
DBFilter(java.lang.String name,
java.lang.Object value,
int match)
Convenience constructor setting name, value and match as object is created. |
|
DBFilter(java.lang.String name,
java.lang.Object value,
java.lang.String match)
Convenience constructor. |
|
DBFilter(java.lang.String name,
java.lang.String value)
Convenience constructor. |
|
DBFilter(java.lang.String name,
java.lang.String value,
java.lang.Class type,
int match)
Convenience constructor setting name, value and match as object is created. |
|
DBFilter(java.lang.String name,
java.lang.String value,
int match)
Convenience constructor setting name, value and match as object is created. |
|
DBFilter(java.lang.String name,
java.lang.String value,
java.lang.String type,
int match)
Convenience constructor setting name, value and match as object is created. |
Method Summary | |
java.lang.String |
getMatch()
|
int |
getMatchType()
Returns the type of match required as an int. |
java.lang.String |
getName()
|
static java.util.Map |
getOperators()
|
java.lang.Object |
getValue()
|
void |
setMatch(int match)
|
void |
setName(java.lang.String name)
|
void |
setValue(java.lang.Object value)
|
void |
setValue(java.lang.String value)
|
void |
setValue(java.lang.String value,
java.lang.Class type)
|
void |
setValue(java.lang.String value,
java.lang.String type)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int EXACT_MATCH
public static final int LESS_THAN_MATCH
public static final int GREATER_THAN_MATCH
public static final int IS_NULL
public static final int IS_NOT_NULL
public static final int EQ
public static final int LT
public static final int GT
public static final int LTEQ
public static final int GTEQ
public static final int NE
public static final int LIKE
public static final java.lang.String ABOUT
Constructor Detail |
public DBFilter()
public DBFilter(java.lang.String name, java.lang.String value)
name
- Initialise filter name.value
- Initialise filter value.public DBFilter(java.lang.String name, java.lang.Object value)
name
- Initialise filter name.value
- Initialise filter value.public DBFilter(java.lang.String name, java.lang.String value, int match)
name
- Initialise filter name.value
- Initialise filter value.match
- Initialise filter match (enumerated as class constants).public DBFilter(java.lang.String name, java.lang.String value, java.lang.Class type, int match) throws org.apache.commons.beanutils.ConversionException
name
- Initialise filter name.value
- Initialise filter value.match
- Initialise filter value type.public DBFilter(java.lang.String name, java.lang.String value, java.lang.String type, int match) throws org.apache.commons.beanutils.ConversionException
name
- Initialise filter name.value
- Initialise filter value.type
- Initialise filter value type (Java class name).match
- Initialise filter match (enumerated as class constants).public DBFilter(java.lang.String name, java.lang.Object value, int match)
name
- Initialise filter name.value
- Initialise filter value.match
- Initialise filter match (enumerated as class constants).public DBFilter(java.lang.String name, java.lang.Object value, java.lang.String match)
name
- Initialise filter name.value
- Initialise filter value.match
- Initialise filter match with actual string (e.g. '=').Method Detail |
public void setName(java.lang.String name)
name
- The column to filter on.public void setValue(java.lang.String value)
public void setValue(java.lang.Object value)
public void setValue(java.lang.String value, java.lang.String type) throws org.apache.commons.beanutils.ConversionException
org.apache.commons.beanutils.ConversionException
public void setValue(java.lang.String value, java.lang.Class type) throws org.apache.commons.beanutils.ConversionException
org.apache.commons.beanutils.ConversionException
public void setMatch(int match)
public java.lang.String getName()
public java.lang.Object getValue()
public int getMatchType()
public java.lang.String getMatch()
public java.lang.String toString()
toString
in class java.lang.Object
public static java.util.Map getOperators()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |