@java.lang.SuppressWarnings("rawtypes")
public abstract class AbstractHibernateQuery
extends Query
Bridges the Query API with the Hibernate Criteria API
| Modifiers | Name | Description |
|---|---|---|
protected class |
AbstractHibernateQuery.CriteriaAndAlias |
|
protected class |
AbstractHibernateQuery.HibernateAssociationQuery |
|
protected class |
AbstractHibernateQuery.HibernateJunction |
|
protected class |
AbstractHibernateQuery.HibernateProjectionList |
| Modifiers | Name | Description |
|---|---|---|
protected static java.lang.String |
ALIAS |
|
static java.lang.String |
SIZE_CONSTRAINT_PREFIX |
|
protected AbstractHibernateCriterionAdapter |
abstractHibernateCriterionAdapter |
|
protected java.lang.String |
alias |
|
protected int |
aliasCount |
|
protected java.util.LinkedList |
aliasInstanceStack |
|
protected java.util.LinkedList<java.lang.String> |
aliasStack |
|
protected java.util.LinkedList<Association> |
associationStack |
|
protected static org.springframework.core.convert.ConversionService |
conversionService |
|
protected java.util.Map<java.lang.String, CriteriaAndAlias> |
createdAssociationPaths |
|
protected Criteria |
criteria |
|
protected DetachedCriteria |
detachedCriteria |
|
protected java.util.LinkedList<PersistentEntity> |
entityStack |
|
protected HibernateProjectionList |
hibernateProjectionList |
|
protected static java.lang.reflect.Field |
opField |
|
protected ProxyHandler |
proxyHandler |
| Fields inherited from class | Fields |
|---|---|
class Query |
criteria, entity, fetchStrategies, joinTypes, lockResult, logger, max, offset, orderBy, projections, queryCache, session, uniqueResult |
| Constructor and description |
|---|
protected AbstractHibernateQuery(Criteria criteria, AbstractHibernateSession session, PersistentEntity entity) |
protected AbstractHibernateQuery(DetachedCriteria criteria, PersistentEntity entity) |
protected AbstractHibernateQuery(Criteria subCriteria, AbstractHibernateSession session, PersistentEntity associatedEntity, java.lang.String newAlias) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
add(Criterion criterion) |
|
protected void |
addToCriteria(Criterion criterion) |
|
public Query |
allEq(java.util.Map<java.lang.String, java.lang.Object> values) |
|
public Query |
and(Criterion a, Criterion b) |
|
protected void |
applyDefaultSortOrderAndCaching() |
|
protected void |
applyDeferredJoins()Makes the joins of the query and adds its orders. |
|
protected void |
applyFetchStrategies() |
|
public Query |
between(java.lang.String property, java.lang.Object start, java.lang.Object end) |
|
public Query |
cache(boolean cache) |
|
protected java.lang.String |
calculatePropertyName(java.lang.String property) |
|
public java.lang.Number |
countResults()
|
|
protected abstract AbstractHibernateCriterionAdapter |
createHibernateCriterionAdapter() |
|
public AssociationQuery |
createQuery(java.lang.String associationName) |
|
protected abstract Criterion |
createRlikeExpression(java.lang.String propertyName, java.lang.String value) |
|
public Junction |
disjunction() |
|
public Query |
eq(java.lang.String property, java.lang.Object value) |
|
protected java.util.List |
executeQuery(PersistentEntity entity, Junction criteria) |
|
public Query |
firstResult(int offset) |
|
protected void |
flushBeforeQuery() |
|
public Query |
ge(java.lang.String property, java.lang.Object value) |
|
protected java.lang.String |
generateAlias(java.lang.String associationName) |
|
protected java.lang.String |
getAssociationPath(java.lang.String propertyName) |
|
protected CriteriaAndAlias |
getCriteriaAndAlias(DetachedAssociationCriteria associationCriteria) |
|
protected CriteriaAndAlias |
getCriteriaAndAlias(Association<?> association) |
|
protected java.lang.String |
getCurrentAlias() |
|
protected abstract org.hibernate.dialect.Dialect |
getDialect(org.hibernate.SessionFactory sessionFactory) |
|
public PersistentEntity |
getEntity() |
|
protected abstract PropertyMapping |
getEntityPersister(java.lang.String name, org.hibernate.SessionFactory sessionFactory) |
|
protected AbstractHibernateCriterionAdapter |
getHibernateCriterionAdapter() |
|
protected CriteriaAndAlias |
getOrCreateAlias(java.lang.String associationName, java.lang.String alias)Returns the join of an association that criteria of the query use. |
|
protected abstract TypeResolver |
getTypeResolver(org.hibernate.SessionFactory sessionFactory) |
|
public Query |
gt(java.lang.String property, java.lang.Object value) |
|
public Query |
gte(java.lang.String property, java.lang.Object value) |
|
public Query |
idEq(java.lang.Object value) |
|
public Query |
ilike(java.lang.String property, java.lang.String expr) |
|
public Query |
in(java.lang.String property, java.util.List values) |
|
protected void |
initializeJoinStatus() |
|
public Query |
isEmpty(java.lang.String property) |
|
public Query |
isNotEmpty(java.lang.String property) |
|
public Query |
isNotNull(java.lang.String property) |
|
public Query |
isNull(java.lang.String property) |
|
public Query |
join(java.lang.String property) |
|
public Query |
join(java.lang.String property, jakarta.persistence.criteria.JoinType joinType) |
|
public Query |
le(java.lang.String property, java.lang.Object value) |
|
public Query |
like(java.lang.String property, java.lang.String expr) |
|
public java.util.List |
list() |
|
public java.util.List |
listForCriteria() |
|
public Query |
lock(boolean lock) |
|
public Query |
lt(java.lang.String property, java.lang.Object value) |
|
public Query |
lte(java.lang.String property, java.lang.Object value) |
|
public Query |
max(int max) |
|
public Query |
maxResults(int max) |
|
public Junction |
negation() |
|
public Query |
offset(int offset) |
|
public Query |
or(Criterion a, Criterion b) |
|
public Query |
order(Order order) |
|
public ProjectionList |
projections() |
|
protected abstract java.lang.String |
render(org.hibernate.type.BasicType basic, java.util.List<java.lang.String> asList, org.hibernate.SessionFactory sessionFactory, SQLFunction sqlFunction) |
|
protected java.lang.Object |
resolveIdIfEntity(java.lang.Object value) |
|
public Query |
rlike(java.lang.String property, java.lang.String expr) |
|
public Query |
select(java.lang.String property) |
|
protected abstract void |
setDetachedCriteriaValue(QueryableCriteria value, PropertyCriterion pc) |
|
public java.lang.Object |
singleResult() |
| Methods inherited from class | Name |
|---|---|
class Query |
add, add, allEq, and, between, cache, clearOrders, clone, conjunction, countResults, createQuery, disjunction, eq, executeQuery, fetchStrategy, firstResult, flushBeforeQuery, ge, getCriteria, getEntity, getMax, getOffset, getOrderBy, getSession, gt, gte, idEq, ilike, in, isEmpty, isNotEmpty, isNotNull, isNull, join, join, le, like, list, lock, lock, lt, lte, max, maxResults, negation, offset, or, order, patternToRegex, projections, resolveIdIfEntity, rlike, select, setUniqueResult, singleResult |
Makes the joins of the query and adds its orders. This happens when the query is executed,
because the rest of the query can still change before that: criteria passed to list are
added after the criteria and the sort of a where query, and the fetch argument of
list, which can request a join type, is read last. Criteria, projections and orders only
need the alias of a join, which is known as soon as the join is registered. A query that is used
as a subquery is not executed itself: this happens once its criteria have been added, when its
detached criteria are handed to the query that embeds them.
Each association is joined once, by its path from the root entity, with the join type that createJoin(CriteriaAndAlias) describes. A requested join type other than a left join is applied whether or not anything else in the query uses the association: a fetch mode alone always joins with an outer join.
Returns the join of an association that criteria of the query use. A join that the query already has for the association is reused. The join is an inner join unless the query requests another join type for the association, and is made when the query is executed: see applyDeferredJoins().
associationName - The name of the association, or its pathalias - The alias for the join, or the alias of the join that the association starts from