public class Param extends Object
building a jpql
query. A Builder() (with syntax support by default) is
responsible for yielding parameters. Intelligence is in the Builder, not in
the Param. NOTE you can set logging level to DEBUG for trouble shooting.OPERATOR| Modifier and Type | Class and Description |
|---|---|
static class |
Param.AndOr |
static class |
Param.Builder
A factory for Param objects, parameter values can be added in two ways:
as (the correct) Object => only syntax and wildcard support for
String values
as a String using a converter => syntax support also for non String
values, no wildcard support
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Param.AndOr |
getAndOr()
Will be prepended in the query for parameters except the first
|
int |
getGroupEnds()
how many groups does this parameter end, ")";
|
int |
getGroupStarts()
how many groups does this parameter start, "(";
|
Object |
getMaxValue() |
String |
getNot() |
OPERATOR |
getOperator() |
String |
getParamKey()
for native queries this key should be a numeric positional parameter
|
Class |
getParamType() |
Object |
getParamValue() |
String |
getPropertyPath() |
int |
hashCode() |
boolean |
isCaseInsensitive() |
static List<Param> |
one(String key,
Object value)
|
static List<Param> |
one(String key,
OPERATOR operator,
Object value)
Calls
Param.Builder.add(String, String, OPERATOR, Object, boolean, boolean, Object)
with key,key,operator,value,false,false,null |
static List<Param> |
one(String propertyPath,
String key,
Object value)
|
static List<Param> |
one(String propertyPath,
String key,
Object value,
boolean syntaxSupport,
Param.Builder.WildcardMapping wildcardMapping,
boolean caseInsensitive)
|
static List<Param> |
one(String key,
String value,
com.vectorprint.StringConverter converter)
|
void |
setGroupEnds(int groupEnds) |
void |
setGroupStarts(int groupStarts) |
String |
toString() |
public static List<Param> one(String key, Object value)
one(java.lang.String, java.lang.String, java.lang.Object, boolean, org.fryske_akademy.jpa.Param.Builder.WildcardMapping, boolean)
with true, Param.Builder.DEFAULT_MAPPING and falsekey - value - public static List<Param> one(String key, OPERATOR operator, Object value)
Param.Builder.add(String, String, OPERATOR, Object, boolean, boolean, Object)
with key,key,operator,value,false,false,nullkey - operator - value - public static List<Param> one(String propertyPath, String key, Object value)
one(java.lang.String, java.lang.String, java.lang.Object, boolean, org.fryske_akademy.jpa.Param.Builder.WildcardMapping, boolean)
with true, Param.Builder.DEFAULT_MAPPING and falsepropertyPath - The propertyPath may differ from key allowing you to
apply multiple comparisons for the same propertyPath (i.e.
e.column1=:column1 or e.column1=:column2).key - value - public static List<Param> one(String key, String value, com.vectorprint.StringConverter converter)
key - value - converter - public static List<Param> one(String propertyPath, String key, Object value, boolean syntaxSupport, Param.Builder.WildcardMapping wildcardMapping, boolean caseInsensitive)
propertyPath - The propertyPath may differ from key allowing you to
apply multiple comparisons for the same propertyPath (i.e.
e.column1=:column1 or e.column1=:column2).key - value - syntaxSupport - wildcardMapping - caseInsensitive - public String getPropertyPath()
public String getParamKey()
public OPERATOR getOperator()
public Object getParamValue()
public String getNot()
public Param.AndOr getAndOr()
public Class getParamType()
public Object getMaxValue()
public boolean isCaseInsensitive()
public int getGroupStarts()
public int getGroupEnds()
public void setGroupStarts(int groupStarts)
public void setGroupEnds(int groupEnds)
Copyright © 2018–2021 Fryske Akademy. All rights reserved.