Package com.ptsmods.mysqlw.query
Class QueryConditions
java.lang.Object
com.ptsmods.mysqlw.query.QueryCondition
com.ptsmods.mysqlw.query.QueryConditions
A collection of
QueryConditions which a query must meet to affect or return rows.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionadd(int index, QueryConditions.ConditionKeyword keyword, QueryCondition condition) Adds a new QueryCondition at a specific index with a specific keyword.add(QueryConditions.ConditionKeyword keyword, QueryCondition condition) Adds a QueryCondition with a specific keyword to the end.and(int index, QueryCondition condition) Adds a QueryCondition with theANDkeyword at a specific index.and(QueryCondition condition) Adds a QueryCondition with theANDkeyword to the end.static QueryConditionscreate()static QueryConditionscreate(QueryCondition first) or(int index, QueryCondition condition) Adds a QueryCondition with theORkeyword at a specific index.or(QueryCondition condition) Adds a QueryCondition with theORkeyword to the end.toString()Methods inherited from class com.ptsmods.mysqlw.query.QueryCondition
bool, equals, func, greater, greaterEqual, in, less, lessEqual, like, match, notEquals, notIn, varEquals, varGreater, varGreaterEqual, varLess, varLessEqual, varNotEquals
-
Method Details
-
create
- Returns:
- Empty QueryConditions.
-
create
- Parameters:
first- The firstQueryConditionin these QueryConditions.- Returns:
- QueryConditions with the given QueryCondition.
-
and
Adds a QueryCondition with theANDkeyword to the end.- Parameters:
condition- The actual condition- Returns:
- These QueryConditions for chaining.
-
and
Adds a QueryCondition with theANDkeyword at a specific index.- Parameters:
index- The index to add this QueryCondition atcondition- The actual condition- Returns:
- These QueryConditions for chaining.
-
or
Adds a QueryCondition with theORkeyword to the end.- Parameters:
condition- The actual condition- Returns:
- These QueryConditions for chaining.
-
or
Adds a QueryCondition with theORkeyword at a specific index.- Parameters:
index- The index to add this QueryCondition atcondition- The actual condition- Returns:
- These QueryConditions for chaining.
-
add
Adds a QueryCondition with a specific keyword to the end.- Parameters:
keyword- The keyword this QueryCondition usescondition- The actual condition- Returns:
- These QueryConditions for chaining.
-
add
public QueryConditions add(int index, QueryConditions.ConditionKeyword keyword, QueryCondition condition) Adds a new QueryCondition at a specific index with a specific keyword.- Parameters:
index- The index to add this QueryCondition atkeyword- The keyword this QueryCondition usescondition- The actual condition- Returns:
- These QueryConditions for chaining.
-
toString
- Specified by:
toStringin classQueryCondition
-