|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.patterns.listdata.data.DataCondition
public class DataCondition
Class representing logical condition which data should match.
| Field Summary | |
|---|---|
static int |
DATA_CODE_FLAG_NO
code for NO flag |
static java.lang.Integer |
DATA_CODE_FLAG_NO_OBJ
Object code for NO flag |
static int |
DATA_CODE_FLAG_YES
code for YES flag |
static java.lang.Integer |
DATA_CODE_FLAG_YES_OBJ
Object code for YES flag |
protected int |
m_iAttribute
Constant for logical attribute of a data object, which has relation to some value. |
protected int |
m_iOperation
Operation, constant for the operation between the data object attribute the value of the specified attribute. |
protected int |
m_iValueType
Type of the value. |
protected java.lang.Object |
m_objOriginalValue
Original value which applies to operation for given attribute. |
protected java.lang.Object |
m_objValue
Value which applies to operation for given attribute. |
static int |
NO_ATTRIBUTE
Constant for no attribute set in the data condition. |
static java.lang.Integer |
NO_ATTRIBUTE_OBJ
Constant for no attribute set in the data condition. |
static int |
NO_OPERATION
Code for no operation set in the data condition. |
static java.lang.Integer |
NO_OPERATION_OBJ
Code for no operation set in the data condition. |
static int |
OPERATION_CONTAINS_CASESENSITIVE
Case sensitive like %str% The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_CONTAINS_CASEUNSENSITIVE
Case unsensitive like %str% The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_ENDS_CASESENSITIVE
Case sensitive like %str The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_ENDS_CASEUNSENSITIVE
Case unsensitive like %str The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_EQUALS
= (equals) operation code |
static int |
OPERATION_EQUALS_CASESENSITIVE
Case sensitive like str The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_EQUALS_CASEUNSENSITIVE
Case unsensitive like str The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_EQUALS_OR_NULL
Operation comparing two values or allowin null instead of one. |
static int |
OPERATION_GREATER
> (Greater than) operation code The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_GREATER_EQUALS
>= (Greater or equals than) operation code The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_IN
IN operation code Operation can be array of objects (Object[]) or String or Collection of Objects. |
static int |
OPERATION_LESS
< (Less than) operation code The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_LESS_EQUALS
<= (Less or equals than) operation code The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_NOT_CONTAINS_CASESENSITIVE
Case sensitive not like %str% The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_NOT_CONTAINS_CASEUNSENSITIVE
case unsensitive not like %str% The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_NOT_ENDS_CASESENSITIVE
Case sensitive not like %str The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_NOT_ENDS_CASEUNSENSITIVE
Case unsensitive not like %str The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_NOT_EQUALS
<> (not equals) operation code The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_NOT_EQUALS_CASESENSITIVE
Case sensitive not like str The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_NOT_EQUALS_CASEUNSENSITIVE
Case unsensitive not like str The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_NOT_IN
NOT IN operation code Operation can be array of objects (Object[]) or String or Collection of Objects. |
static int |
OPERATION_NOT_STARTS_CASESENSITIVE
Case sensitive not like str% The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_NOT_STARTS_CASEUNSENSITIVE
Case unsensitive not like str% The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_SQL_QUERY
Sql query operation This operation is used if special query part have to be in the final query In this case just create data condition of this type and set what ever attribute you want except NO_ATTRIBUTE, value will be String representing query value type will be VALUE_TYPE_STRING. |
static int |
OPERATION_STARTS_CASESENSITIVE
Case sensitive like str% The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
OPERATION_STARTS_CASEUNSENSITIVE
Case unsensitive like str% The value has to match index of value if ListDatabaseUtils.OPERATIONS. |
static int |
VALUE_TYPE_BOOLEAN
Value type constant for Boolean. |
static int |
VALUE_TYPE_DOUBLE
Value type constant for Double. |
static int |
VALUE_TYPE_ID
Value type constant for ID. |
static int |
VALUE_TYPE_INTEGER
Value type constant for Integer. |
static int |
VALUE_TYPE_STRING
Value type constant for String. |
static int |
VALUE_TYPE_TIMESTAMP
Value type constant for Timestamp. |
static int |
VALUE_TYPE_UNKNOWN
Unknown value type constant. |
| Constructor Summary | |
|---|---|
DataCondition()
Default empty constructor |
|
DataCondition(int attribute,
int operation,
java.lang.Object value,
int valueType)
Full constructor |
|
DataCondition(int attribute,
int operation,
java.lang.Object value,
int valueType,
java.lang.Object originalValue)
Copy constructor |
|
| Method Summary | |
|---|---|
int |
getAttribute()
|
int |
getOperation()
|
java.lang.Object |
getOriginalValue()
|
java.lang.String |
getOriginalValueString()
|
java.lang.Object |
getValue()
|
java.lang.String |
getValueString()
|
int |
getValueType()
|
static java.util.Map |
getYesNoMap()
|
void |
setOriginalValue(java.lang.Object objOriginalValue)
|
void |
setValue(java.lang.Object objValue)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NO_ATTRIBUTE
public static final java.lang.Integer NO_ATTRIBUTE_OBJ
public static final int NO_OPERATION
public static final java.lang.Integer NO_OPERATION_OBJ
public static final int OPERATION_EQUALS
public static final int OPERATION_IN
public static final int OPERATION_NOT_IN
public static final int OPERATION_NOT_EQUALS
public static final int OPERATION_GREATER
public static final int OPERATION_GREATER_EQUALS
public static final int OPERATION_LESS
public static final int OPERATION_LESS_EQUALS
public static final int OPERATION_CONTAINS_CASEUNSENSITIVE
public static final int OPERATION_CONTAINS_CASESENSITIVE
public static final int OPERATION_SQL_QUERY
public static final int OPERATION_EQUALS_OR_NULL
public static final int OPERATION_NOT_CONTAINS_CASEUNSENSITIVE
public static final int OPERATION_NOT_CONTAINS_CASESENSITIVE
public static final int OPERATION_STARTS_CASEUNSENSITIVE
public static final int OPERATION_STARTS_CASESENSITIVE
public static final int OPERATION_NOT_STARTS_CASEUNSENSITIVE
public static final int OPERATION_NOT_STARTS_CASESENSITIVE
public static final int OPERATION_ENDS_CASEUNSENSITIVE
public static final int OPERATION_ENDS_CASESENSITIVE
public static final int OPERATION_NOT_ENDS_CASEUNSENSITIVE
public static final int OPERATION_NOT_ENDS_CASESENSITIVE
public static final int OPERATION_EQUALS_CASEUNSENSITIVE
public static final int OPERATION_EQUALS_CASESENSITIVE
public static final int OPERATION_NOT_EQUALS_CASEUNSENSITIVE
public static final int OPERATION_NOT_EQUALS_CASESENSITIVE
public static final int DATA_CODE_FLAG_YES
public static final java.lang.Integer DATA_CODE_FLAG_YES_OBJ
public static final int DATA_CODE_FLAG_NO
public static final java.lang.Integer DATA_CODE_FLAG_NO_OBJ
public static final int VALUE_TYPE_UNKNOWN
public static final int VALUE_TYPE_ID
public static final int VALUE_TYPE_BOOLEAN
public static final int VALUE_TYPE_INTEGER
public static final int VALUE_TYPE_DOUBLE
public static final int VALUE_TYPE_STRING
public static final int VALUE_TYPE_TIMESTAMP
protected int m_iAttribute
protected int m_iOperation
protected java.lang.Object m_objValue
protected int m_iValueType
protected java.lang.Object m_objOriginalValue
| Constructor Detail |
|---|
public DataCondition()
public DataCondition(int attribute,
int operation,
java.lang.Object value,
int valueType)
attribute - - attribute - the code for the attribute on which the
operation should be performed, see the
OPERATION_XXX constantsoperation - - operation - what operation should be performed
between the attribute and the valuevalue - - value - any data object which is compared or which operate
on the attribute in some fashion (e.g. attribute
"count", operation "greater than", value "5"valueType - - type of the value (see constants VALUE_TYPE_XXX),
this is used when inserting value to the SQL query
to put it there in correct format
public DataCondition(int attribute,
int operation,
java.lang.Object value,
int valueType,
java.lang.Object originalValue)
attribute - - attribute - the code for the attribute on which the
operation should be performed, see the
OPERATION_XXX constantsoperation - - operation - what operation should be performed
between the attribute and the valuevalue - - value - any data object which is compared or which operate
on the attribute in some fashion (e.g. attribute
"count", operation "greater than", value "5"valueType - - type of the value (see constants VALUE_TYPE_XXX),
this is used when inserting value to the SQL query
to put it there in correct formatoriginalValue - - original value| Method Detail |
|---|
public int getAttribute()
public int getOperation()
public java.lang.Object getValue()
public void setValue(java.lang.Object objValue)
objValue - - new object valuepublic int getValueType()
public java.lang.Object getOriginalValue()
public void setOriginalValue(java.lang.Object objOriginalValue)
objOriginalValue - - new object original valuepublic java.lang.String getValueString()
public java.lang.String getOriginalValueString()
public static java.util.Map getYesNoMap()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||