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 SummaryFieldsModifier and TypeFieldDescriptionDeprecated.Deprecated.Deprecated.Deprecated.static final Mode.Key<Query.Mode> Deprecated.Deprecated.
- 
Method SummaryModifier 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 ConditionConditiondoes not provide an entity name, so we need to provide onestatic QueryTaskDeprecated.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 voidverify(EntityList list, Mode<?> mode) Deprecated.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.tocco.nice2.persist.core.api.exec.PersistTaskandThenDo, compose, compose2, composeWhen, discardResult, expand, expand, getDescription, ifElse, orWhen, orWhenNot, passWhen, passWhenNot, skipErrors, unwrapMethods inherited from interface ch.tocco.nice2.persist.core.api.exec.PersistTaskIterablefilter, find, flatMap, forEach, get, get, get, getOnlyElement, getOnlyElement, getOnlyElement, map
- 
Field Details- 
QUERY_MODEDeprecated.
- 
QUERY_LIMITDeprecated.
- 
QUERY_OFFSETDeprecated.
- 
EXPECT_COUNTDeprecated.
- 
EXPECT_MINDeprecated.
- 
EXPECT_MAXDeprecated.
 
- 
- 
Method Details- 
queryForAllDeprecated.Return a task that creates a “query-for-all“ for the given entity model.
- 
executeQueryDeprecated.Return a task that executes a given query returning a list of entities. To access theEntityListusegetEntityList().
- 
getKeysDeprecated.a task that gets the keys from a query- Returns:
- the task
 
- 
compileQueryDeprecated.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).
- 
buildQueryDeprecated.Builds a query given a query builder object. This is usually composed withexecuteQuery()to execute the query.
- 
buildAndExecuteQueryDeprecated.builds a query and executes it this is a simple composition ofbuildQuery()andexecuteQuery()- Returns:
- a PersistTaskIterable which accepts a QueryBuilder and returns Entities
 
- 
buildAndGetKeysDeprecated.builds a query and then gets the keys from it- Returns:
- the keys
 
- 
compileConditionDeprecated.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
 
- 
createQueryBuilderFromConditionpublic static OptionalTask<Condition,QueryBuilder> createQueryBuilderFromCondition(String entityName) Deprecated.creates a QueryBuilder from a ConditionConditiondoes 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
 
- 
runDeprecated.
- 
getEntityListDeprecated.Make a task that returns the `EntityList` instead of an iterable of entities.
- 
verifyDeprecated.
- 
toStringDeprecated.
 
- 
QueryBuilderFactorydirectly