SR
- Actual Stream result typeLR
- Actual List result typeOR
- Actual optional single result typeCR
- Actual count result typepublic interface QueryProjectionOperations<SR,LR,OR,CR>
QueryProjection
.Modifier and Type | Method and Description |
---|---|
CR |
countAll()
Count all the results of a query.
|
default <P extends Property> |
findOne(Iterable<P> properties)
Execute query and get an expected unique result as
PropertyBox using given properties as
projection. |
default OR |
findOne(Property... properties)
Execute query and get an expected unique result as
PropertyBox using given properties as
projection. |
<R> OR |
findOne(QueryProjection<R> projection)
Execute the query and get an expected unique result using given
projection to map the result to the
required type. |
default <P extends Property> |
list(Iterable<P> properties)
|
default LR |
list(Property... properties)
|
<R> LR |
list(QueryProjection<R> projection)
Convenience method to obtain the query results
stream(QueryProjection) as a List |
default <P extends Property> |
stream(Iterable<P> properties)
Execute query and get a
Stream of query results as PropertyBox using given
properties as projection. |
default SR |
stream(Property... properties)
Execute query and get a
Stream of query results as PropertyBox using given
properties as projection. |
<R> SR |
stream(QueryProjection<R> projection)
Execute the query and get a
Stream of query results using given projection to map results to
the required type. |
<R> SR stream(QueryProjection<R> projection)
Stream
of query results using given projection
to map results to
the required type.R
- Query projection (result) typeprojection
- Query projection (not null)DataAccessException
- Error in query execution<R> LR list(QueryProjection<R> projection)
stream(QueryProjection)
as a List
R
- Query projection (result) typeprojection
- Query projection (not null)DataAccessException
- Error in query execution<R> OR findOne(QueryProjection<R> projection) throws QueryResults.QueryNonUniqueResultException
projection
to map the result to the
required type.
If more than one result is returned by the query, a QueryResults.QueryNonUniqueResultException
is thrown.
R
- Result typeprojection
- Query projection (not null)QueryResults.QueryNonUniqueResultException
- Only one result expected but more than one was foundDataAccessException
- Error in query executionCR countAll()
DataAccessException
- Error in query executiondefault <P extends Property> SR stream(Iterable<P> properties)
Stream
of query results as PropertyBox
using given
properties
as projection.
Returned PropertyBox
instances will contain the values of the properties specified in given
properties
set.
P
- Property typeproperties
- Property set to use as projection (not null)PropertyBox
streamDataAccessException
- Error in query executiondefault <P extends Property> OR findOne(Iterable<P> properties) throws QueryResults.QueryNonUniqueResultException
PropertyBox
using given properties
as
projection.
Returned PropertyBox
instance will contain the values of the properties specified in given
properties
set.
P
- Property typeproperties
- Property set to use as projection (not null)QueryResults.QueryNonUniqueResultException
- Only one result expected but more than one was foundDataAccessException
- Error in query executiondefault <P extends Property> LR list(Iterable<P> properties)
List
of query results as PropertyBox
using given properties
as projection.
Returned PropertyBox
instances will contain the values of the properties specified in given
properties
set.
P
- Property typeproperties
- Property set to use as projection (not null)PropertyBox
listDataAccessException
- Error in query executiondefault SR stream(Property... properties)
Stream
of query results as PropertyBox
using given
properties
as projection.
Returned PropertyBox
instances will contain the values of the properties specified in given
properties
set.
properties
- Property set to use as projection (not null)PropertyBox
streamDataAccessException
- Error in query executiondefault OR findOne(Property... properties) throws QueryResults.QueryNonUniqueResultException
PropertyBox
using given properties
as
projection.
Returned PropertyBox
instance will contain the values of the properties specified in given
properties
set.
properties
- Property set to use as projection (not null)QueryResults.QueryNonUniqueResultException
- Only one result expected but more than one was foundDataAccessException
- Error in query executiondefault LR list(Property... properties)
List
of query results as PropertyBox
using given properties
as projection.
Returned PropertyBox
instances will contain the values of the properties specified in given
properties
set.
properties
- Property set to use as projection (not null)PropertyBox
listDataAccessException
- Error in query executionCopyright © 2019 The Holon Platform. All rights reserved.