Class HibernateItemWriterBuilder<T>
- java.lang.Object
- org.springframework.batch.item.database.builder.HibernateItemWriterBuilder<T>
public class HibernateItemWriterBuilder<T> extends java.lang.ObjectA builder for theHibernateItemWriter- Since:
- 4.0
- Author:
- Michael Minella
- See Also:
HibernateItemWriter
Constructor Summary
Constructors Constructor Description HibernateItemWriterBuilder()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HibernateItemWriter<T>build()Returns a fully builtHibernateItemWriterHibernateItemWriterBuilder<T>clearSession(boolean clearSession)If set to false, theSessionwill not be cleared at the end of the chunk.HibernateItemWriterBuilder<T>sessionFactory(org.hibernate.SessionFactory sessionFactory)The HibernateSessionFactoryto obtain a session from.
Method Detail
clearSession
public HibernateItemWriterBuilder<T> clearSession(boolean clearSession)
If set to false, theSessionwill not be cleared at the end of the chunk.- Parameters:
clearSession- defaults to true- Returns:
- this instance for method chaining
- See Also:
HibernateItemWriter.setClearSession(boolean)
sessionFactory
public HibernateItemWriterBuilder<T> sessionFactory(org.hibernate.SessionFactory sessionFactory)
The HibernateSessionFactoryto obtain a session from. Required.- Parameters:
sessionFactory- theSessionFactory- Returns:
- this instance for method chaining
- See Also:
HibernateItemWriter.setSessionFactory(SessionFactory)
build
public HibernateItemWriter<T> build()
Returns a fully builtHibernateItemWriter- Returns:
- the writer