Class UpdateType<X>
java.lang.Object
org.dellroad.querystream.jpa.querytype.QueryType<X,CriteriaUpdate<X>,CriteriaUpdate<X>,Query>
org.dellroad.querystream.jpa.querytype.UpdateType<X>
- Type Parameters:
X
- query target type
Represents the JPA Criteria API bulk update query type.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateCriteriaQuery
(CriteriaBuilder builder) Create a new Criteria API query object of the appropriate type.createQuery
(EntityManager entityManager, CriteriaUpdate<X> query) Create a JPA query object of the appropriate type.void
where
(CriteriaUpdate<X> query, Expression<Boolean> restriction) Configure the restriction associated with the given query.void
where
(CriteriaUpdate<X> query, Predicate restriction) Configure the restriction associated with the given query.
-
Constructor Details
-
UpdateType
Constructor.- Parameters:
type
- query result type- Throws:
IllegalArgumentException
- iftype
is null
-
-
Method Details
-
createCriteriaQuery
Description copied from class:QueryType
Create a new Criteria API query object of the appropriate type.- Specified by:
createCriteriaQuery
in classQueryType<X,
CriteriaUpdate<X>, CriteriaUpdate<X>, Query> - Parameters:
builder
- criteria builder- Returns:
- new criteria query object
-
createQuery
Description copied from class:QueryType
Create a JPA query object of the appropriate type.- Specified by:
createQuery
in classQueryType<X,
CriteriaUpdate<X>, CriteriaUpdate<X>, Query> - Parameters:
entityManager
- JPA entity managerquery
- criteria query object- Returns:
- new executable JPA query object
-
where
Description copied from class:QueryType
Configure the restriction associated with the given query.- Specified by:
where
in classQueryType<X,
CriteriaUpdate<X>, CriteriaUpdate<X>, Query> - Parameters:
query
- criteria query objectrestriction
- query restriction
-
where
Description copied from class:QueryType
Configure the restriction associated with the given query.- Specified by:
where
in classQueryType<X,
CriteriaUpdate<X>, CriteriaUpdate<X>, Query> - Parameters:
query
- criteria query objectrestriction
- query restriction
-