deprecate layer-breaking method SessionFactory.getSessionFactoryOptions()

This commit is contained in:
Gavin 2023-01-11 12:17:13 +01:00 committed by Gavin King
parent e23318aa95
commit 32c8977406
1 changed files with 11 additions and 7 deletions

View File

@ -117,13 +117,6 @@ import jakarta.persistence.EntityManagerFactory;
* @author Steve Ebersole
*/
public interface SessionFactory extends EntityManagerFactory, Referenceable, Serializable, java.io.Closeable {
/**
* Get the special options used to build the factory.
*
* @return The special options used to build the factory.
*/
SessionFactoryOptions getSessionFactoryOptions();
/**
* Obtain a {@linkplain SessionBuilder session builder} for creating
* new {@link Session}s with certain customized options.
@ -410,4 +403,15 @@ public interface SessionFactory extends EntityManagerFactory, Referenceable, Ser
return getDefinedFilterNames().contains( name );
}
/**
* Get the {@linkplain SessionFactoryOptions options} used to build this factory.
*
* @return The special options used to build the factory.
*
* @deprecated There is no plan to remove this operation, but its use should be
* avoided since {@link SessionFactoryOptions} is an SPI type, and so
* this operation is a layer-breaker.
*/
@Deprecated(since = "6.2")
SessionFactoryOptions getSessionFactoryOptions();
}