public class JpaItemWriterBuilder<T>
extends java.lang.Object
JpaItemWriter
.JpaItemWriter
Constructor and Description |
---|
JpaItemWriterBuilder() |
Modifier and Type | Method and Description |
---|---|
JpaItemWriter<T> |
build()
Returns a fully built
JpaItemWriter . |
JpaItemWriterBuilder<T> |
entityManagerFactory(javax.persistence.EntityManagerFactory entityManagerFactory)
The JPA
EntityManagerFactory to obtain an entity manager from. |
JpaItemWriterBuilder<T> |
usePersist(boolean usePersist)
Set whether the entity manager should perform a persist instead of a merge.
|
public JpaItemWriterBuilder<T> entityManagerFactory(javax.persistence.EntityManagerFactory entityManagerFactory)
EntityManagerFactory
to obtain an entity manager from. Required.entityManagerFactory
- the EntityManagerFactory
JpaItemWriter.setEntityManagerFactory(EntityManagerFactory)
public JpaItemWriterBuilder<T> usePersist(boolean usePersist)
usePersist
- defaults to falseJpaItemWriter.setUsePersist(boolean)
public JpaItemWriter<T> build()
JpaItemWriter
.