Skip to content

Fix typo in HibernatePagingItemReaderBuilder#useSatelessSession #632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 the original author or authors.
* Copyright 2017-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,6 +35,7 @@
*
* @author Michael Minella
* @author Glenn Renfro
* @author Mahmoud Ben Hassine
* @since 4.0
* @see HibernatePagingItemReader
*/
Expand Down Expand Up @@ -223,8 +224,24 @@ public HibernatePagingItemReaderBuilder<T> sessionFactory(SessionFactory session
* @param useStatelessSession Defaults to false
* @return this instance for method chaining
* @see HibernatePagingItemReader#setUseStatelessSession(boolean)
* @deprecated This method is deprecated in favor of
* {@link HibernatePagingItemReaderBuilder#useStatelessSession} and will be
* removed in version 4.2.
*/
@Deprecated
public HibernatePagingItemReaderBuilder<T> useSatelessSession(boolean useStatelessSession) {
return useStatelessSession(useStatelessSession);
}

/**
* Indicator for whether to use a {@link org.hibernate.StatelessSession}
* (<code>true</code>) or a {@link org.hibernate.Session} (<code>false</code>).
*
* @param useStatelessSession Defaults to false
* @return this instance for method chaining
* @see HibernatePagingItemReader#setUseStatelessSession(boolean)
*/
public HibernatePagingItemReaderBuilder<T> useStatelessSession(boolean useStatelessSession) {
this.statelessSession = useStatelessSession;

return this;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 the original author or authors.
* Copyright 2017-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,6 +47,7 @@

/**
* @author Michael Minella
* @author Mahmoud Ben Hassine
*/
public class HibernatePagingItemReaderBuilderTests {

Expand Down Expand Up @@ -78,7 +79,7 @@ public void testConfiguration() throws Exception {
.maxItemCount(4)
.pageSize(5)
.queryName("allFoos")
.useSatelessSession(false)
.useStatelessSession(false)
.build();

reader.afterPropertiesSet();
Expand Down