public class HqlAndParametersBuilder<E extends TopiaEntity> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
alias |
protected Class<E> |
entityClass |
protected Set<String> |
orderByArguments |
protected Map<String,Object> |
parameters |
protected Set<String> |
whereClauses |
| Constructor and Description |
|---|
HqlAndParametersBuilder(Class<E> entityClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
addContains(String property,
Object value) |
void |
addEquals(String property,
Object value) |
void |
addIn(String property,
Collection<?> values) |
void |
addNotContains(String property,
Object value) |
void |
addNotEquals(String property,
Object value) |
void |
addNotIn(String property,
Collection<?> values) |
void |
addNotNull(String property) |
void |
addNull(String property) |
void |
addTopiaIdEquals(String property,
String topiaId) |
void |
addTopiaIdIn(String property,
Collection<String> topiaIds) |
void |
addTopiaIdNotEquals(String property,
String topiaId) |
void |
addTopiaIdNotIn(String property,
Collection<String> topiaIds) |
void |
addWhereClause(String whereClause) |
void |
addWhereClause(String whereClause,
Map<String,Object> hqlParameters) |
String |
getHql() |
Map<String,Object> |
getHqlParameters() |
protected String |
getParameterName(String propertyName)
Converts a (nested) property name to an HQL argument name.
|
Set<String> |
getWhereClauses() |
boolean |
isOrderByClausePresent() |
protected String |
putHqlParameterWithAvailableName(String propertyName,
Object value)
Add a parameter in the parameters map searching with the suitable parameter name in order to prevent conflicts.
|
void |
setAlias(String alias) |
void |
setOrderByArguments(Set<String> orderByArguments) |
void |
setOrderByArguments(String... orderByArguments) |
void |
setParameters(Map<String,Object> parameters) |
void |
setWhereClauses(Set<String> whereClauses) |
protected Class<E extends TopiaEntity> entityClass
protected String alias
public void setAlias(String alias)
public void addNull(String property)
public void addNotNull(String property)
public void addIn(String property, Collection<?> values)
public void addNotIn(String property, Collection<?> values)
public void addTopiaIdIn(String property, Collection<String> topiaIds)
public void addTopiaIdNotIn(String property, Collection<String> topiaIds)
public void addWhereClause(String whereClause)
public void setOrderByArguments(String... orderByArguments)
public String getHql()
protected String getParameterName(String propertyName)
propertyName - the name of a property, can be a path to a nested propertyprotected String putHqlParameterWithAvailableName(String propertyName, Object value)
public boolean isOrderByClausePresent()
Copyright © 2004–2014 CodeLutin. All rights reserved.