public class UpdateExecutor extends Object
Constructor and Description |
---|
UpdateExecutor() |
Modifier and Type | Method and Description |
---|---|
static int |
executeUpdateQuery(javax.persistence.EntityManager em,
String template,
Object[] params,
org.hibernate.type.Type[] types,
List<Long> ids)
Perform an update query using a String template and params.
|
public static int executeUpdateQuery(javax.persistence.EntityManager em, String template, Object[] params, org.hibernate.type.Type[] types, List<Long> ids)
em
- The entity manager to use for the persistence operationtemplate
- the overall update sql template. The IN clause parameter should be written using 'IN (%s)'.params
- any other params that are present in the sql template, other than the IN clause. Should be written using '?'. Should be in order. Can be null.types
- the Type
instances that identify the types for the params. Should be in order and match the length of params. Can be null.ids
- the ids to include in the IN clause.Copyright © 2017. All rights reserved.