Class QueryExecutor<T,S,O,R,A,F,U>
java.lang.Object
net.binis.codegen.modifier.impl.BaseModifierImpl<T,R>
net.binis.codegen.spring.modifier.BasePersistenceOperations<T,R>
net.binis.codegen.spring.query.executor.QueryExecutor<T,S,O,R,A,F,U>
- All Implemented Interfaces:
net.binis.codegen.modifier.BaseModifier<T,,R> net.binis.codegen.modifier.Modifier<R>,MockedQuery,PreparedQuery<R>,Printable,Queryable,QueryAccessor,QueryAggregateOperation,QueryCollectionFunctions<T,,QuerySelectOperation<S, O, R>> QueryCondition<S,,O, R> QueryEmbed,QueryExecute<R>,QueryFilter<R>,QueryFunctions<T,,QuerySelectOperation<S, O, R>> QueryJoinAggregateOperation,QueryJoinCollectionFunctions<T,,QuerySelectOperation<S, O, R>, Object> QueryOrderOperation<O,,R> QueryOrderStart<O>,QueryParam<R>,QueryScript<QuerySelectOperation<S,,O, R>> QuerySelectOperation<S,,O, R> QuerySelf,QueryStarter<R,,S, A, F, U> UpdatableQuery
public abstract class QueryExecutor<T,S,O,R,A,F,U>
extends BasePersistenceOperations<T,R>
implements QueryAccessor, QuerySelectOperation<S,O,R>, QueryOrderOperation<O,R>, QueryFilter<R>, QueryFunctions<T,QuerySelectOperation<S,O,R>>, QueryJoinCollectionFunctions<T,QuerySelectOperation<S,O,R>,Object>, QueryParam<R>, QueryStarter<R,S,A,F,U>, QueryCondition<S,O,R>, QueryJoinAggregateOperation, PreparedQuery<R>, MockedQuery, QuerySelf, QueryEmbed, UpdatableQuery
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Aprotected Class<?>protected Stringprotected intprotected booleanstatic final Stringprotected booleanprotected StringBuilderprotected StringBuilderprotected static final Stringprotected booleanprotected Stringprotected Class<?>protected StringBuilderprotected booleanprotected intprotected final UnaryOperator<QueryExecutor>protected Filterprotected jakarta.persistence.FlushModeTypeprotected StringBuilderprotected booleanprotected booleanprotected booleanprotected booleanprotected StringBuilderprotected Classprotected booleanprotected Stringprotected intprotected IntSupplierprotected StringBuilderprotected intprotected jakarta.persistence.LockModeTypeprotected Class<?>protected Runnableprotected Oprotected StringBuilderprotected org.springframework.data.domain.Pageableprotected booleanprotected QueryExecutorprotected booleanprotected booleanprotected final StringBuilderprotected Supplier<QueryEmbed>protected QueryProcessor.ResultTypeprotected Class<?>protected StringBuilderprotected booleanprotected booleanprotected booleanprotected StringBuilderprotected ObjectFields inherited from class net.binis.codegen.spring.modifier.BasePersistenceOperations
entityManagerProvider, factory, NO_TRANSACTION_DEBUG_WARNING, template -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedQueryExecutor(Class<?> returnClass, Supplier<QueryEmbed> queryName, UnaryOperator<QueryExecutor> fieldsExecutor) -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectprotected A_aggregateStart(A aggregate) voidprotected void_backEnvelop(String func) protected void_backInsert(String func) protected StringBuilder_buildAggregatedOrder(StringBuilder order, StringBuilder select) _calcProjection(Class<?> projection) _calcProjection(Class<?> projection, List<String> list) protected org.springframework.data.domain.Page_checkPage(org.springframework.data.domain.Page org) _close()protected void_doLower()protected void_doNot()protected void_doReplace(String what, String withWhat) protected void_doSubstring(int start) protected void_doSubstring(int start, int len) protected void_doTrim()protected void_doUpper()protected voidprotected voidprotected voidprotected String_getFieldName(Class<?> cls, String methodName, String prefix) _getMethods(Class<?> cls) protected void_getMethods(Class<?> cls, Map<String, Method> map) protected Object_identifierUpdate(String id, Object value) protected QuerySelectOperation<S,O, R> _internalFetch(String clause) protected void_mapProperties(Class<?> cls, List<String> list) _open()protected void_operation(String op, Object value) protected O_orderStart(O order) _self()protected void_stripLast(String what) protected void_stripLast(StringBuilder builder, String what) protected voidprotected void_stripToLast(StringBuilder builder, String what) protected void_stripToLastInclude(StringBuilder builder, String what) protected void_subQueryOperation(String op, Queryable query) protected Aprotected String$alias()protected StringBuilder$current()protected booleanprotected boolean$fields()protected voidnet.binis.codegen.spring.query.executor.QueryIdentifier$identifier(String id) $identifier(String id, Object value) protected O$order()protected StringBuilderprotected QueryExecutor$parent()protected net.binis.codegen.spring.query.executor.QueryIdentifierprotected StringBuilder$select()protected StringBuilder$where()voidaggregateFunction(String sum) and()asc()<J> CompletableFuture<J><J> CompletableFuture<J><J> CompletableFuture<J><J> CompletableFuture<J><J> CompletableFuture<J><J> CompletableFuture<J>avg()voidbuildProjection(Class<?> projection) protected voidbuildQuery(StringBuilder query, boolean countQuery) by()<Q> Q<Q> Qvoidcnt()voidcollection(String id, Object value) containsAll(Collection<T> list) containsNone(Collection<T> list) containsOne(Collection<T> list) longcount()voiddelete()desc()disable()distinct()voidensure()execute()booleanexists()flush(jakarta.persistence.FlushModeType type) get()<V> Optional<V>greaterEqual(Queryable query) greaterEqual(T value) group()protected voidhandleContainsCollection(Collection<T> list, String member, String oper) protected voidhandleJoin(Function<Object, Queryable> joinQuery, String joinOperation) in(Collection<T> values) isEmpty()isNull()join()leftJoin()length()list()<V> List<V>lock(jakarta.persistence.LockModeType type) lower()max()min()nativeQuery(String query) not()notContains(T value) booleanor()org.springframework.data.domain.Page<R>page(long pageSize) <V> org.springframework.data.domain.Page<V>org.springframework.data.domain.Page<R>page(org.springframework.data.domain.Pageable pageable) <V> org.springframework.data.domain.Page<V><V> voidvoid<V> voidpaged(org.springframework.data.domain.Pageable pageable, Class<V> cls, Consumer<org.springframework.data.domain.Page<V>> consumer) voidpaged(org.springframework.data.domain.Pageable pageable, Consumer<org.springframework.data.domain.Page<R>> consumer) <V> voidvoid<V> voidvoidparams(Collection<Object> params) prepare()print()<V> QueryExecute<V>projection(Class<V> projection) intremove()intrun()select()voidsetJoinSupplier(IntSupplier supplier) voidsetMocked(UnaryOperator<Object> onValue, UnaryOperator<Object> onParamAdd) voidvoidsize()substring(int start) substring(int start, int len) sum()top()top(long records) <V> List<V><V> Optional<V>voidtransaction(Consumer<QueryStarter<R, S, A, F, U>> consumer) trim()Optional<jakarta.persistence.Tuple>tuple()List<jakarta.persistence.Tuple>tuples()update()upper()where()Methods inherited from class net.binis.codegen.spring.modifier.BasePersistenceOperations
checkMerge, defaultEntityManagerProvider, getEntityManager, init, with, withNewTransactionRes, withResMethods inherited from class net.binis.codegen.modifier.impl.BaseModifierImpl
_if, _if, _if, _map, _self, done, getObject, setObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.binis.codegen.spring.query.QueryOrderStart
orderMethods inherited from interface net.binis.codegen.spring.query.QueryStarter
aggregate
-
Field Details
-
DEFAULT_ALIAS
- See Also:
-
projections
-
CODE_EXECUTOR
- See Also:
-
parent
-
wrapper
-
fieldsCount
protected int fieldsCount -
params
-
resultType
-
queryName
-
fieldsExecutor
-
returnClass
-
aggregateClass
-
mapClass
-
existsClass
-
pageable
protected org.springframework.data.domain.Pageable pageable -
isNative
protected boolean isNative -
isCustom
protected boolean isCustom -
isModifying
protected boolean isModifying -
prepared
protected boolean prepared -
order
-
aggregate
-
enveloped
-
onEnvelop
-
brackets
protected boolean brackets -
condition
protected boolean condition -
lastIdStartPos
protected int lastIdStartPos -
skipNext
protected boolean skipNext -
fields
protected boolean fields -
update
protected boolean update -
distinct
protected boolean distinct -
isGroup
protected boolean isGroup -
selectOrAggregate
protected boolean selectOrAggregate -
projection
protected boolean projection -
mocked
-
query
-
countQuery
-
existsQuery
-
alias
-
select
-
where
-
orderPart
-
group
-
join
-
current
-
joins
protected int joins -
joinSupplier
-
joinFetch
protected boolean joinFetch -
joinClass
-
joinField
-
lastIdentifier
-
flushMode
protected jakarta.persistence.FlushModeType flushMode -
lockMode
protected jakarta.persistence.LockModeType lockMode -
hints
-
filters
-
filter
-
bracketCount
protected int bracketCount -
pagedLoop
protected boolean pagedLoop
-
-
Constructor Details
-
QueryExecutor
protected QueryExecutor(Class<?> returnClass, Supplier<QueryEmbed> queryName, UnaryOperator<QueryExecutor> fieldsExecutor)
-
-
Method Details
-
$identifier
-
_identifierUpdate
-
$identifier
-
embedded
-
_doNot
protected void _doNot() -
_doLower
protected void _doLower() -
_doUpper
protected void _doUpper() -
_doTrim
protected void _doTrim() -
_doSubstring
protected void _doSubstring(int start) -
_doSubstring
protected void _doSubstring(int start, int len) -
_doReplace
-
_backInsert
-
_backEnvelop
-
_envelop
-
_envelop
-
_envelop
-
_operation
-
_orderIdentifier
-
_aggregateIdentifier
-
_orderStart
-
_aggregateStart
-
script
- Specified by:
scriptin interfaceQueryScript<T>
-
script
- Specified by:
scriptin interfaceQueryScript<T>
-
and
- Specified by:
andin interfaceQuerySelectOperation<T,S, O>
-
or
- Specified by:
orin interfaceQuerySelectOperation<T,S, O>
-
_close
- Specified by:
_closein interfaceQuerySelectOperation<T,S, O>
-
_open
-
_if
-
by
-
by
-
select
-
update
-
by
-
by
-
count
public long count()- Specified by:
countin interfaceQueryExecute<T>
-
top
- Specified by:
topin interfaceQueryExecute<T>
-
top
- Specified by:
topin interfaceQueryExecute<T>
-
nativeQuery
- Specified by:
nativeQueryin interfaceQueryStarter<T,S, O, R, A>
-
query
-
transaction
- Specified by:
transactionin interfaceQueryStarter<T,S, O, R, A>
-
asyncC
-
async
-
asyncC
-
async
-
asyncC
public CompletableFuture<Void> asyncC(long delay, TimeUnit unit, Consumer<QueryStarter<R, S, A, F, U>> consumer) -
async
public <J> CompletableFuture<J> async(long delay, TimeUnit unit, Function<QueryStarter<R, S, A, F, U>, J> func) -
asyncC
-
async
public <J> CompletableFuture<J> async(String flow, long delay, TimeUnit unit, Function<QueryStarter<R, S, A, F, U>, J> func) -
asyncC
public CompletableFuture<Void> asyncC(Duration duration, Consumer<QueryStarter<R, S, A, F, U>> consumer) -
async
-
asyncC
-
async
public <J> CompletableFuture<J> async(String flow, Duration duration, Function<QueryStarter<R, S, A, F, U>, J> func) -
top
- Specified by:
topin interfaceQueryExecute<T>
-
top
- Specified by:
topin interfaceQueryExecute<T>
-
page
public org.springframework.data.domain.Page<R> page(org.springframework.data.domain.Pageable pageable) - Specified by:
pagein interfaceQueryExecute<T>
-
page
public <V> org.springframework.data.domain.Page<V> page(org.springframework.data.domain.Pageable pageable, Class<V> cls) - Specified by:
pagein interfaceQueryExecute<T>
-
page
- Specified by:
pagein interfaceQueryExecute<T>
-
page
- Specified by:
pagein interfaceQueryExecute<T>
-
paginated
- Specified by:
paginatedin interfaceQueryExecute<T>
-
paginated
- Specified by:
paginatedin interfaceQueryExecute<T>
-
paginated
- Specified by:
paginatedin interfaceQueryExecute<T>
-
paginated
public <V> void paginated(org.springframework.data.domain.Pageable pageable, Class<V> cls, Consumer<V> consumer) - Specified by:
paginatedin interfaceQueryExecute<T>
-
paged
- Specified by:
pagedin interfaceQueryExecute<T>
-
paged
public void paged(org.springframework.data.domain.Pageable pageable, Consumer<org.springframework.data.domain.Page<R>> consumer) - Specified by:
pagedin interfaceQueryExecute<T>
-
paged
public <V> void paged(long pageSize, Class<V> cls, Consumer<org.springframework.data.domain.Page<V>> consumer) - Specified by:
pagedin interfaceQueryExecute<T>
-
paged
public <V> void paged(org.springframework.data.domain.Pageable pageable, Class<V> cls, Consumer<org.springframework.data.domain.Page<V>> consumer) - Specified by:
pagedin interfaceQueryExecute<T>
-
tuple
- Specified by:
tuplein interfaceQueryExecute<T>
-
tuple
- Specified by:
tuplein interfaceQueryExecute<T>
-
tuples
- Specified by:
tuplesin interfaceQueryExecute<T>
-
prepare
- Specified by:
preparein interfaceQueryExecute<T>
-
tuples
- Specified by:
tuplesin interfaceQueryExecute<T>
-
flush
- Specified by:
flushin interfaceQueryExecute<T>
-
lock
- Specified by:
lockin interfaceQueryExecute<T>
-
hint
- Specified by:
hintin interfaceQueryExecute<T>
-
filter
- Specified by:
filterin interfaceQueryExecute<T>
-
projection
- Specified by:
projectionin interfaceQueryExecute<T>
-
exists
public boolean exists()- Specified by:
existsin interfaceQueryExecute<T>
-
notExists
public boolean notExists()- Specified by:
notExistsin interfaceQueryExecute<T>
-
delete
public void delete()- Specified by:
deletein interfaceQueryExecute<T>
-
remove
public int remove()- Specified by:
removein interfaceQueryExecute<T>
-
print
-
desc
- Specified by:
descin interfaceQueryOrderOperation<T,S>
-
asc
- Specified by:
ascin interfaceQueryOrderOperation<T,S>
-
execute
-
buildQuery
-
list
- Specified by:
listin interfaceQueryExecute<T>
-
reference
-
reference
- Specified by:
referencein interfaceQueryExecute<T>
-
references
- Specified by:
referencesin interfaceQueryExecute<T>
-
ensure
- Specified by:
ensurein interfaceQueryExecute<T>
-
get
- Specified by:
getin interfaceQueryExecute<T>
-
get
- Specified by:
getin interfaceQueryExecute<T>
-
list
- Specified by:
listin interfaceQueryExecute<T>
-
_stripLast
-
_stripLast
-
_stripToLast
-
_stripToLastInclude
-
_stripLastOperator
protected void _stripLastOperator() -
length
- Specified by:
lengthin interfaceQueryFunctions<T,S>
-
equal
- Specified by:
equalin interfaceQueryFunctions<T,S>
-
equal
- Specified by:
equalin interfaceQueryFunctions<T,S>
-
between
- Specified by:
betweenin interfaceQueryFunctions<T,S>
-
in
- Specified by:
inin interfaceQueryFunctions<T,S>
-
in
- Specified by:
inin interfaceQueryFunctions<T,S>
-
in
- Specified by:
inin interfaceQueryFunctions<T,S>
-
_subQueryOperation
-
isNull
- Specified by:
isNullin interfaceQueryFunctions<T,S>
-
isNotNull
- Specified by:
isNotNullin interfaceQueryFunctions<T,S>
-
like
- Specified by:
likein interfaceQueryFunctions<T,S>
-
starts
- Specified by:
startsin interfaceQueryFunctions<T,S>
-
ends
- Specified by:
endsin interfaceQueryFunctions<T,S>
-
contains
- Specified by:
containsin interfaceQueryFunctions<T,S>
-
greater
- Specified by:
greaterin interfaceQueryFunctions<T,S>
-
greater
- Specified by:
greaterin interfaceQueryFunctions<T,S>
-
greaterEqual
- Specified by:
greaterEqualin interfaceQueryFunctions<T,S>
-
greaterEqual
- Specified by:
greaterEqualin interfaceQueryFunctions<T,S>
-
less
- Specified by:
lessin interfaceQueryFunctions<T,S>
-
less
- Specified by:
lessin interfaceQueryFunctions<T,S>
-
lessEqual
- Specified by:
lessEqualin interfaceQueryFunctions<T,S>
-
lessEqual
- Specified by:
lessEqualin interfaceQueryFunctions<T,S>
-
params
- Specified by:
paramsin interfacePreparedQuery<T>- Specified by:
paramsin interfaceQueryParam<T>
-
param
- Specified by:
paramin interfacePreparedQuery<T>
-
param
- Specified by:
paramin interfaceQueryParam<T>
-
run
public int run()- Specified by:
runin interfaceQueryExecute<T>- Specified by:
runin interfaceUpdatableQuery
-
_else
- Specified by:
_elsein interfaceQueryCondition<T,S, O>
-
parameter
- Specified by:
parameterin interfaceQueryFilter<T>
-
disable
- Specified by:
disablein interfaceQueryFilter<T>
-
sum
- Specified by:
sumin interfaceQueryAggregateOperation<T>
-
min
- Specified by:
minin interfaceQueryAggregateOperation<T>
-
max
- Specified by:
maxin interfaceQueryAggregateOperation<T>
-
avg
- Specified by:
avgin interfaceQueryAggregateOperation<T>
-
cnt
- Specified by:
cntin interfaceQueryAggregateOperation<T>
-
distinct
- Specified by:
distinctin interfaceQueryAggregateOperation<T>
-
group
- Specified by:
groupin interfaceQueryAggregateOperation<T>
-
aggregateFunction
-
size
- Specified by:
sizein interfaceQueryCollectionFunctions<T,S>
-
size
- Specified by:
sizein interfaceQueryCollectionFunctions<T,S>
-
collection
-
contains
- Specified by:
containsin interfaceQueryCollectionFunctions<T,S>
-
notContains
- Specified by:
notContainsin interfaceQueryCollectionFunctions<T,S>
-
containsAll
- Specified by:
containsAllin interfaceQueryCollectionFunctions<T,S>
-
containsOne
- Specified by:
containsOnein interfaceQueryCollectionFunctions<T,S>
-
containsNone
- Specified by:
containsNonein interfaceQueryCollectionFunctions<T,S>
-
handleContainsCollection
-
isEmpty
- Specified by:
isEmptyin interfaceQueryCollectionFunctions<T,S>
-
isNotEmpty
- Specified by:
isNotEmptyin interfaceQueryCollectionFunctions<T,S>
-
whereStart
-
_orderStart
-
joinStart
-
where
- Specified by:
wherein interfaceQueryJoinAggregateOperation<T,S>
-
join
-
leftJoin
-
join
- Specified by:
joinin interfaceQueryJoinCollectionFunctions<T,S, O>
-
leftJoin
- Specified by:
leftJoinin interfaceQueryJoinCollectionFunctions<T,S, O>
-
handleJoin
-
joinFetch
- Specified by:
joinFetchin interfaceQueryJoinCollectionFunctions<T,S, O>
-
joinFetch
- Specified by:
joinFetchin interfaceQueryCollectionFunctions<T,S>
-
leftJoinFetch
- Specified by:
leftJoinFetchin interfaceQueryCollectionFunctions<T,S>
-
_internalFetch
-
_buildAggregatedOrder
-
getAccessorAlias
- Specified by:
getAccessorAliasin interfaceQueryAccessor
-
getAccessorSelect
- Specified by:
getAccessorSelectin interfaceQueryAccessor
-
getAccessorWhere
- Specified by:
getAccessorWherein interfaceQueryAccessor
-
getAccessorOrder
- Specified by:
getAccessorOrderin interfaceQueryAccessor
-
getParams
- Specified by:
getParamsin interfaceQueryAccessor
-
getCountQuery
- Specified by:
getCountQueryin interfaceQueryAccessor
-
getExistsQuery
- Specified by:
getExistsQueryin interfaceQueryAccessor
-
setJoinSupplier
- Specified by:
setJoinSupplierin interfaceQueryAccessor
-
setParams
- Specified by:
setParamsin interfaceQueryAccessor
-
setMocked
- Specified by:
setMockedin interfaceMockedQuery
-
_getQueryName
-
lower
-
not
-
replace
-
substring
-
substring
-
trim
-
upper
-
_self
-
buildProjection
-
_calcProjection
-
_calcProjection
-
_mapProperties
-
_getFieldName
-
_getMethods
-
_getMethods
-
checkReferenceConditions
public void checkReferenceConditions() -
$current
-
$orderPart
-
$select
-
$where
-
$order
-
$fields
protected boolean $fields() -
$alias
-
$aggregate
-
$distinct
protected boolean $distinct() -
$fieldsInc
protected void $fieldsInc() -
$parent
-
$retParent
protected net.binis.codegen.spring.query.executor.QueryIdentifier $retParent() -
setParent
- Specified by:
setParentin interfaceQueryEmbed
-
_checkPage
protected org.springframework.data.domain.Page _checkPage(org.springframework.data.domain.Page org) -
_alias
-