public class QueryHandler
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
private java.util.Map<java.lang.String,java.lang.Object[]> |
arrayMap |
private java.lang.Boolean |
cacheable |
private java.util.Map<java.lang.String,java.util.Collection<?>> |
collectionMap |
static java.lang.String |
COUNT_SQL |
private java.lang.Integer |
firstResult |
(专用程序包) boolean |
groupFlag |
static java.lang.String |
KEYWORD_FROM |
static java.lang.String |
KEYWORD_GROUP |
static java.lang.String |
KEYWORD_ORDER |
private java.util.Map<java.lang.String,java.lang.Object> |
map |
private java.lang.Integer |
maxResults |
(专用程序包) boolean |
orderFlag |
private java.lang.StringBuilder |
sqlBuilder |
(专用程序包) boolean |
whereFlag |
构造器和说明 |
---|
QueryHandler() |
QueryHandler(java.lang.String sql) |
限定符和类型 | 方法和说明 |
---|---|
QueryHandler |
append(java.lang.String sqlString) |
QueryHandler |
appendWithoutSpace(java.lang.String sqlString) |
QueryHandler |
condition(java.lang.String condition) |
java.lang.String |
getCountSql() |
java.lang.String |
getSql() |
QueryHandler |
group(java.lang.String sqlString) |
<T> org.hibernate.query.Query<T> |
initQuery(org.hibernate.query.Query<T> query) |
<T> org.hibernate.query.Query<T> |
initQuery(org.hibernate.query.Query<T> query,
boolean pageable) |
QueryHandler |
order(java.lang.String sqlString) |
QueryHandler |
setCacheable(boolean cacheable) |
QueryHandler |
setFirstResult(int firstResult) |
QueryHandler |
setMaxResults(int maxResults) |
QueryHandler |
setParameter(java.lang.String key,
java.util.Collection<?> value) |
QueryHandler |
setParameter(java.lang.String key,
java.lang.Object value) |
QueryHandler |
setParameter(java.lang.String key,
java.lang.Object[] value) |
public static final java.lang.String COUNT_SQL
public static final java.lang.String KEYWORD_FROM
public static final java.lang.String KEYWORD_ORDER
public static final java.lang.String KEYWORD_GROUP
boolean whereFlag
boolean orderFlag
boolean groupFlag
private java.lang.StringBuilder sqlBuilder
private java.util.Map<java.lang.String,java.lang.Object> map
private java.util.Map<java.lang.String,java.lang.Object[]> arrayMap
private java.util.Map<java.lang.String,java.util.Collection<?>> collectionMap
private java.lang.Integer firstResult
private java.lang.Integer maxResults
private java.lang.Boolean cacheable
public QueryHandler(java.lang.String sql)
sql
- public QueryHandler()
public QueryHandler condition(java.lang.String condition)
condition
- public QueryHandler order(java.lang.String sqlString)
sqlString
- public QueryHandler group(java.lang.String sqlString)
sqlString
- public QueryHandler appendWithoutSpace(java.lang.String sqlString)
sqlString
- public QueryHandler append(java.lang.String sqlString)
sqlString
- public QueryHandler setFirstResult(int firstResult)
firstResult
- public QueryHandler setMaxResults(int maxResults)
maxResults
- public QueryHandler setCacheable(boolean cacheable)
cacheable
- public QueryHandler setParameter(java.lang.String key, java.lang.Object value)
key
- value
- public QueryHandler setParameter(java.lang.String key, java.lang.Object[] value)
key
- value
- public QueryHandler setParameter(java.lang.String key, java.util.Collection<?> value)
key
- value
- public <T> org.hibernate.query.Query<T> initQuery(org.hibernate.query.Query<T> query)
public <T> org.hibernate.query.Query<T> initQuery(org.hibernate.query.Query<T> query, boolean pageable)
public java.lang.String getSql()
public java.lang.String getCountSql()