Deprecate Hibernate support

Resolves #4150
This commit is contained in:
Mahmoud Ben Hassine
2022-08-24 15:49:29 +02:00
parent 4d0ed63dd7
commit 0a75bc7d84
10 changed files with 34 additions and 7 deletions

View File

@@ -53,7 +53,9 @@ import org.springframework.util.ClassUtils;
* @author Robert Kasanicky
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @deprecated since 5.0 for removal in 5.2. Use the {@link JpaCursorItemReader} instead.
*/
@Deprecated(since = "5.0", forRemoval = true)
public class HibernateCursorItemReader<T> extends AbstractItemCountingItemStreamItemReader<T>
implements InitializingBean {

View File

@@ -37,7 +37,9 @@ import org.springframework.util.StringUtils;
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @author June Young. Park
* @deprecated since 5.0 for removal in 5.2. Use the JPA item readers instead.
*/
@Deprecated(since = "5.0", forRemoval = true)
public class HibernateItemReaderHelper<T> implements InitializingBean {
private SessionFactory sessionFactory;

View File

@@ -43,8 +43,10 @@ import org.springframework.util.Assert;
* @author Thomas Risberg
* @author Michael Minella
* @author Mahmoud Ben Hassine
* @deprecated since 5.0 for removal in 5.2. Use the {@link JpaItemWriter} instead.
*
*/
@Deprecated(since = "5.0", forRemoval = true)
public class HibernateItemWriter<T> implements ItemWriter<T>, InitializingBean {
protected static final Log logger = LogFactory.getLog(HibernateItemWriter.class);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2013 the original author or authors.
* Copyright 2006-2022 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.
@@ -51,8 +51,11 @@ import org.springframework.util.ClassUtils;
* </p>
*
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @since 2.1
* @deprecated since 5.0 for removal in 5.2. Use the {@link JpaPagingItemReader} instead.
*/
@Deprecated(since = "5.0", forRemoval = true)
public class HibernatePagingItemReader<T> extends AbstractPagingItemReader<T> implements InitializingBean {
private HibernateItemReaderHelper<T> helper = new HibernateItemReaderHelper<>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 the original author or authors.
* Copyright 2017-2022 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.
@@ -40,7 +40,10 @@ import org.springframework.util.StringUtils;
* @author Mahmoud Ben Hassine
* @since 4.0
* @see HibernateCursorItemReader
* @deprecated since 5.0 for removal in 5.2. Use the {@link JpaCursorItemReaderBuilder}
* instead.
*/
@Deprecated(since = "5.0", forRemoval = true)
public class HibernateCursorItemReaderBuilder<T> {
private Map<String, Object> parameterValues;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017 the original author or authors.
* Copyright 2017-2022 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.
@@ -24,9 +24,12 @@ import org.springframework.util.Assert;
* A builder for the {@link HibernateItemWriter}
*
* @author Michael Minella
* @author Mahmoud Ben Hassine
* @since 4.0
* @see HibernateItemWriter
* @deprecated since 5.0 for removal in 5.2. Use the {@link JpaItemWriterBuilder} instead.
*/
@Deprecated(since = "5.0", forRemoval = true)
public class HibernateItemWriterBuilder<T> {
private boolean clearSession = true;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2021 the original author or authors.
* Copyright 2017-2022 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.
@@ -38,7 +38,10 @@ import org.springframework.util.StringUtils;
* @author Mahmoud Ben Hassine
* @since 4.0
* @see HibernatePagingItemReader
* @deprecated since 5.0 for removal in 5.2. Use the {@link JpaPagingItemReaderBuilder}
* instead.
*/
@Deprecated(since = "5.0", forRemoval = true)
public class HibernatePagingItemReaderBuilder<T> {
private int pageSize = 10;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2013 the original author or authors.
* Copyright 2006-2022 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.
@@ -35,9 +35,11 @@ import org.hibernate.StatelessSession;
*
* @author Anatoly Polinsky
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @since 2.1
*
*/
@Deprecated(since = "5.0", forRemoval = true)
public abstract class AbstractHibernateQueryProvider<T> implements HibernateQueryProvider<T> {
private StatelessSession statelessSession;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2008 the original author or authors.
* Copyright 2006-2022 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.
@@ -30,8 +30,12 @@ import org.springframework.util.StringUtils;
* </p>
*
* @author Anatoly Polinsky
* @author Mahmoud Ben Hassine
* @param <E> entity returned by executing the query
* @deprecated since 5.0 for removal in 5.2. Use the {@link JpaNativeQueryProvider}
* instead.
*/
@Deprecated(since = "5.0", forRemoval = true)
public class HibernateNativeQueryProvider<E> extends AbstractHibernateQueryProvider<E> {
private String sqlQuery;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2008 the original author or authors.
* Copyright 2006-2022 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.
@@ -29,9 +29,12 @@ import org.springframework.batch.item.ItemReader;
*
* @author Anatoly Polinsky
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @since 2.1
* @deprecated since 5.0 for removal in 5.2. Use the {@link JpaQueryProvider} instead.
*
*/
@Deprecated(since = "5.0", forRemoval = true)
public interface HibernateQueryProvider<T> {
/**