Class QueryTask
java.lang.Object
ch.tocco.nice2.persist.core.api.exec.tasks2.QueryTask
- All Implemented Interfaces:
PersistTask<Query,
,Iterable<Entity>> PersistTaskIterable<Query,
Entity>
Deprecated.
-
Field Summary
Modifier and TypeFieldDescriptionDeprecated.Deprecated.Deprecated.Deprecated.static final Mode.Key
<Query.Mode> Deprecated.Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic PersistTaskIterable
<QueryBuilder, Entity> Deprecated.builds a query and executes it this is a simple composition ofbuildQuery()
andexecuteQuery()
static PersistTask
<QueryBuilder, PrimaryKey[]> Deprecated.builds a query and then gets the keys from itstatic OptionalTask
<QueryBuilder, Query> Deprecated.Builds a query given a query builder object.static OptionalTask
<String, Condition> compileCondition
(String entityName) Deprecated.compile a String to a Conditionstatic OptionalTask
<String, Query> Deprecated.Compile a query given as string into a query.static OptionalTask
<Condition, QueryBuilder> createQueryBuilderFromCondition
(String entityName) Deprecated.creates a QueryBuilder from a ConditionCondition
does not provide an entity name, so we need to provide onestatic QueryTask
Deprecated.Return a task that executes a given query returning a list of entities.Deprecated.Make a task that returns the `EntityList` instead of an iterable of entities.static PersistTask
<Query, PrimaryKey[]> getKeys()
Deprecated.a task that gets the keys from a querystatic OptionalTask
<String, Query> Deprecated.Return a task that creates a “query-for-all“ for the given entity model.run
(Optional<Query> query, CommandContext commandContext) Deprecated.toString()
Deprecated.protected void
verify
(EntityList list, Mode<?> mode) Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.PersistTask
andThenDo, compose, compose2, composeWhen, discardResult, expand, expand, getDescription, ifElse, orWhen, orWhenNot, passWhen, passWhenNot, skipErrors, unwrap
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.PersistTaskIterable
filter, find, flatMap, forEach, get, get, get, getOnlyElement, getOnlyElement, getOnlyElement, map
-
Field Details
-
QUERY_MODE
Deprecated. -
QUERY_LIMIT
Deprecated. -
QUERY_OFFSET
Deprecated. -
EXPECT_COUNT
Deprecated. -
EXPECT_MIN
Deprecated. -
EXPECT_MAX
Deprecated.
-
-
Method Details
-
queryForAll
Deprecated.Return a task that creates a “query-for-all“ for the given entity model. -
executeQuery
Deprecated.Return a task that executes a given query returning a list of entities. To access theEntityList
usegetEntityList()
. -
getKeys
Deprecated.a task that gets the keys from a query- Returns:
- the task
-
compileQuery
Deprecated.Compile a query given as string into a query. This is usually composed withexecuteQuery()
to execute the query. Note that parameters must be set manually (by a subsequent task for example). -
buildQuery
Deprecated.Builds a query given a query builder object. This is usually composed withexecuteQuery()
to execute the query. -
buildAndExecuteQuery
Deprecated.builds a query and executes it this is a simple composition ofbuildQuery()
andexecuteQuery()
- Returns:
- a PersistTaskIterable which accepts a QueryBuilder and returns Entities
-
buildAndGetKeys
Deprecated.builds a query and then gets the keys from it- Returns:
- the keys
-
compileCondition
Deprecated.compile a String to a Condition- Parameters:
entityName
- the entity model for which the condition is written- Returns:
- a task that accepts a String and returns a Condition
-
createQueryBuilderFromCondition
public static OptionalTask<Condition,QueryBuilder> createQueryBuilderFromCondition(String entityName) Deprecated.creates a QueryBuilder from a ConditionCondition
does not provide an entity name, so we need to provide one- Parameters:
entityName
- the entity model which the query builder should look for- Returns:
- a task that accepts a Condition and returns a QueryBuilder
-
run
Deprecated. -
getEntityList
Deprecated.Make a task that returns the `EntityList` instead of an iterable of entities. -
verify
Deprecated. -
toString
Deprecated.
-
QueryBuilderFactory
directly