public class QueryCriteria extends Object implements Cloneable, Serializable
Modifier and Type | Class and Description |
---|---|
static class |
QueryCriteria.SortOrder |
Constructor and Description |
---|
QueryCriteria()
Creates a new instance with both where and order by clauses empty.
|
Modifier and Type | Method and Description |
---|---|
void |
addOrderByClause(String column,
boolean ascending)
Registers a new order by clause to have the result ordered
by the given column in the given order.
|
void |
addOrderByClause(String column,
QueryCriteria.SortOrder order)
Registers a new order by clause to have the result ordered
by the given column in the given order.
|
void |
addWhereClause(String column,
Object value)
Registers a new where clause to restrict the results of the query
to rows which contain the given value in the given column only.
|
String |
buildOrderByClause()
Returns a properly formated order by clause to be appended to the
sql query string.
|
String |
buildWhereClause()
Returns a properly formated where clause to be appended to the
sql query string.
|
Object[] |
buildWhereClauseParams()
Returns a collection of parameters of the represented where
clause.
|
Object |
clone() |
public QueryCriteria()
public void addWhereClause(String column, Object value)
column
- value
- public void addOrderByClause(String column, QueryCriteria.SortOrder order)
column
- public void addOrderByClause(String column, boolean ascending)
column
- ascending
- public String buildWhereClause()
public Object[] buildWhereClauseParams()
public String buildOrderByClause()
Copyright © 2013. All Rights Reserved.