类 AbstractMutableQueryImpl
java.lang.Object
org.babyfish.jimmer.sql.ast.impl.AbstractMutableStatementImpl
org.babyfish.jimmer.sql.ast.impl.query.AbstractMutableQueryImpl
- 所有已实现的接口:
FilterableImplementor,MutableStatementImplementor,Filterable,MutableQuery,Sortable,SubQueryProvider
- 直接已知子类:
MutableRootQueryImpl,MutableSubQueryImpl
public abstract class AbstractMutableQueryImpl
extends AbstractMutableStatementImpl
implements MutableQuery
-
字段概要
字段修饰符和类型字段说明static final intstatic final intstatic final int -
构造器概要
构造器限定符构造器说明protectedAbstractMutableQueryImpl(JSqlClientImplementor sqlClient, org.babyfish.jimmer.meta.ImmutableType immutableType) protectedAbstractMutableQueryImpl(JSqlClientImplementor sqlClient, TableProxy<?> table) -
方法概要
修饰符和类型方法说明intprotected List<Expression<?>> getHavingPredicate(AstContext astContext) groupBy(Expression<?>... expressions) protected booleanprotected voidonFrozen(AstContext astContext) orderBy(Expression<?>... expressions) orderByIf(boolean condition, Expression<?>... expressions) voidsetHavingPredicates(List<Predicate> havingPredicates) voidsetOrderByPriority(int priority) Add some predicates(logical and)Avoid using this method whenever possible, usingDynamic Predicatesare a more convenient approach.已过时。从类继承的方法 org.babyfish.jimmer.sql.ast.impl.AbstractMutableStatementImpl
applyDataLoaderGlobalFilters, applyGlobalFilters, applyVirtualPredicates, createAssociationSubQuery, createSubQuery, freeze, getContext, getFilterPredicate, getParent, getPredicate, getPredicates, getPurpose, getSqlClient, getTable, getTableImplementor, getType, hasVirtualPredicate, isFrozen, mergePredicates, modCount, modify, resolveVirtualPredicate, unfrozenPredicates, validateMutable, whereByFilter从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.babyfish.jimmer.sql.ast.impl.query.FilterableImplementor
createAssociationSubQuery, createAssociationWildSubQuery, createSubQuery, createWildSubQuery
-
字段详细资料
-
ORDER_BY_PRIORITY_STATEMENT
public static final int ORDER_BY_PRIORITY_STATEMENT- 另请参阅:
-
ORDER_BY_PRIORITY_GLOBAL_FILTER
public static final int ORDER_BY_PRIORITY_GLOBAL_FILTER- 另请参阅:
-
ORDER_BY_PRIORITY_PROP_FILTER
public static final int ORDER_BY_PRIORITY_PROP_FILTER- 另请参阅:
-
-
构造器详细资料
-
AbstractMutableQueryImpl
protected AbstractMutableQueryImpl(JSqlClientImplementor sqlClient, org.babyfish.jimmer.meta.ImmutableType immutableType) -
AbstractMutableQueryImpl
-
-
方法详细资料
-
where
从接口复制的说明:FilterableAdd some predicates(logical and)- 指定者:
where在接口中Filterable- 指定者:
where在接口中Sortable- 覆盖:
where在类中AbstractMutableStatementImpl- 参数:
predicates- Predicates, everything one can be null- 返回:
- Return the current object to support chain programming style
-
whereIf
@OldChain @Deprecated public AbstractMutableQueryImpl whereIf(boolean condition, Predicate predicate) 已过时。从接口复制的说明:FilterableThis method is deprecated, usingDynamic Predicatesis a more convenient approach.Please look at this example:
WhenwhereIf(name != null, table.name().eq(name))nameis null, this code works becauseeq(null)is automatically translated by Jimmer toisNull(), which doesn't cause an exception.Let's look at another example:
Except RUST marco, almost all programming languages calculate all parameters first and then call the function. Therefore, beforewhereIf(minPrice != null, table.price().ge(minPrice))whereIfis executed,ge(null)already causes an exception.For this reason,
whereIfprovides an overloaded form with a lambda parameter:
Although this overloaded form can solve this problem, it ultimately adds a mental burden during development.whereIf(minPrice != null, () -> table.price().ge(minPrice))Therefore, Jimmer provides
Dynamic Predicates- Java: eqIf, neIf, ltIf, leIf, gtIf, geIf, likeIf, ilikeIf, betweenIf
- Kotlin: eq?, ne?, lt?, le?, gt?, ge?, like?, ilike?, betweenIf?
geIfas an example, this functionality is ultimately implemented like this.where(table.price().geIf(minPrice))- 指定者:
whereIf在接口中Filterable- 指定者:
whereIf在接口中Sortable
-
whereIf
从接口复制的说明:FilterableAvoid using this method whenever possible, usingDynamic Predicatesare a more convenient approach.Please look at this example:
WhenwhereIf(name != null, table.name().eq(name))nameis null, this code works becauseeq(null)is automatically translated by Jimmer toisNull(), which doesn't cause an exception.Let's look at another example:
Except RUST marco, almost all programming languages calculate all parameters first and then call the function. Therefore, beforewhereIf(minPrice != null, table.price().ge(minPrice))whereIfis executed,ge(null)already causes an exception.For this reason,
whereIfprovides an overloaded form with a lambda parameter:
Although this overloaded form can solve this problem, it ultimately adds a mental burden during development.whereIf(minPrice != null, () -> table.price().ge(minPrice))Therefore, Jimmer provides
Dynamic Predicate- Java: eqIf, neIf, ltIf, leIf, gtIf, geIf, likeIf, ilikeIf, betweenIf
- Kotlin: eq?, ne?, lt?, le?, gt?, ge?, like?, ilike?, betweenIf?
geIfas an example, this functionality is ultimately implemented like this.where(table.price().geIf(minPrice))- 指定者:
whereIf在接口中Filterable- 指定者:
whereIf在接口中Sortable- 参数:
condition- The conditionblock- A lambda to create predicate when condition is true- 返回:
- Return the current object to support chain programming style
-
groupBy
- 指定者:
groupBy在接口中MutableQuery
-
having
- 指定者:
having在接口中MutableQuery
-
orderBy
- 指定者:
orderBy在接口中MutableQuery- 指定者:
orderBy在接口中Sortable
-
orderByIf
- 指定者:
orderByIf在接口中MutableQuery- 指定者:
orderByIf在接口中Sortable
-
orderBy
- 指定者:
orderBy在接口中MutableQuery- 指定者:
orderBy在接口中Sortable
-
orderByIf
- 指定者:
orderByIf在接口中MutableQuery- 指定者:
orderByIf在接口中Sortable
-
orderBy
- 指定者:
orderBy在接口中MutableQuery- 指定者:
orderBy在接口中Sortable
-
orderByIf
- 指定者:
orderByIf在接口中MutableQuery- 指定者:
orderByIf在接口中Sortable
-
getHavingPredicate
-
onFrozen
- 覆盖:
onFrozen在类中AbstractMutableStatementImpl
-
isGroupByClauseUsed
protected boolean isGroupByClauseUsed() -
getGroupExpressions
-
getHavingPredicates
-
setHavingPredicates
-
getOrders
-
getAcceptedOrderByPriority
public int getAcceptedOrderByPriority() -
setOrderByPriority
public void setOrderByPriority(int priority)
-