|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsky.catalog.SearchCondition
public class SearchCondition
Represents a search condition for values in a given table column, or parameters to a query or request. A searchCondition consists of a name (column or parameter name), a min and a max value. If there can be only one value, the min and max values will be equal.
Constructor Summary | |
---|---|
SearchCondition(FieldDesc fieldDesc,
Comparable val)
Create a new SearchCondition where x == val for the given column or parameter description. |
|
SearchCondition(FieldDesc fieldDesc,
Comparable minVal,
boolean minInclusive,
Comparable maxVal,
boolean maxInclusive)
Create a new SearchCondition for the given column or parameter description, where the "inclusive" parameters specify whether the min and/or max values are included in the range. |
|
SearchCondition(FieldDesc fieldDesc,
Comparable minVal,
Comparable maxVal)
Create a new SearchCondition where minVal <= x <= maxVal for the given column or parameter description. |
|
SearchCondition(FieldDesc fieldDesc,
double val)
Create a new numerical SearchCondition where (x == val) for the given column or parameter description. |
|
SearchCondition(FieldDesc fieldDesc,
double minVal,
double maxVal)
Create a new numerical SearchCondition where (minVal <= x <= maxVal) for the given column or parameter description. |
|
SearchCondition(FieldDesc fieldDesc,
String val)
Create a new String SearchCondition where (x == val) for the given column or parameter description. |
|
SearchCondition(FieldDesc fieldDesc,
String minVal,
String maxVal)
Create a new String SearchCondition where (minVal <= x <= maxVal) for the given column or parameter description. |
Method Summary | |
---|---|
FieldDesc |
getFieldDesc()
Return the column or parameter description. |
String |
getId()
Return the column or parameter id. |
Comparable |
getMaxVal()
Return the maximum value (actually a Double or String) |
Comparable |
getMinVal()
Return the minimum value (actually a Double or String) |
String |
getName()
Return the column or parameter name. |
Comparable |
getVal()
Return the value (actually a Double or String) |
boolean |
isMaxInclusive()
Return True if the condition includes the max value. |
boolean |
isMinInclusive()
Return True if the condition includes the min value. |
boolean |
isRange()
Return true if this object represents a range. |
boolean |
isTrueFor(Comparable val)
Return true if the condition is true for the given value. |
boolean |
isTrueFor(double val)
Return true if the condition is true for the given numeric value. |
static void |
main(String[] args)
Test cases |
String |
toString()
Return a string representation of this class in the form "name=minVal[,maxVal]" |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SearchCondition(FieldDesc fieldDesc, Comparable minVal, Comparable maxVal)
public SearchCondition(FieldDesc fieldDesc, Comparable minVal, boolean minInclusive, Comparable maxVal, boolean maxInclusive)
public SearchCondition(FieldDesc fieldDesc, Comparable val)
public SearchCondition(FieldDesc fieldDesc, double minVal, double maxVal)
public SearchCondition(FieldDesc fieldDesc, double val)
public SearchCondition(FieldDesc fieldDesc, String minVal, String maxVal)
public SearchCondition(FieldDesc fieldDesc, String val)
Method Detail |
---|
public Comparable getVal()
public Comparable getMinVal()
public Comparable getMaxVal()
public boolean isMinInclusive()
public boolean isMaxInclusive()
public boolean isTrueFor(Comparable val)
val
- The value to be checked against the condition.
public boolean isTrueFor(double val)
val
- The value to be checked against the condition.
public FieldDesc getFieldDesc()
public String getName()
public String getId()
public boolean isRange()
public String toString()
toString
in class Object
public static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |