Package org.opennms.core.criteria
Class CriteriaBuilder
- java.lang.Object
-
- org.opennms.core.criteria.CriteriaBuilder
-
public class CriteriaBuilder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description CriteriaBuilder(java.lang.Class<?> clazz)
CriteriaBuilder(java.lang.Class<?> clazz, java.lang.String rootAlias)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
addRestriction(Restriction restriction)
CriteriaBuilder
alias(java.lang.String associationPath, java.lang.String alias)
CriteriaBuilder
alias(java.lang.String associationPath, java.lang.String alias, Alias.JoinType type)
CriteriaBuilder
alias(java.lang.String associationPath, java.lang.String alias, Alias.JoinType type, Restriction joinCondition)
CriteriaBuilder
alias(Alias alias)
CriteriaBuilder
and(Restriction... restrictions)
CriteriaBuilder
asc()
CriteriaBuilder
between(java.lang.String attribute, java.lang.Object begin, java.lang.Object end)
CriteriaBuilder
clearOrder()
CriteriaBuilder
contains(java.lang.String attribute, java.lang.Object comparator)
CriteriaBuilder
count()
CriteriaBuilder
createAlias(java.lang.String associationPath, java.lang.String alias)
CriteriaBuilder
desc()
CriteriaBuilder
distinct()
CriteriaBuilder
distinct(boolean isDistinct)
CriteriaBuilder
eq(java.lang.String attribute, java.lang.Object comparator)
CriteriaBuilder
fetch(java.lang.String attribute)
CriteriaBuilder
fetch(java.lang.String attribute, Fetch.FetchType type)
CriteriaBuilder
ge(java.lang.String attribute, java.lang.Object comparator)
CriteriaBuilder
gt(java.lang.String attribute, java.lang.Object comparator)
CriteriaBuilder
id(java.lang.Integer id)
CriteriaBuilder
ilike(java.lang.String attribute, java.lang.Object comparator)
CriteriaBuilder
in(java.lang.String attribute, java.util.Collection<?> collection)
CriteriaBuilder
iplike(java.lang.String attribute, java.lang.Object comparator)
CriteriaBuilder
isNotNull(java.lang.String attribute)
CriteriaBuilder
isNull(java.lang.String attribute)
CriteriaBuilder
join(java.lang.String associationPath, java.lang.String alias)
CriteriaBuilder
join(java.lang.String associationPath, java.lang.String alias, Alias.JoinType type)
CriteriaBuilder
le(java.lang.String attribute, java.lang.Object comparator)
CriteriaBuilder
like(java.lang.String attribute, java.lang.Object comparator)
CriteriaBuilder
limit(java.lang.Integer limit)
CriteriaBuilder
lt(java.lang.String attribute, java.lang.Object comparator)
CriteriaBuilder
match(java.lang.String type)
CriteriaBuilder
ne(java.lang.String attribute, java.lang.Object comparator)
CriteriaBuilder
not()
CriteriaBuilder
offset(java.lang.Integer offset)
CriteriaBuilder
or(Restriction... restrictions)
CriteriaBuilder
orderBy(java.lang.String attribute)
CriteriaBuilder
orderBy(java.lang.String attribute, boolean ascending)
CriteriaBuilder
sql(java.lang.String sql)
CriteriaBuilder
sql(java.lang.String sql, java.lang.Object[] parameters, SqlRestriction.Type[] types)
CriteriaBuilder
sql(java.lang.String sql, java.lang.Object parameter, SqlRestriction.Type type)
Criteria
toCriteria()
-
-
-
Method Detail
-
toCriteria
public Criteria toCriteria()
-
match
public CriteriaBuilder match(java.lang.String type)
-
fetch
public CriteriaBuilder fetch(java.lang.String attribute)
-
fetch
public CriteriaBuilder fetch(java.lang.String attribute, Fetch.FetchType type)
-
join
public CriteriaBuilder join(java.lang.String associationPath, java.lang.String alias)
-
alias
public CriteriaBuilder alias(Alias alias)
-
alias
public CriteriaBuilder alias(java.lang.String associationPath, java.lang.String alias)
-
createAlias
public CriteriaBuilder createAlias(java.lang.String associationPath, java.lang.String alias)
-
join
public CriteriaBuilder join(java.lang.String associationPath, java.lang.String alias, Alias.JoinType type)
-
alias
public CriteriaBuilder alias(java.lang.String associationPath, java.lang.String alias, Alias.JoinType type)
-
alias
public CriteriaBuilder alias(java.lang.String associationPath, java.lang.String alias, Alias.JoinType type, Restriction joinCondition)
-
limit
public CriteriaBuilder limit(java.lang.Integer limit)
-
offset
public CriteriaBuilder offset(java.lang.Integer offset)
-
clearOrder
public CriteriaBuilder clearOrder()
-
orderBy
public CriteriaBuilder orderBy(java.lang.String attribute)
-
orderBy
public CriteriaBuilder orderBy(java.lang.String attribute, boolean ascending)
-
asc
public CriteriaBuilder asc()
-
desc
public CriteriaBuilder desc()
-
distinct
public CriteriaBuilder distinct()
-
count
public CriteriaBuilder count()
-
distinct
public CriteriaBuilder distinct(boolean isDistinct)
-
addRestriction
protected boolean addRestriction(Restriction restriction)
-
isNull
public CriteriaBuilder isNull(java.lang.String attribute)
-
isNotNull
public CriteriaBuilder isNotNull(java.lang.String attribute)
-
id
public CriteriaBuilder id(java.lang.Integer id)
-
eq
public CriteriaBuilder eq(java.lang.String attribute, java.lang.Object comparator)
-
ne
public CriteriaBuilder ne(java.lang.String attribute, java.lang.Object comparator)
-
gt
public CriteriaBuilder gt(java.lang.String attribute, java.lang.Object comparator)
-
ge
public CriteriaBuilder ge(java.lang.String attribute, java.lang.Object comparator)
-
lt
public CriteriaBuilder lt(java.lang.String attribute, java.lang.Object comparator)
-
le
public CriteriaBuilder le(java.lang.String attribute, java.lang.Object comparator)
-
like
public CriteriaBuilder like(java.lang.String attribute, java.lang.Object comparator)
-
ilike
public CriteriaBuilder ilike(java.lang.String attribute, java.lang.Object comparator)
-
iplike
public CriteriaBuilder iplike(java.lang.String attribute, java.lang.Object comparator)
-
contains
public CriteriaBuilder contains(java.lang.String attribute, java.lang.Object comparator)
-
in
public CriteriaBuilder in(java.lang.String attribute, java.util.Collection<?> collection)
-
between
public CriteriaBuilder between(java.lang.String attribute, java.lang.Object begin, java.lang.Object end)
-
sql
public CriteriaBuilder sql(java.lang.String sql)
-
sql
public CriteriaBuilder sql(java.lang.String sql, java.lang.Object parameter, SqlRestriction.Type type)
-
sql
public CriteriaBuilder sql(java.lang.String sql, java.lang.Object[] parameters, SqlRestriction.Type[] types)
-
not
public CriteriaBuilder not()
-
and
public CriteriaBuilder and(Restriction... restrictions)
-
or
public CriteriaBuilder or(Restriction... restrictions)
-
-