Class QueryBuilderFactoryImpl
java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.query.builder.QueryBuilderFactoryImpl
- All Implemented Interfaces:
- QueryBuilderFactory
- 
Constructor SummaryConstructorsConstructorDescriptionQueryBuilderFactoryImpl(PersistenceService persistenceService, TypeManager typeManager) 
- 
Method SummaryModifier and TypeMethodDescriptionasPredicate(Condition condition) Create a newCountQueryBuilderwhich executes count queries.Create a newCountQueryBuilderwhich executes count queries.Create a newCountQueryBuilderwhich executes count queries.Create a newCountQueryBuilderwhich executes count queries.booleanEvaluates the given `condition` against the given entity.Create anEntityQueryBuilderwith the provided entity model as rootresolve(EntityReference source, Path relationPath) resolve(EntityReference source, String relationPath) Create anEntityQueryBuilderthat first resolves the given relation path and uses the target entity model of the given relation path as query root.resolveKeys(EntityReference source, Path relationPath) resolveKeys(EntityReference source, String relationPath) Create anPrimaryKeyQueryBuilderthat first resolves the given relation path and uses the target entity model of the given relation path as query root.<E> SinglePathQueryBuilder<E> Create aSinglePathQueryBuilderwith the provided entity model as root and the single column as selection<T> PathQueryBuilder<T> Create aPathQueryBuilderwith the provided entity model as root and the provided columns as selectionMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.tocco.nice2.persist.core.api.hibernate.query.builder.QueryBuilderFactoryevaluate, select
- 
Constructor Details- 
QueryBuilderFactoryImpl
 
- 
- 
Method Details- 
findDescription copied from interface:QueryBuilderFactoryCreate anEntityQueryBuilderwith the provided entity model as root- Specified by:
- findin interface- QueryBuilderFactory
- Parameters:
- entityModel- the target entity model
- Returns:
- the created EntityQueryBuilder
 
- 
findKeys- Specified by:
- findKeysin interface- QueryBuilderFactory
 
- 
selectDescription copied from interface:QueryBuilderFactoryCreate aPathQueryBuilderwith the provided entity model as root and the provided columns as selection- Specified by:
- selectin interface- QueryBuilderFactory
- Parameters:
- returnType- the type the query returns, currently either Map or Object[]
- entityModel- the target entity model
- columns- the columns to select
- Returns:
- the created PathQueryBuilder
 
- 
selectDescription copied from interface:QueryBuilderFactoryCreate aSinglePathQueryBuilderwith the provided entity model as root and the single column as selection- Specified by:
- selectin interface- QueryBuilderFactory
- Type Parameters:
- E- the return type, equal to the type of the selected column
- Parameters:
- type- the type of the selected column
- entityModel- the target entity model
- column- the selected column
- Returns:
- the created SinglePathQueryBuilder
 
- 
resolveDescription copied from interface:QueryBuilderFactoryCreate anEntityQueryBuilderthat first resolves the given relation path and uses the target entity model of the given relation path as query root.- Specified by:
- resolvein interface- QueryBuilderFactory
- Parameters:
- source- the source entity
- relationPath- the relation path, e.g. 'relAddress_user.relAddress'
- Returns:
- the created EntityQueryBuilder
 
- 
resolve- Specified by:
- resolvein interface- QueryBuilderFactory
 
- 
resolveKeysDescription copied from interface:QueryBuilderFactoryCreate anPrimaryKeyQueryBuilderthat first resolves the given relation path and uses the target entity model of the given relation path as query root.- Specified by:
- resolveKeysin interface- QueryBuilderFactory
- Parameters:
- source- the source entity
- relationPath- the relation path, e.g. 'relAddress_user.relAddress'
- Returns:
- the created PrimaryKeyQueryBuilder
 
- 
resolveKeys- Specified by:
- resolveKeysin interface- QueryBuilderFactory
 
- 
countDescription copied from interface:QueryBuilderFactoryCreate a newCountQueryBuilderwhich executes count queries.- Specified by:
- countin interface- QueryBuilderFactory
- Parameters:
- entityClass- the root entity
 
- 
countDescription copied from interface:QueryBuilderFactoryCreate a newCountQueryBuilderwhich executes count queries.- Specified by:
- countin interface- QueryBuilderFactory
- Parameters:
- modelName- the model name of the root entity
 
- 
countDescription copied from interface:QueryBuilderFactoryCreate a newCountQueryBuilderwhich executes count queries.- Specified by:
- countin interface- QueryBuilderFactory
- Parameters:
- entityClass- the root entity
- hints- optional hints about the query (see- QueryHintsfor available hints)
 
- 
countDescription copied from interface:QueryBuilderFactoryCreate a newCountQueryBuilderwhich executes count queries.- Specified by:
- countin interface- QueryBuilderFactory
- Parameters:
- modelName- the model name of the root entity
- hints- optional hints about the query (see- QueryHintsfor available hints)
 
- 
evaluateDescription copied from interface:QueryBuilderFactoryEvaluates the given `condition` against the given entity. Returns `true` if the entity would have been returned from a query formed by `condition`, `false` otherwise. The `params` map must contain all parameter values if those are used within the `condition`. Note that subqueries (like `EXISTS` and `COUNT`) and functions (like `fulltext` or `DISTANCE`) are currently *not* supported. `JdbcFunction`s (like `DISTANCE`) can't work anyways as they are directly translated to database calls.- Specified by:
- evaluatein interface- QueryBuilderFactory
 
- 
asPredicateDescription copied from interface:QueryBuilderFactoryGet aPredicatefor the providedCondition. It can be used, for example to filter a list of previously loadedEntitys.- Specified by:
- asPredicatein interface- QueryBuilderFactory
- Parameters:
- condition- a- Condition
 
 
-