public class JpqlBuilderImpl extends Object implements JpqlBuilder
JpqlBuilder.SORTORDER| Modifier and Type | Field and Description |
|---|---|
static String |
TABLE_ALIAS
tabel alias used in building where and order by clause.
|
| Constructor and Description |
|---|
JpqlBuilderImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
orderClause(Map<String,JpqlBuilder.SORTORDER> sort)
builds an order by clause, uses
TABLE_ALIAS as alias for the
table |
void |
setParam(javax.persistence.TypedQuery q,
ParamInfo param)
Fills parameters prepared in
whereParams(javax.persistence.TypedQuery, java.util.List), if the type of the field in the query is a Short or an Integer and the
paramValue is a String, it is converted accordingly. |
String |
whereClause(List<ParamInfo> params)
builds a where clause, calls
whereCondition(org.fryske_akademy.ejb.ParamInfo)
for every entry, uses TABLE_ALIAS as alias for the table |
String |
whereCondition(ParamInfo param)
builds a where condition, prepares ql parameters later filled in
whereParams(javax.persistence.TypedQuery, java.util.List) |
void |
whereParams(javax.persistence.TypedQuery q,
List<ParamInfo> params)
Calls
setParam(javax.persistence.TypedQuery, org.fryske_akademy.ejb.ParamInfo)
} for each filter. |
public static final String TABLE_ALIAS
public String orderClause(Map<String,JpqlBuilder.SORTORDER> sort)
TABLE_ALIAS as alias for the
tableorderClause in interface JpqlBuildersort - public String whereClause(List<ParamInfo> params)
whereCondition(org.fryske_akademy.ejb.ParamInfo)
for every entry, uses TABLE_ALIAS as alias for the tablewhereClause in interface JpqlBuilderparams - JpqlBuilder.whereCondition(org.fryske_akademy.ejb.ParamInfo),
JpqlBuilder.whereParams(javax.persistence.TypedQuery, java.util.List)public String whereCondition(ParamInfo param)
whereParams(javax.persistence.TypedQuery, java.util.List)whereCondition in interface JpqlBuilderparam - JpqlBuilder.whereParams(javax.persistence.TypedQuery, java.util.List)public void whereParams(javax.persistence.TypedQuery q,
List<ParamInfo> params)
setParam(javax.persistence.TypedQuery, org.fryske_akademy.ejb.ParamInfo)
} for each filter.whereParams in interface JpqlBuilderq - params - public void setParam(javax.persistence.TypedQuery q,
ParamInfo param)
whereParams(javax.persistence.TypedQuery, java.util.List), if the type of the field in the query is a Short or an Integer and the
paramValue is a String, it is converted accordingly. Via ParamInfo you
have full control over the Object that is used as paramValuesetParam in interface JpqlBuilderq - param - Copyright © 2018 Fryske Akademy. All rights reserved.