public class JpqlHelper extends Object
| Constructor and Description |
|---|
JpqlHelper() |
| Modifier and Type | Method and Description |
|---|---|
JpqlHelper |
$(String s)
add String.
|
static String |
$q(String s)
Quote string within two single quote 'string'.
|
JpqlHelper |
abs()
append a string
ABS.
|
JpqlHelper |
abs(String field)
append a string
ABS(field).
|
JpqlHelper |
all()
append a string
ALL.
|
JpqlHelper |
all(String subquery)
append a string
ALL(subquery).
|
JpqlHelper |
and()
append a string AND.
|
JpqlHelper |
any()
append a string
ANY.
|
JpqlHelper |
any(String subquery)
append a string
ANY(subquery).
|
JpqlHelper |
as(String field)
append a string
AS field.
|
JpqlHelper |
asc()
append a string
ASC.
|
JpqlHelper |
avg()
append a string AVG.
|
JpqlHelper |
avg(String field)
append a string
AVG(field).
|
JpqlHelper |
between()
append a string BETWEEN.
|
JpqlHelper |
between(String from,
String to)
append a string
BETWEEN from AND to.
|
JpqlHelper |
c$()
append a comma ",".
|
JpqlHelper |
c$(String s)
append string prefix a comma ",".
|
JpqlHelper |
cAbs()
append a string
,ABS.
|
JpqlHelper |
cAbs(String field)
append a string
,ABS(field).
|
JpqlHelper |
Case()
append a string
CASE.
|
JpqlHelper |
Case(String field)
append a string
CASE field.
|
JpqlHelper |
cast(String field,
String typeValue)
EclipseLink support:
append a string CAST(field , typeValue). |
JpqlHelper |
cAvg()
append a string ,AVG.
|
JpqlHelper |
cAvg(String field)
append a string
,AVG(field).
|
JpqlHelper |
cCase()
append a string
,CASE.
|
JpqlHelper |
cCase(String field)
append a string
,CASE field.
|
JpqlHelper |
cCoalesce(String field,
String defaultValue)
append a string
,COALESCE(field , defaultValue).
|
JpqlHelper |
cConcat(String first,
String second)
append a string
,CONCAT(first ,
second).
|
JpqlHelper |
cCount()
append a string
,COUNT.
|
JpqlHelper |
cCount(String field)
append a string
,COUNT(field).
|
JpqlHelper |
cCountDistinct(String field)
append a string
,COUNT(DISTINCT field).
|
JpqlHelper |
cCurrDate()
append a string
,CURRENT_DATE.
|
JpqlHelper |
cCurrTime()
append a string
,CURRENT_TIME.
|
JpqlHelper |
cCurrTimeStamp()
append a string
,CURRENT_TIMESTAMP.
|
JpqlHelper |
cExtract(String dt,
String field)
EclipseLink support:
append a string ,EXTRACT(dt , field). |
JpqlHelper |
cLength()
append a string
,LENGTH.
|
JpqlHelper |
cLength(String field)
append a string
,LENGTH(field).
|
JpqlHelper |
cLocate(String substr,
String field)
append a string
,LOCATE(substr , field).
|
JpqlHelper |
cLower()
append a string
,LOWER.
|
JpqlHelper |
cLower(String field)
append a string
,LOWER(field).
|
JpqlHelper |
cMax()
append a string ,MAX.
|
JpqlHelper |
cMax(String field)
append a string
,MAX(field).
|
JpqlHelper |
cMin()
append a string ,MIN.
|
JpqlHelper |
cMin(String field)
append a string
,MIN(field).
|
JpqlHelper |
cMod(String number,
String divisor)
append a string
,MOD(number,divisor).
|
JpqlHelper |
cNullif(String field,
String defaultValue)
append a string
,NULLIF(field , defaultValue).
|
JpqlHelper |
coalesce(String field,
String defaultValue)
append a string
COALESCE(field , defaultValue).
|
JpqlHelper |
column(String field,
String entityOrAlias)
EclipseLink support:
append a string COLUMN('field, entityOrAlias). |
JpqlHelper |
concat(String first,
String second)
append a string
CONCAT(first ,
second).
|
JpqlHelper |
count()
append a string
COUNT.
|
JpqlHelper |
count(String field)
append a string
COUNT(field).
|
JpqlHelper |
countDistinct(String field)
append a string
COUNT(DISTINCT field).
|
JpqlHelper |
cSqrt()
append a string ,SQRT.
|
JpqlHelper |
cSqrt(String field)
append a string
,SQRT(field).
|
JpqlHelper |
cSubstring(String field,
int start,
int end)
append a string
,SUBSTRING(field ,
start , end).
|
JpqlHelper |
cSum()
append a string ,SUM.
|
JpqlHelper |
cSum(String field)
append a string
,SUM(field).
|
JpqlHelper |
cTrim()
append a string
,TRIM.
|
JpqlHelper |
cTrim(String field)
append a string
,TRIM(field).
|
JpqlHelper |
cUpper()
append a string
,UPPER.
|
JpqlHelper |
cUpper(String field)
append a string
,UPPER(field).
|
JpqlHelper |
currDate()
append a string
CURRENT_DATE.
|
JpqlHelper |
currTime()
append a string
CURRENT_TIME.
|
JpqlHelper |
currTimeStamp()
append a string
CURRENT_TIMESTAMP.
|
JpqlHelper |
delete()
append a string DELETE.
|
JpqlHelper |
delete(String entity)
append a string
DELETE entity.
|
JpqlHelper |
desc()
append a string
DESC.
|
JpqlHelper |
distinct()
append a string DISTINCT.
|
JpqlHelper |
distinct(String fields)
append a string
DISTINCT fields.
|
JpqlHelper |
Else(String result)
append a string
ELSE result.
|
JpqlHelper |
elseEnd(String result)
append a string
ELSE result END.
|
JpqlHelper |
end()
append a string
END.
|
JpqlHelper |
eq()
append a string
=.
|
JpqlHelper |
eq(String right)
append a string
=right.
|
JpqlHelper |
eq(String left,
String right)
append a string
left=right.
|
JpqlHelper |
except()
append a string EXCEPT.
|
JpqlHelper |
exists()
append a string
EXISTS.
|
JpqlHelper |
extract(String dt,
String field)
EclipseLink support:
append a string EXTRACT(dt , field). |
JpqlHelper |
False()
append a string FALSE.
|
JpqlHelper |
fetch()
append a string FETCH.
|
JpqlHelper |
fetch(String field)
append a string
FETCH field.
|
String |
format(Object... args) |
JpqlHelper |
from()
append a string FROM.
|
JpqlHelper |
from(String entity)
append a string
FROM entity.
|
JpqlHelper |
function(String name,
String... values)
append " FUNCTION(
name, [value1,
[field2]]".
|
static JpqlHelper |
get()
Factory method to get a instance of JpqlHelper.
|
JpqlHelper |
groupBy()
append a string GROUP BY.
|
JpqlHelper |
groupBy(String fields)
append a string GROUP
BY fields.
|
JpqlHelper |
having()
append a string HAVING.
|
JpqlHelper |
having(String criteria)
append a string
HAVING criteria.
|
JpqlHelper |
in()
append a string IN.
|
JpqlHelper |
in(String fields)
append a string
IN (fields).
|
JpqlHelper |
innerJoin()
append a string INNER JOIN.
|
JpqlHelper |
innerJoin(String other)
append a string INNER
JOIN other.
|
JpqlHelper |
intersect()
append a string INTERSECT.
|
JpqlHelper |
isEmpty()
append a string IS EMPTY.
|
JpqlHelper |
isNotEmpty()
append a string
IS NOT EMPTY.
|
JpqlHelper |
isNotNull()
append a string
IS NOT NULL.
|
JpqlHelper |
isNull()
append a string IS NULL.
|
JpqlHelper |
join()
append a string JOIN.
|
JpqlHelper |
join(String other)
append a string
JOIN other.
|
JpqlHelper |
leftJoin()
append a string LEFT OUTER JOIN.
|
JpqlHelper |
leftJoin(String other)
append a string LEFT OUTER
JOIN other.
|
JpqlHelper |
length()
append a string
LENGTH.
|
JpqlHelper |
length(String field)
append a string
LENGTH(field).
|
JpqlHelper |
like()
append a string LIKE.
|
JpqlHelper |
like(String left,
String right)
append a string
left LIKE right.
|
JpqlHelper |
locate(String substr,
String field)
append a string
LOCATE(substr , field).
|
JpqlHelper |
lower()
append a string
LOWER.
|
JpqlHelper |
lower(String field)
append a string
LOWER(field).
|
JpqlHelper |
lp$()
add left parentheses " (;.
|
JpqlHelper |
max()
append a string MAX.
|
JpqlHelper |
max(String field)
append a string
MAX(field).
|
JpqlHelper |
memberOf()
append a string MEMBER OF.
|
JpqlHelper |
memberOf(String left,
String right)
append a string
left MEMBER OF right.
|
JpqlHelper |
min()
append a string MIN.
|
JpqlHelper |
min(String field)
append a string
MIN(field).
|
JpqlHelper |
mod(String number,
String divisor)
append a string
MOD(number,divisor).
|
JpqlHelper |
New()
append a string NEW.
|
JpqlHelper |
New(String entityName,
String... fields)
append " NEW
entityName(field1
[,field2]) ".
|
JpqlHelper |
not()
append a string NOT.
|
JpqlHelper |
notExists()
append a string
NOT EXISTS.
|
JpqlHelper |
nullif(String field,
String defaultValue)
append a string
NULLIF(field , defaultValue).
|
JpqlHelper |
nullsFirst()
append a string
NULLS FIRST.
|
JpqlHelper |
on()
append a string ON.
|
JpqlHelper |
operator(String name,
String... values)
EclipseLink support:
OPERATOR is similar to function(). |
JpqlHelper |
or()
append a string OR.
|
JpqlHelper |
orderBy()
append a string
ORDER BY.
|
JpqlHelper |
orderBy(String fields)
append a string
ORDER BY fields.
|
JpqlHelper |
ps$(String s)
add "(..string..)
|
JpqlHelper |
q$(String s)
Quote string within two single quote 'string'.
|
String |
ql()
Alias for
toString(). |
JpqlHelper |
regexp()
EclipseLink support:
append a string REGEXP. |
JpqlHelper |
regexp(String field,
String regexpr)
append a string
field REGEXP regexpr.
|
JpqlHelper |
rp$()
add right parentheses ")".
|
JpqlHelper |
select()
append a string SELECT.
|
JpqlHelper |
select(String fields)
append a string
SELECT fields.
|
JpqlHelper |
selectDistinct()
append a string SELECT DISTINCT.
|
JpqlHelper |
selectDistinct(String fields)
append a string SELECT
DISTINCT fields.
|
JpqlHelper |
set()
append a string
SET.
|
JpqlHelper |
set(String left,
String right)
append a string
SET left=right.
|
JpqlHelper |
some()
append a string
SOME.
|
JpqlHelper |
some(String subquery)
append a string
SOME(subquery).
|
JpqlHelper |
sps$(String s)
add
" (..string..)
|
JpqlHelper |
sqrt()
append a string SQRT.
|
JpqlHelper |
sqrt(String field)
append a string
SQRT(field).
|
JpqlHelper |
substring(String field,
int start,
int end)
append a string
SUBSTRING(field ,
start , end).
|
JpqlHelper |
sum()
append a string SUM.
|
JpqlHelper |
sum(String field)
append a string
SUM(field).
|
JpqlHelper |
table(String name)
EclipseLink support:
append TABLE(name). |
JpqlHelper |
then()
append a string
THEN.
|
String |
toString() |
JpqlHelper |
treat(String entity)
append
TREAT(entity).
|
JpqlHelper |
trim()
append a string
TRIM.
|
JpqlHelper |
trim(String field)
append a string
TRIM(field).
|
JpqlHelper |
True()
append a string TRUE.
|
JpqlHelper |
union()
append a string UNION.
|
JpqlHelper |
update()
append a string UPDATE.
|
JpqlHelper |
update(String entity)
append a string
UPDATE entity.
|
JpqlHelper |
upper()
append a string
UPPER.
|
JpqlHelper |
upper(String field)
append a string
UPPER(field).
|
JpqlHelper |
when()
append a string
WHEN.
|
JpqlHelper |
whenThen(String condition,
String result)
append a string
WHEN condition THEN result.
|
JpqlHelper |
where()
append a string WHERE.
|
JpqlHelper |
where(String qlCriteria)
append a string
WHERE qlCriteria.
|
public JpqlHelper()
public static JpqlHelper get()
thispublic static String $q(String s)
s - public JpqlHelper $(String s)
s - 字串thispublic JpqlHelper c$()
thispublic JpqlHelper c$(String s)
s - thispublic JpqlHelper q$(String s)
s - thispublic JpqlHelper ps$(String s)
s - thispublic JpqlHelper lp$()
thispublic JpqlHelper rp$()
thispublic JpqlHelper sps$(String s)
s - thispublic JpqlHelper select()
thispublic JpqlHelper select(String fields)
fields - thispublic JpqlHelper selectDistinct()
thispublic JpqlHelper selectDistinct(String fields)
fields - thispublic JpqlHelper from()
thispublic JpqlHelper from(String entity)
entity - thispublic JpqlHelper where()
thispublic JpqlHelper where(String qlCriteria)
qlCriteria - thispublic JpqlHelper Case()
thispublic JpqlHelper cCase()
thispublic JpqlHelper Case(String field)
field - thispublic JpqlHelper cCase(String field)
field - thispublic JpqlHelper when()
thispublic JpqlHelper then()
thispublic JpqlHelper whenThen(String condition, String result)
condition - result - thispublic JpqlHelper Else(String result)
result - thispublic JpqlHelper elseEnd(String result)
result - thispublic JpqlHelper end()
thispublic JpqlHelper update()
thispublic JpqlHelper update(String entity)
entity - thispublic JpqlHelper delete()
thispublic JpqlHelper delete(String entity)
entity - thispublic JpqlHelper join()
thispublic JpqlHelper join(String other)
other - thispublic JpqlHelper innerJoin()
thispublic JpqlHelper innerJoin(String other)
other - thispublic JpqlHelper leftJoin()
thispublic JpqlHelper leftJoin(String other)
other - thispublic JpqlHelper on()
thispublic JpqlHelper union()
thispublic JpqlHelper intersect()
thispublic JpqlHelper except()
thispublic JpqlHelper groupBy()
thispublic JpqlHelper groupBy(String fields)
fields - thispublic JpqlHelper having()
thispublic JpqlHelper having(String criteria)
criteria - thispublic JpqlHelper fetch()
thispublic JpqlHelper fetch(String field)
field - thispublic JpqlHelper distinct()
thispublic JpqlHelper distinct(String fields)
fields - thispublic JpqlHelper isNull()
thispublic JpqlHelper isNotNull()
thispublic JpqlHelper True()
thispublic JpqlHelper False()
thispublic JpqlHelper not()
thispublic JpqlHelper and()
thispublic JpqlHelper or()
thispublic JpqlHelper between()
thispublic JpqlHelper between(String from, String to)
from - to - thispublic JpqlHelper like()
thispublic JpqlHelper like(String left, String right)
left - right - thispublic JpqlHelper in()
thispublic JpqlHelper in(String fields)
fields - thispublic JpqlHelper as(String field)
field - thispublic JpqlHelper isEmpty()
thispublic JpqlHelper isNotEmpty()
thispublic JpqlHelper memberOf()
thispublic JpqlHelper memberOf(String left, String right)
left - right - thispublic JpqlHelper abs()
thispublic JpqlHelper cAbs()
thispublic JpqlHelper abs(String field)
field - thispublic JpqlHelper cAbs(String field)
field - thispublic JpqlHelper avg()
thispublic JpqlHelper cAvg()
thispublic JpqlHelper avg(String field)
field - thispublic JpqlHelper cAvg(String field)
field - thispublic JpqlHelper sqrt()
thispublic JpqlHelper cSqrt()
thispublic JpqlHelper sqrt(String field)
field - thispublic JpqlHelper cSqrt(String field)
field - thispublic JpqlHelper coalesce(String field, String defaultValue)
field - defaultValue - thispublic JpqlHelper cCoalesce(String field, String defaultValue)
field - defaultValue - thispublic JpqlHelper nullif(String field, String defaultValue)
field - defaultValue - thispublic JpqlHelper cNullif(String field, String defaultValue)
field - defaultValue - thispublic JpqlHelper max()
thispublic JpqlHelper cMax()
thispublic JpqlHelper max(String field)
field - thispublic JpqlHelper cMax(String field)
field - thispublic JpqlHelper min()
thispublic JpqlHelper cMin()
thispublic JpqlHelper min(String field)
field - thispublic JpqlHelper cMin(String field)
field - thispublic JpqlHelper sum()
thispublic JpqlHelper cSum()
thispublic JpqlHelper sum(String field)
field - thispublic JpqlHelper cSum(String field)
field - thispublic JpqlHelper count()
thispublic JpqlHelper cCount()
thispublic JpqlHelper count(String field)
field - thispublic JpqlHelper cCount(String field)
field - thispublic JpqlHelper countDistinct(String field)
field - thispublic JpqlHelper cCountDistinct(String field)
field - thispublic JpqlHelper orderBy()
thispublic JpqlHelper nullsFirst()
thispublic JpqlHelper orderBy(String fields)
fields - thispublic JpqlHelper asc()
thispublic JpqlHelper desc()
thispublic JpqlHelper mod(String number, String divisor)
number - divisor - thispublic JpqlHelper cMod(String number, String divisor)
number - divisor - thispublic JpqlHelper upper()
thispublic JpqlHelper cUpper()
thispublic JpqlHelper upper(String field)
field - thispublic JpqlHelper cUpper(String field)
field - thispublic JpqlHelper lower()
thispublic JpqlHelper cLower()
thispublic JpqlHelper lower(String field)
field - thispublic JpqlHelper cLower(String field)
field - thispublic JpqlHelper trim()
thispublic JpqlHelper cTrim()
thispublic JpqlHelper trim(String field)
field - thispublic JpqlHelper cTrim(String field)
field - thispublic JpqlHelper concat(String first, String second)
first - second - thispublic JpqlHelper cConcat(String first, String second)
first - second - thispublic JpqlHelper substring(String field, int start, int end)
field - start - end - thispublic JpqlHelper cSubstring(String field, int start, int end)
field - start - end - thispublic JpqlHelper locate(String substr, String field)
substr - field - thispublic JpqlHelper cLocate(String substr, String field)
substr - field - thispublic JpqlHelper length()
thispublic JpqlHelper cLength()
thispublic JpqlHelper length(String field)
field - thispublic JpqlHelper cLength(String field)
field - thispublic JpqlHelper currTime()
thispublic JpqlHelper cCurrTime()
thispublic JpqlHelper currDate()
thispublic JpqlHelper cCurrDate()
thispublic JpqlHelper currTimeStamp()
thispublic JpqlHelper cCurrTimeStamp()
thispublic JpqlHelper New()
thispublic JpqlHelper New(String entityName, String... fields)
entityName - fields - public JpqlHelper exists()
thispublic JpqlHelper notExists()
thispublic JpqlHelper all()
thispublic JpqlHelper all(String subquery)
subquery - thispublic JpqlHelper any()
thispublic JpqlHelper any(String subquery)
subquery - thispublic JpqlHelper some()
thispublic JpqlHelper some(String subquery)
subquery - thispublic JpqlHelper set()
thispublic JpqlHelper set(String left, String right)
left - right - thispublic JpqlHelper eq()
thispublic JpqlHelper eq(String right)
right - thispublic JpqlHelper eq(String left, String right)
left - right - thispublic String format(Object... args)
args - A
format
stringtoString(),args);public JpqlHelper cast(String field, String typeValue)
field - typeValue - thispublic JpqlHelper extract(String dt, String field)
dt - field - thispublic JpqlHelper cExtract(String dt, String field)
dt - field - thispublic JpqlHelper function(String name, String... values)
name - values - public JpqlHelper operator(String name, String... values)
name - values - public JpqlHelper treat(String entity)
entity - public JpqlHelper regexp()
thispublic JpqlHelper regexp(String field, String regexpr)
field - regexpr - thispublic JpqlHelper column(String field, String entityOrAlias)
field - entityOrAlias - thispublic JpqlHelper table(String name)
name - public String ql()
toString().toString()Copyright © 2020. All rights reserved.