take out even more @deprecated trash
This commit is contained in:
parent
fad946838a
commit
599ffec8fc
|
@ -18,7 +18,7 @@ import org.hibernate.type.Type;
|
|||
*
|
||||
* @deprecated implement {@link Interceptor} directly
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public class EmptyInterceptor implements Interceptor, Serializable {
|
||||
/**
|
||||
* The singleton reference.
|
||||
|
|
|
@ -29,6 +29,6 @@ public @interface DynamicInsert {
|
|||
/**
|
||||
* @deprecated When {@code false}, this annotation has no effect.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
boolean value() default true;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,6 @@ public @interface DynamicUpdate {
|
|||
/**
|
||||
* @deprecated When {@code false}, this annotation has no effect.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
boolean value() default true;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,6 @@ public @interface SelectBeforeUpdate {
|
|||
/**
|
||||
* @deprecated When {@code false}, this annotation has no effect.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
boolean value() default true;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public @interface Table {
|
|||
* @deprecated use {@link jakarta.persistence.Table#indexes()} or
|
||||
* {@link jakarta.persistence.SecondaryTable#indexes()}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
Index[] indexes() default {};
|
||||
|
||||
/**
|
||||
|
@ -60,7 +60,7 @@ public @interface Table {
|
|||
*
|
||||
* @deprecated use {@link jakarta.persistence.SecondaryTable#foreignKey()}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
ForeignKey foreignKey() default @ForeignKey( name="" );
|
||||
|
||||
/**
|
||||
|
|
|
@ -271,7 +271,7 @@ public interface MetadataBuilder {
|
|||
*
|
||||
* @return {@code this}, for method chaining
|
||||
*/
|
||||
MetadataBuilder applyBasicType(BasicType type);
|
||||
MetadataBuilder applyBasicType(BasicType<?> type);
|
||||
|
||||
/**
|
||||
* Specify an additional or overridden basic type mapping supplying specific
|
||||
|
@ -282,7 +282,7 @@ public interface MetadataBuilder {
|
|||
*
|
||||
* @return {@code this}, for method chaining
|
||||
*/
|
||||
MetadataBuilder applyBasicType(BasicType type, String... keys);
|
||||
MetadataBuilder applyBasicType(BasicType<?> type, String... keys);
|
||||
|
||||
/**
|
||||
* Register an additional or overridden custom type mapping.
|
||||
|
@ -292,7 +292,7 @@ public interface MetadataBuilder {
|
|||
*
|
||||
* @return {@code this}, for method chaining
|
||||
*/
|
||||
MetadataBuilder applyBasicType(UserType type, String... keys);
|
||||
MetadataBuilder applyBasicType(UserType<?> type, String... keys);
|
||||
|
||||
/**
|
||||
* Apply an explicit TypeContributor (implicit application via ServiceLoader will still happen too)
|
||||
|
@ -398,7 +398,7 @@ public interface MetadataBuilder {
|
|||
*
|
||||
* @return {@code this} for method chaining
|
||||
*/
|
||||
MetadataBuilder applyAttributeConverter(AttributeConverter attributeConverter, boolean autoApply);
|
||||
MetadataBuilder applyAttributeConverter(AttributeConverter<?,?> attributeConverter, boolean autoApply);
|
||||
|
||||
MetadataBuilder applyIdGenerationTypeInterpreter(IdGeneratorStrategyInterpreter interpreter);
|
||||
|
||||
|
|
|
@ -104,10 +104,10 @@ public class MetadataBuilderImpl implements MetadataBuilderImplementor, TypeCont
|
|||
throw new HibernateException( "ServiceRegistry passed to MetadataBuilder cannot be null" );
|
||||
}
|
||||
|
||||
if ( StandardServiceRegistry.class.isInstance( serviceRegistry ) ) {
|
||||
return ( StandardServiceRegistry ) serviceRegistry;
|
||||
if ( serviceRegistry instanceof StandardServiceRegistry ) {
|
||||
return (StandardServiceRegistry) serviceRegistry;
|
||||
}
|
||||
else if ( BootstrapServiceRegistry.class.isInstance( serviceRegistry ) ) {
|
||||
else if ( serviceRegistry instanceof BootstrapServiceRegistry ) {
|
||||
log.debug(
|
||||
"ServiceRegistry passed to MetadataBuilder was a BootstrapServiceRegistry; this likely won't end well " +
|
||||
"if attempt is made to build SessionFactory"
|
||||
|
@ -258,19 +258,19 @@ public class MetadataBuilderImpl implements MetadataBuilderImplementor, TypeCont
|
|||
}
|
||||
|
||||
@Override
|
||||
public MetadataBuilder applyBasicType(BasicType type) {
|
||||
public MetadataBuilder applyBasicType(BasicType<?> type) {
|
||||
options.basicTypeRegistrations.add( new BasicTypeRegistration( type ) );
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MetadataBuilder applyBasicType(BasicType type, String... keys) {
|
||||
public MetadataBuilder applyBasicType(BasicType<?> type, String... keys) {
|
||||
options.basicTypeRegistrations.add( new BasicTypeRegistration( type, keys ) );
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MetadataBuilder applyBasicType(UserType type, String... keys) {
|
||||
public MetadataBuilder applyBasicType(UserType<?> type, String... keys) {
|
||||
options.basicTypeRegistrations.add( new BasicTypeRegistration( type, keys, getTypeConfiguration() ) );
|
||||
return this;
|
||||
}
|
||||
|
@ -282,17 +282,17 @@ public class MetadataBuilderImpl implements MetadataBuilderImplementor, TypeCont
|
|||
}
|
||||
|
||||
@Override
|
||||
public void contributeType(BasicType type) {
|
||||
public void contributeType(BasicType<?> type) {
|
||||
options.basicTypeRegistrations.add( new BasicTypeRegistration( type ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void contributeType(BasicType type, String... keys) {
|
||||
public void contributeType(BasicType<?> type, String... keys) {
|
||||
options.basicTypeRegistrations.add( new BasicTypeRegistration( type, keys ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void contributeType(UserType type, String[] keys) {
|
||||
public void contributeType(UserType<?> type, String[] keys) {
|
||||
options.basicTypeRegistrations.add( new BasicTypeRegistration( type, keys, getTypeConfiguration() ) );
|
||||
}
|
||||
|
||||
|
@ -394,7 +394,7 @@ public class MetadataBuilderImpl implements MetadataBuilderImplementor, TypeCont
|
|||
}
|
||||
|
||||
@Override
|
||||
public MetadataBuilder applyAttributeConverter(AttributeConverter attributeConverter, boolean autoApply) {
|
||||
public MetadataBuilder applyAttributeConverter(AttributeConverter<?,?> attributeConverter, boolean autoApply) {
|
||||
bootstrapContext.addAttributeConverterDescriptor(
|
||||
new InstanceBasedConverterDescriptor( attributeConverter, autoApply, bootstrapContext.getClassmateContext() )
|
||||
);
|
||||
|
@ -571,25 +571,25 @@ public class MetadataBuilderImpl implements MetadataBuilderImplementor, TypeCont
|
|||
// todo (6.0) : remove bootstrapContext property along with the deprecated methods
|
||||
private BootstrapContext bootstrapContext;
|
||||
|
||||
private ArrayList<BasicTypeRegistration> basicTypeRegistrations = new ArrayList<>();
|
||||
private final ArrayList<BasicTypeRegistration> basicTypeRegistrations = new ArrayList<>();
|
||||
|
||||
private ImplicitNamingStrategy implicitNamingStrategy;
|
||||
private PhysicalNamingStrategy physicalNamingStrategy;
|
||||
|
||||
private SharedCacheMode sharedCacheMode;
|
||||
private AccessType defaultCacheAccessType;
|
||||
private boolean multiTenancyEnabled;
|
||||
private final AccessType defaultCacheAccessType;
|
||||
private final boolean multiTenancyEnabled;
|
||||
private boolean explicitDiscriminatorsForJoinedInheritanceSupported;
|
||||
private boolean implicitDiscriminatorsForJoinedInheritanceSupported;
|
||||
private boolean implicitlyForceDiscriminatorInSelect;
|
||||
private boolean useNationalizedCharacterData;
|
||||
private boolean specjProprietarySyntaxEnabled;
|
||||
private boolean noConstraintByDefault;
|
||||
private ArrayList<MetadataSourceType> sourceProcessOrdering;
|
||||
private final ArrayList<MetadataSourceType> sourceProcessOrdering;
|
||||
|
||||
private IdGeneratorInterpreterImpl idGenerationTypeInterpreter = new IdGeneratorInterpreterImpl();
|
||||
private final IdGeneratorInterpreterImpl idGenerationTypeInterpreter = new IdGeneratorInterpreterImpl();
|
||||
|
||||
private String schemaCharset;
|
||||
private final String schemaCharset;
|
||||
private final boolean xmlMappingEnabled;
|
||||
|
||||
public MetadataBuildingOptionsImpl(StandardServiceRegistry serviceRegistry) {
|
||||
|
@ -665,23 +665,20 @@ public class MetadataBuilderImpl implements MetadataBuilderImplementor, TypeCont
|
|||
|
||||
this.defaultCacheAccessType = configService.getSetting(
|
||||
AvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY,
|
||||
new ConfigurationService.Converter<AccessType>() {
|
||||
@Override
|
||||
public AccessType convert(Object value) {
|
||||
if ( value == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ( CacheConcurrencyStrategy.class.isInstance( value ) ) {
|
||||
return ( (CacheConcurrencyStrategy) value ).toAccessType();
|
||||
}
|
||||
|
||||
if ( AccessType.class.isInstance( value ) ) {
|
||||
return (AccessType) value;
|
||||
}
|
||||
|
||||
return AccessType.fromExternalName( value.toString() );
|
||||
value -> {
|
||||
if ( value == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ( value instanceof CacheConcurrencyStrategy ) {
|
||||
return ( (CacheConcurrencyStrategy) value ).toAccessType();
|
||||
}
|
||||
|
||||
if ( value instanceof AccessType ) {
|
||||
return (AccessType) value;
|
||||
}
|
||||
|
||||
return AccessType.fromExternalName( value.toString() );
|
||||
},
|
||||
// by default, see if the defined RegionFactory (if one) defines a default
|
||||
serviceRegistry.getService( RegionFactory.class ) == null
|
||||
|
@ -704,7 +701,7 @@ public class MetadataBuilderImpl implements MetadataBuilderImplementor, TypeCont
|
|||
this.implicitNamingStrategy = strategySelector.resolveDefaultableStrategy(
|
||||
ImplicitNamingStrategy.class,
|
||||
configService.getSettings().get( AvailableSettings.IMPLICIT_NAMING_STRATEGY ),
|
||||
new Callable<ImplicitNamingStrategy>() {
|
||||
new Callable<>() {
|
||||
@Override
|
||||
public ImplicitNamingStrategy call() {
|
||||
return strategySelector.resolveDefaultableStrategy(
|
||||
|
|
|
@ -45,7 +45,7 @@ public interface TypeContributions {
|
|||
* @deprecated See user-guide section `2.2.46. TypeContributor` for details - `basic_types.adoc`
|
||||
*/
|
||||
@Deprecated(since = "6.0")
|
||||
void contributeType(BasicType type);
|
||||
void contributeType(BasicType<?> type);
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #contributeType(BasicType)} instead. Basic
|
||||
|
@ -58,7 +58,7 @@ public interface TypeContributions {
|
|||
* registration keys and call {@link #contributeType(BasicType)} instead
|
||||
*/
|
||||
@Deprecated(since = "5.3")
|
||||
void contributeType(BasicType type, String... keys);
|
||||
void contributeType(BasicType<?> type, String... keys);
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #contributeType(BasicType)} instead.
|
||||
|
@ -71,5 +71,5 @@ public interface TypeContributions {
|
|||
* and call {@link #contributeType(BasicType)} instead
|
||||
*/
|
||||
@Deprecated(since = "5.3")
|
||||
void contributeType(UserType type, String... keys);
|
||||
void contributeType(UserType<?> type, String... keys);
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ public class ClassLoaderServiceImpl implements ClassLoaderService {
|
|||
* @deprecated No longer used/supported!
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings({"UnusedDeclaration", "unchecked", "deprecation"})
|
||||
@SuppressWarnings({"unchecked"})
|
||||
public static ClassLoaderServiceImpl fromConfigSettings(Map configValues) {
|
||||
final List<ClassLoader> providedClassLoaders = new ArrayList<>();
|
||||
|
||||
|
@ -111,13 +111,6 @@ public class ClassLoaderServiceImpl implements ClassLoaderService {
|
|||
return new ClassLoaderServiceImpl( providedClassLoaders,TcclLookupPrecedence.AFTER );
|
||||
}
|
||||
|
||||
private static void addIfSet(List<ClassLoader> providedClassLoaders, String name, Map configVales) {
|
||||
final ClassLoader providedClassLoader = (ClassLoader) configVales.get( name );
|
||||
if ( providedClassLoader != null ) {
|
||||
providedClassLoaders.add( providedClassLoader );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"unchecked"})
|
||||
public <T> Class<T> classForName(String className) {
|
||||
|
|
|
@ -53,7 +53,6 @@ import org.hibernate.cfg.annotations.NamedEntityGraphDefinition;
|
|||
import org.hibernate.context.spi.CurrentTenantIdentifierResolver;
|
||||
import org.hibernate.internal.CoreLogging;
|
||||
import org.hibernate.internal.CoreMessageLogger;
|
||||
import org.hibernate.internal.util.xml.XmlDocument;
|
||||
import org.hibernate.proxy.EntityNotFoundDelegate;
|
||||
import org.hibernate.query.sqm.function.SqmFunctionDescriptor;
|
||||
import org.hibernate.service.ServiceRegistry;
|
||||
|
@ -308,15 +307,6 @@ public class Configuration {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated No longer supported.
|
||||
*/
|
||||
@Deprecated
|
||||
public Configuration configure(org.w3c.dom.Document document) throws HibernateException {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// MetadataSources ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
public Configuration registerTypeContributor(TypeContributor typeContributor) {
|
||||
|
@ -381,13 +371,6 @@ public class Configuration {
|
|||
return metadataSources.getXmlMappingBinderAccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated No longer supported.
|
||||
*/
|
||||
@Deprecated
|
||||
public void add(XmlDocument metadataXml) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Read mappings that were parsed using {@link #getXmlMappingBinderAccess()}.
|
||||
*
|
||||
|
@ -453,15 +436,6 @@ public class Configuration {
|
|||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated No longer supported
|
||||
*/
|
||||
@Deprecated
|
||||
public Configuration addXML(String xml) throws MappingException {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read mappings from a {@code URL}
|
||||
*
|
||||
|
@ -549,7 +523,6 @@ public class Configuration {
|
|||
*
|
||||
* @return this (for method chaining)
|
||||
*/
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
public Configuration addAnnotatedClass(Class annotatedClass) {
|
||||
metadataSources.addAnnotatedClass( annotatedClass );
|
||||
return this;
|
||||
|
@ -883,13 +856,6 @@ public class Configuration {
|
|||
return namedProcedureCallMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Does nothing
|
||||
*/
|
||||
@Deprecated
|
||||
public void buildMappings() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the incoming properties to the internal properties structure, as long as the internal structure does not
|
||||
* already contain an entry for the given key.
|
||||
|
|
|
@ -21,7 +21,9 @@ package org.hibernate.cfg;
|
|||
* @author Gavin King
|
||||
* @author Emmanuel Bernard
|
||||
*
|
||||
* @deprecated {@link org.hibernate.boot.model.naming.ImplicitNamingStrategy} and {@link org.hibernate.boot.model.naming.PhysicalNamingStrategy} should be used instead.
|
||||
* @deprecated {@link org.hibernate.boot.model.naming.ImplicitNamingStrategy}
|
||||
* and {@link org.hibernate.boot.model.naming.PhysicalNamingStrategy} should
|
||||
* be used instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface NamingStrategy {
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.jboss.logging.Logger;
|
|||
* @deprecated Use {@link SessionFactoryOptions} instead.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public final class Settings {
|
||||
private static final Logger LOG = Logger.getLogger( Settings.class );
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@ public class ConfigurationServiceImpl implements ConfigurationService, ServiceRe
|
|||
return target !=null ? target : defaultValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T cast(Class<T> expected, Object candidate){
|
||||
if (candidate == null) {
|
||||
|
@ -86,8 +85,8 @@ public class ConfigurationServiceImpl implements ConfigurationService, ServiceRe
|
|||
}
|
||||
|
||||
Class<T> target;
|
||||
if ( Class.class.isInstance( candidate ) ) {
|
||||
target = Class.class.cast( candidate );
|
||||
if (candidate instanceof Class) {
|
||||
target = (Class) candidate;
|
||||
}
|
||||
else {
|
||||
try {
|
||||
|
|
|
@ -65,20 +65,6 @@ public interface ConfigurationService extends Service {
|
|||
*/
|
||||
<T> T getSetting(String name, Class<T> expected, T defaultValue);
|
||||
|
||||
/**
|
||||
* Cast {@code candidate} to the instance of {@code expected} type.
|
||||
*
|
||||
* @param expected The type of instance expected to return.
|
||||
* @param candidate The candidate object to be casted.
|
||||
* @param <T> The java type of the expected return
|
||||
*
|
||||
* @return The instance of expected type or null if this cast fail.
|
||||
*
|
||||
* @deprecated No idea why this is exposed here...
|
||||
*/
|
||||
@Deprecated
|
||||
<T> T cast(Class<T> expected, Object candidate);
|
||||
|
||||
/**
|
||||
* Simple conversion contract for converting an untyped object to a specified type.
|
||||
*
|
||||
|
|
|
@ -18,20 +18,6 @@ import java.sql.NClob;
|
|||
public class SerializableNClobProxy extends SerializableClobProxy {
|
||||
private static final Class[] PROXY_INTERFACES = new Class[] { NClob.class, WrappedNClob.class };
|
||||
|
||||
/**
|
||||
* Deprecated.
|
||||
*
|
||||
* @param clob The possible NClob reference
|
||||
*
|
||||
* @return {@code true} if the Clob is a NClob as well
|
||||
*
|
||||
* @deprecated ORM baselines on JDK 1.6, so optional support for NClob (JDK 1,6 addition) is no longer needed.
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean isNClob(Clob clob) {
|
||||
return NClob.class.isInstance( clob );
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a serializable {@link Clob} wrapper around the given {@link Clob}.
|
||||
*
|
||||
|
|
|
@ -226,8 +226,9 @@ public class JdbcEnvironmentImpl implements JdbcEnvironment {
|
|||
|
||||
/**
|
||||
* @deprecated currently used by Hibernate Reactive
|
||||
* This version of the constructor should handle the case in which we do actually have the option to access the DatabaseMetaData,
|
||||
* but since Hibernate Reactive is currently not making use of it we take a shortcut.
|
||||
* This version of the constructor should handle the case in which we do actually have
|
||||
* the option to access the DatabaseMetaData, but since Hibernate Reactive is currently
|
||||
* not making use of it we take a shortcut.
|
||||
*/
|
||||
@Deprecated
|
||||
public JdbcEnvironmentImpl(
|
||||
|
|
|
@ -93,14 +93,4 @@ public interface JdbcEnvironment extends Service {
|
|||
* @return The LobCreator builder.
|
||||
*/
|
||||
LobCreatorBuilder getLobCreatorBuilder();
|
||||
|
||||
/**
|
||||
* @deprecated This is currently not implemented an will likely be removed
|
||||
* (A default method is provided to facilitate removal from implementors)
|
||||
*/
|
||||
@Deprecated
|
||||
default TypeInfo getTypeInfoForJdbcCode(int jdbcTypeCode) {
|
||||
throw new UnsupportedOperationException( "Support for getting TypeInfo from jdbcTypeCode has been disabled as it wasn't used. Use org.hibernate.engine.jdbc.spi.TypeInfo.extractTypeInfo as alternative, or report an issue and explain." );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -166,12 +166,6 @@ public class ParamLocationRecognizer implements ParameterRecognizer {
|
|||
// don't care...
|
||||
}
|
||||
|
||||
@Override
|
||||
public void outParameter(int position) {
|
||||
// don't care...
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Internal in-flight representation of a recognized named parameter
|
||||
*/
|
||||
|
|
|
@ -14,7 +14,6 @@ import java.util.function.Supplier;
|
|||
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.LockMode;
|
||||
import org.hibernate.MappingException;
|
||||
import org.hibernate.query.Query;
|
||||
import org.hibernate.collection.spi.PersistentCollection;
|
||||
import org.hibernate.internal.util.MarkerObject;
|
||||
|
|
|
@ -14,23 +14,6 @@ import org.hibernate.resource.transaction.spi.TransactionStatus;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
public interface TransactionImplementor extends Transaction {
|
||||
/**
|
||||
* Invalidates a transaction handle. This might happen, e.g., when:<ul>
|
||||
* <li>The transaction is committed</li>
|
||||
* <li>The transaction is rolled-back</li>
|
||||
* <li>The session that owns the transaction is closed</li>
|
||||
* </ul>
|
||||
*
|
||||
* @deprecated as part of effort to consolidate support for JPA and Hibernate SessionFactory, Session, etc
|
||||
* natively, support for local Transaction delegates to remain "valid" after they are committed or rolled-back (and to a
|
||||
* degree after the owning Session is closed) to more closely comply with the JPA spec natively in terms
|
||||
* of allowing that extended access after Session is closed. Hibernate impls have all been changed to no-op here.
|
||||
*/
|
||||
@Deprecated(since = "5.2")
|
||||
default void invalidate() {
|
||||
// no-op : see @deprecated note
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate whether a resource transaction is in progress.
|
||||
*
|
||||
|
|
|
@ -88,7 +88,7 @@ import static org.hibernate.event.spi.EventType.UPDATE;
|
|||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public class EventListenerRegistryImpl implements EventListenerRegistry, Stoppable {
|
||||
public class EventListenerRegistryImpl implements EventListenerRegistry {
|
||||
@SuppressWarnings("rawtypes")
|
||||
private final EventListenerGroup[] eventListeners;
|
||||
private final Map<Class<?>,Object> listenerClassToInstanceMap = new HashMap<>();
|
||||
|
@ -197,13 +197,6 @@ public class EventListenerRegistryImpl implements EventListenerRegistry, Stoppab
|
|||
getEventListenerGroup( type ).prependListeners( listeners );
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void stop() {
|
||||
// legacy - no longer used
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Builder
|
||||
|
|
|
@ -17,14 +17,6 @@ import org.hibernate.service.Service;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
public interface EventListenerRegistry extends Service {
|
||||
/**
|
||||
* @deprecated this method was only ever used to initialize the CallbackRegistry
|
||||
* which is now managed as part of the EventEngine
|
||||
*/
|
||||
@Deprecated
|
||||
default void prepare(MetadataImplementor metadata) {
|
||||
// by default do nothing now
|
||||
}
|
||||
|
||||
<T> EventListenerGroup<T> getEventListenerGroup(EventType<T> eventType);
|
||||
|
||||
|
|
|
@ -180,34 +180,7 @@ public final class IdentifierGeneratorHelper {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap the given value in the given Java numeric class.
|
||||
*
|
||||
* @param value The primitive value to wrap.
|
||||
* @param clazz The Java numeric type in which to wrap the value.
|
||||
*
|
||||
* @return The wrapped type.
|
||||
*
|
||||
* @throws IdentifierGenerationException Indicates an unhandled 'clazz'.
|
||||
* @deprecated Use the {@linkplain #getIntegralDataTypeHolder holders} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static Number createNumber(long value, Class clazz) throws IdentifierGenerationException {
|
||||
if ( clazz == Long.class ) {
|
||||
return value;
|
||||
}
|
||||
else if ( clazz == Integer.class ) {
|
||||
return (int) value;
|
||||
}
|
||||
else if ( clazz == Short.class ) {
|
||||
return (short) value;
|
||||
}
|
||||
else {
|
||||
throw new IdentifierGenerationException( "unrecognized id type : " + clazz.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
public static IntegralDataTypeHolder getIntegralDataTypeHolder(Class integralType) {
|
||||
public static IntegralDataTypeHolder getIntegralDataTypeHolder(Class<?> integralType) {
|
||||
if ( integralType == Long.class
|
||||
|| integralType == Integer.class
|
||||
|| integralType == Short.class ) {
|
||||
|
|
|
@ -16,7 +16,7 @@ import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
|||
*
|
||||
* @deprecated see {@link UUIDGenerator}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public interface UUIDGenerationStrategy extends Serializable {
|
||||
/**
|
||||
* Which variant, according to IETF RFC 4122, of UUID does this strategy generate? RFC 4122 defines
|
||||
|
|
|
@ -361,10 +361,6 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont
|
|||
sessionEventsManager.end();
|
||||
}
|
||||
|
||||
if ( currentHibernateTransaction != null ) {
|
||||
currentHibernateTransaction.invalidate();
|
||||
}
|
||||
|
||||
if ( transactionCoordinator != null ) {
|
||||
removeSharedSessionTransactionObserver( transactionCoordinator );
|
||||
}
|
||||
|
|
|
@ -305,14 +305,6 @@ public interface CoreMessageLogger extends BasicLogger {
|
|||
@Message(value = "Fetching database metadata", id = 102)
|
||||
void fetchingDatabaseMetadata();
|
||||
|
||||
/**
|
||||
* @deprecated See {@link QueryLogging#firstOrMaxResultsSpecifiedWithCollectionFetch()}
|
||||
*/
|
||||
@Deprecated
|
||||
@LogMessage(level = WARN)
|
||||
@Message(value = "firstResult/maxResults specified with collection fetch; applying in memory!", id = 104)
|
||||
void firstOrMaxResultsSpecifiedWithCollectionFetch();
|
||||
|
||||
@LogMessage(level = INFO)
|
||||
@Message(value = "Flushes: %s", id = 105)
|
||||
void flushes(long flushCount);
|
||||
|
@ -371,14 +363,6 @@ public interface CoreMessageLogger extends BasicLogger {
|
|||
@Message(value = "Ignoring unique constraints specified on table generator [%s]", id = 120)
|
||||
void ignoringTableGeneratorConstraints(String name);
|
||||
|
||||
/**
|
||||
* @deprecated See {@link org.hibernate.query.QueryLogging#ignoringUnrecognizedQueryHint}
|
||||
*/
|
||||
@LogMessage(level = INFO)
|
||||
@Message(value = "Ignoring unrecognized query hint [%s]", id = 121)
|
||||
@Deprecated
|
||||
void ignoringUnrecognizedQueryHint(String hintName);
|
||||
|
||||
@LogMessage(level = ERROR)
|
||||
@Message(value = "IllegalArgumentException in class: %s, getter method of property: %s", id = 122)
|
||||
void illegalPropertyGetterArgument(
|
||||
|
@ -1027,16 +1011,6 @@ public interface CoreMessageLogger extends BasicLogger {
|
|||
String region,
|
||||
String message);
|
||||
|
||||
/**
|
||||
* @deprecated see {@link org.hibernate.query.QueryLogging#unableToDetermineLockModeValue}
|
||||
*/
|
||||
@LogMessage(level = INFO)
|
||||
@Message(value = "Unable to determine lock mode value : %s -> %s", id = 311)
|
||||
@Deprecated
|
||||
void unableToDetermineLockModeValue(
|
||||
String hintName,
|
||||
Object value);
|
||||
|
||||
@Message(value = "Could not determine transaction status", id = 312)
|
||||
String unableToDetermineTransactionStatus();
|
||||
|
||||
|
@ -1330,14 +1304,6 @@ public interface CoreMessageLogger extends BasicLogger {
|
|||
@Message(value = "Unsuccessful: %s", id = 388)
|
||||
void unsuccessful(String sql);
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #unsuccessfulSchemaManagementCommand} instead
|
||||
*/
|
||||
@LogMessage(level = ERROR)
|
||||
@Message(value = "Unsuccessful: %s", id = 389)
|
||||
@Deprecated
|
||||
void unsuccessfulCreate(String string);
|
||||
|
||||
@LogMessage(level = WARN)
|
||||
@Message(value = "Overriding release mode as connection provider does not support 'after_statement'", id = 390)
|
||||
void unsupportedAfterStatement();
|
||||
|
@ -1614,22 +1580,6 @@ public interface CoreMessageLogger extends BasicLogger {
|
|||
@Message(value = "Exception while discovering OSGi service implementations : %s", id = 453)
|
||||
void unableToDiscoverOsgiService(String service, @Cause Exception e);
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link org.hibernate.internal.log.DeprecationLogger#deprecatedManyToManyOuterJoin} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@LogMessage(level = WARN)
|
||||
@Message(value = "The outer-join attribute on <many-to-many> has been deprecated. Instead of outer-join=\"false\", use lazy=\"extra\" with <map>, <set>, <bag>, <idbag>, or <list>, which will only initialize entities (not as a proxy) as needed.", id = 454)
|
||||
void deprecatedManyToManyOuterJoin();
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link org.hibernate.internal.log.DeprecationLogger#deprecatedManyToManyFetch} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@LogMessage(level = WARN)
|
||||
@Message(value = "The fetch attribute on <many-to-many> has been deprecated. Instead of fetch=\"select\", use lazy=\"extra\" with <map>, <set>, <bag>, <idbag>, or <list>, which will only initialize entities (not as a proxy) as needed.", id = 455)
|
||||
void deprecatedManyToManyFetch();
|
||||
|
||||
@LogMessage(level = WARN)
|
||||
@Message(value = "Named parameters are used for a callable statement, but database metadata indicates named parameters are not supported.", id = 456)
|
||||
void unsupportedNamedParameters();
|
||||
|
|
|
@ -16,7 +16,6 @@ import org.hibernate.SessionEventListener;
|
|||
import org.hibernate.resource.jdbc.spi.PhysicalConnectionHandlingMode;
|
||||
import org.hibernate.resource.jdbc.spi.StatementInspector;
|
||||
import org.hibernate.resource.transaction.backend.jta.internal.synchronization.ExceptionMapper;
|
||||
import org.hibernate.resource.transaction.backend.jta.internal.synchronization.ManagedFlushChecker;
|
||||
|
||||
/**
|
||||
* @author Steve Ebersole
|
||||
|
@ -55,6 +54,4 @@ public interface SessionCreationOptions {
|
|||
// deprecations
|
||||
|
||||
ExceptionMapper getExceptionMapper();
|
||||
|
||||
ManagedFlushChecker getManagedFlushChecker();
|
||||
}
|
||||
|
|
|
@ -88,7 +88,6 @@ import org.hibernate.integrator.spi.Integrator;
|
|||
import org.hibernate.integrator.spi.IntegratorService;
|
||||
import org.hibernate.internal.util.config.ConfigurationHelper;
|
||||
import org.hibernate.jpa.internal.ExceptionMapperLegacyJpaImpl;
|
||||
import org.hibernate.jpa.internal.ManagedFlushCheckerLegacyJpaImpl;
|
||||
import org.hibernate.jpa.internal.PersistenceUnitUtilImpl;
|
||||
import org.hibernate.mapping.Collection;
|
||||
import org.hibernate.mapping.PersistentClass;
|
||||
|
@ -118,7 +117,6 @@ import org.hibernate.query.sqm.NodeBuilder;
|
|||
import org.hibernate.resource.jdbc.spi.PhysicalConnectionHandlingMode;
|
||||
import org.hibernate.resource.jdbc.spi.StatementInspector;
|
||||
import org.hibernate.resource.transaction.backend.jta.internal.synchronization.ExceptionMapper;
|
||||
import org.hibernate.resource.transaction.backend.jta.internal.synchronization.ManagedFlushChecker;
|
||||
import org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder;
|
||||
import org.hibernate.service.spi.ServiceRegistryImplementor;
|
||||
import org.hibernate.service.spi.SessionFactoryServiceRegistry;
|
||||
|
@ -1206,13 +1204,6 @@ public class SessionFactoryImpl implements SessionFactoryImplementor {
|
|||
: null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManagedFlushChecker getManagedFlushChecker() {
|
||||
return sessionOwnerBehavior == SessionOwnerBehavior.LEGACY_JPA
|
||||
? ManagedFlushCheckerLegacyJpaImpl.INSTANCE
|
||||
: null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldAutoJoinTransactions() {
|
||||
return autoJoinTransactions;
|
||||
|
@ -1486,11 +1477,6 @@ public class SessionFactoryImpl implements SessionFactoryImplementor {
|
|||
public ExceptionMapper getExceptionMapper() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManagedFlushChecker getManagedFlushChecker() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
* Hibernate, Relational Persistence for Idiomatic Java
|
||||
*
|
||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||
*/
|
||||
package org.hibernate.internal.util.xml;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Describes a parsed xml document.
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
* @deprecated no longer used
|
||||
*/
|
||||
@Deprecated
|
||||
public interface XmlDocument extends Serializable {
|
||||
|
||||
/**
|
||||
* Retrieve the document's origin.
|
||||
*
|
||||
* @return The origin
|
||||
*/
|
||||
Origin getOrigin();
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/*
|
||||
* Hibernate, Relational Persistence for Idiomatic Java
|
||||
*
|
||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||
*/
|
||||
package org.hibernate.jpa.internal;
|
||||
|
||||
import org.hibernate.FlushMode;
|
||||
import org.hibernate.engine.spi.SessionImplementor;
|
||||
import org.hibernate.resource.transaction.backend.jta.internal.synchronization.ManagedFlushChecker;
|
||||
|
||||
/**
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public class ManagedFlushCheckerLegacyJpaImpl implements ManagedFlushChecker {
|
||||
/**
|
||||
* Singleton access
|
||||
*/
|
||||
public static final ManagedFlushCheckerLegacyJpaImpl INSTANCE = new ManagedFlushCheckerLegacyJpaImpl();
|
||||
|
||||
@Override
|
||||
public boolean shouldDoManagedFlush(SessionImplementor session) {
|
||||
return !session.isClosed()
|
||||
&& session.getHibernateFlushMode() == FlushMode.MANUAL;
|
||||
}
|
||||
}
|
|
@ -258,16 +258,6 @@ public abstract class Collection implements Fetchable, Value, Filterable {
|
|||
return owner;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param owner The owner
|
||||
*
|
||||
* @deprecated Inject the owner into constructor.
|
||||
*/
|
||||
@Deprecated
|
||||
public void setOwner(PersistentClass owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public String getWhere() {
|
||||
return where;
|
||||
}
|
||||
|
|
|
@ -121,8 +121,7 @@ public interface ClassMetadata {
|
|||
/**
|
||||
* Return the values of the mapped properties of the object
|
||||
*
|
||||
* @deprecated Use the form accepting SharedSessionContractImplementor
|
||||
* instead
|
||||
* @deprecated Use the form accepting SharedSessionContractImplementor instead
|
||||
*/
|
||||
@Deprecated(since = "5.3")
|
||||
@SuppressWarnings({"UnusedDeclaration"})
|
||||
|
@ -155,8 +154,7 @@ public interface ClassMetadata {
|
|||
*
|
||||
* @return The instantiated entity.
|
||||
*
|
||||
* @deprecated Use the form accepting SharedSessionContractImplementor
|
||||
* instead
|
||||
* @deprecated Use the form accepting SharedSessionContractImplementor instead
|
||||
*/
|
||||
@Deprecated(since = "5.3")
|
||||
default Object instantiate(Object id, SessionImplementor session) {
|
||||
|
@ -200,10 +198,8 @@ public interface ClassMetadata {
|
|||
* Get the identifier of an instance (throw an exception if no identifier property)
|
||||
*
|
||||
* @deprecated Use {@link #getIdentifier(Object,SharedSessionContractImplementor)} instead
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings( {"JavaDoc"})
|
||||
Object getIdentifier(Object object) throws HibernateException;
|
||||
|
||||
/**
|
||||
|
|
|
@ -31,8 +31,8 @@ public interface EnumValueConverter<O extends Enum<O>, R> extends BasicValueConv
|
|||
/**
|
||||
* @since 6.0
|
||||
*
|
||||
* @deprecated Added temporarily in support of dual SQL execution until fully migrated
|
||||
* to {@link SelectStatement} and {@link JdbcOperation}
|
||||
* @deprecated Added temporarily in support of dual SQL execution until
|
||||
* fully migrated to {@link SelectStatement} and {@link JdbcOperation}
|
||||
*/
|
||||
@Remove
|
||||
@Deprecated
|
||||
|
|
|
@ -5323,11 +5323,6 @@ public abstract class AbstractEntityPersister
|
|||
return representationStrategy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityTuplizer getEntityTuplizer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BytecodeEnhancementMetadata getInstrumentationMetadata() {
|
||||
return getBytecodeEnhancementMetadata();
|
||||
|
|
|
@ -920,10 +920,14 @@ public interface EntityPersister
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns {@code null}.
|
||||
*
|
||||
* @deprecated Use {@link #getRepresentationStrategy()}
|
||||
*/
|
||||
@Deprecated
|
||||
EntityTuplizer getEntityTuplizer();
|
||||
@Deprecated(since = "6.0")
|
||||
default EntityTuplizer getEntityTuplizer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
BytecodeEnhancementMetadata getInstrumentationMetadata();
|
||||
|
||||
|
@ -965,12 +969,4 @@ public interface EntityPersister
|
|||
}
|
||||
|
||||
boolean canUseReferenceCacheEntries();
|
||||
|
||||
/**
|
||||
* @deprecated Since 5.4.1, this is no longer used.
|
||||
*/
|
||||
@Deprecated
|
||||
default boolean canIdentityInsertBeDelayed() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ package org.hibernate.persister.entity;
|
|||
*
|
||||
* @deprecated See {@link org.hibernate.metamodel.mapping.Queryable}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public interface Queryable extends Loadable, PropertyMapping, Joinable {
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,25 +29,6 @@ public final class SerializableProxy extends AbstractSerializableProxy {
|
|||
|
||||
private final CompositeType componentIdType;
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #SerializableProxy(String, Class, Class[], Object, Boolean, String, boolean, Method, Method, CompositeType)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public SerializableProxy(
|
||||
String entityName,
|
||||
Class<?> persistentClass,
|
||||
Class<?>[] interfaces,
|
||||
Serializable id,
|
||||
Boolean readOnly,
|
||||
Method getIdentifierMethod,
|
||||
Method setIdentifierMethod,
|
||||
CompositeType componentIdType) {
|
||||
this(
|
||||
entityName, persistentClass, interfaces, id, readOnly, null, false,
|
||||
getIdentifierMethod, setIdentifierMethod, componentIdType
|
||||
);
|
||||
}
|
||||
|
||||
public SerializableProxy(
|
||||
String entityName,
|
||||
Class<?> persistentClass,
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Hibernate, Relational Persistence for Idiomatic Java
|
||||
*
|
||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.query.criteria;
|
||||
|
||||
import jakarta.persistence.metamodel.ManagedType;
|
||||
|
||||
/**
|
||||
* @author Steve Ebersole
|
||||
*
|
||||
* @deprecated This makes the SQM tree awkward and is not needed for
|
||||
* JPA - JPA has no notion of a "path source" as a tree contract.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface JpaPathSource<T> extends JpaPath<T> {
|
||||
ManagedType<T> getManagedType();
|
||||
}
|
|
@ -122,9 +122,6 @@ public class NativeQueryImpl<R>
|
|||
private Set<String> querySpaces;
|
||||
private Callback callback;
|
||||
|
||||
private Object collectionKey;
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a NativeQueryImpl given a sql query defined in the mappings.
|
||||
*/
|
||||
|
@ -243,7 +240,7 @@ public class NativeQueryImpl<R>
|
|||
);
|
||||
return true;
|
||||
}
|
||||
if ( resultJavaType != null && resultJavaType != Tuple.class ) {
|
||||
// if ( resultJavaType != null && resultJavaType != Tuple.class ) {
|
||||
// todo (6.0): in 5.x we didn't add implicit result builders and by doing so,
|
||||
// the result type check at the end of the constructor will fail like in 5.x
|
||||
// final JpaMetamodel jpaMetamodel = context.getSessionFactory().getJpaMetamodel();
|
||||
|
@ -264,7 +261,7 @@ public class NativeQueryImpl<R>
|
|||
// }
|
||||
//
|
||||
// return true;
|
||||
}
|
||||
// }
|
||||
|
||||
return false;
|
||||
},
|
||||
|
@ -348,7 +345,7 @@ public class NativeQueryImpl<R>
|
|||
return interpretationCache.resolveNativeQueryParameters(
|
||||
sqlString,
|
||||
s -> {
|
||||
final ParameterRecognizerImpl parameterRecognizer = new ParameterRecognizerImpl( session.getFactory() );
|
||||
final ParameterRecognizerImpl parameterRecognizer = new ParameterRecognizerImpl();
|
||||
|
||||
session.getFactory().getServiceRegistry()
|
||||
.getService( NativeQueryInterpreter.class )
|
||||
|
@ -800,7 +797,7 @@ public class NativeQueryImpl<R>
|
|||
}
|
||||
|
||||
@Override
|
||||
protected ScrollableResultsImplementor doScroll(ScrollMode scrollMode) {
|
||||
protected ScrollableResultsImplementor<R> doScroll(ScrollMode scrollMode) {
|
||||
return resolveSelectQueryPlan().performScroll( scrollMode, this );
|
||||
}
|
||||
|
||||
|
@ -840,12 +837,6 @@ public class NativeQueryImpl<R>
|
|||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NativeQueryImplementor<R> setCollectionKey(Object key) {
|
||||
this.collectionKey = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NativeQueryImplementor<R> addScalar(String columnAlias) {
|
||||
return registerBuilder( Builders.scalar( columnAlias ) );
|
||||
|
@ -1438,7 +1429,7 @@ public class NativeQueryImpl<R>
|
|||
return this;
|
||||
}
|
||||
|
||||
@Override @Deprecated @SuppressWarnings("deprecation")
|
||||
@Override @Deprecated
|
||||
public <S> NativeQueryImplementor<S> setResultTransformer(ResultTransformer<S> transformer) {
|
||||
return setTupleTransformer( transformer ).setResultListTransformer( transformer );
|
||||
}
|
||||
|
|
|
@ -13,8 +13,6 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.hibernate.QueryException;
|
||||
import org.hibernate.engine.spi.SessionFactoryImplementor;
|
||||
import org.hibernate.query.QueryParameter;
|
||||
import org.hibernate.query.internal.QueryParameterNamedImpl;
|
||||
import org.hibernate.query.internal.QueryParameterPositionalImpl;
|
||||
import org.hibernate.query.spi.QueryParameterImplementor;
|
||||
|
@ -41,7 +39,7 @@ public class ParameterRecognizerImpl implements ParameterRecognizer {
|
|||
private List<ParameterOccurrence> parameterList;
|
||||
private final StringBuilder sqlStringBuffer = new StringBuilder();
|
||||
|
||||
public ParameterRecognizerImpl(SessionFactoryImplementor factory) {
|
||||
public ParameterRecognizerImpl() {
|
||||
ordinalParameterImplicitPosition = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,9 +42,6 @@ import jakarta.persistence.metamodel.SingularAttribute;
|
|||
@Incubating
|
||||
public interface NativeQueryImplementor<R> extends QueryImplementor<R>, NativeQuery<R>, NameableQuery {
|
||||
|
||||
//TODO: this method is no longer used. Can it be deleted?
|
||||
NativeQueryImplementor<R> setCollectionKey(Object key);
|
||||
|
||||
@Override
|
||||
default LockOptions getLockOptions() {
|
||||
return null;
|
||||
|
|
|
@ -12,19 +12,6 @@ package org.hibernate.query.sql.spi;
|
|||
* @see org.hibernate.engine.query.spi.NativeQueryInterpreter#recognizeParameters
|
||||
*/
|
||||
public interface ParameterRecognizer {
|
||||
/**
|
||||
* Called when an output parameter is recognized. This should only ever be
|
||||
* called once for a query in cases where the JDBC "function call" escape syntax is
|
||||
* recognized, i.e. {@code "{?=call...}"}
|
||||
*
|
||||
* @param sourcePosition The position within the query
|
||||
*
|
||||
* @deprecated Application should use {@link org.hibernate.procedure.ProcedureCall} instead
|
||||
*/
|
||||
@Deprecated(since = "5.2")
|
||||
default void outParameter(int sourcePosition) {
|
||||
throw new UnsupportedOperationException( "Recognizing native query as a function call is no longer supported" );
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when an ordinal parameter is recognized
|
||||
|
|
|
@ -29,10 +29,6 @@ public class DdlTransactionIsolatorNonJtaImpl implements DdlTransactionIsolator
|
|||
this.jdbcContext = jdbcContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void prepare() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public JdbcContext getJdbcContext() {
|
||||
return jdbcContext;
|
||||
|
|
|
@ -75,10 +75,6 @@ public class DdlTransactionIsolatorJtaImpl implements DdlTransactionIsolator {
|
|||
return jdbcContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void prepare() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection getIsolatedConnection() {
|
||||
return jdbcConnection;
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* Hibernate, Relational Persistence for Idiomatic Java
|
||||
*
|
||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||
*/
|
||||
package org.hibernate.resource.transaction.backend.jta.internal.synchronization;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.hibernate.engine.spi.SessionImplementor;
|
||||
|
||||
/**
|
||||
* A pluggable strategy for defining how the {@link jakarta.transaction.Synchronization} registered by Hibernate determines
|
||||
* whether to perform a managed flush. An exceptions from either this delegate or the subsequent flush are routed
|
||||
* through the sister strategy {@link ExceptionMapper}.
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
*
|
||||
* @deprecated no longer needed since integrating HEM into hibernate-core.
|
||||
*/
|
||||
@Deprecated(since = "5.2")
|
||||
public interface ManagedFlushChecker extends Serializable {
|
||||
/**
|
||||
* Check whether we should perform the managed flush
|
||||
*
|
||||
* @param session The Session
|
||||
*
|
||||
* @return True to indicate to perform the managed flush; false otherwise.
|
||||
*/
|
||||
boolean shouldDoManagedFlush(SessionImplementor session);
|
||||
}
|
|
@ -20,23 +20,12 @@ import org.hibernate.tool.schema.internal.exec.JdbcContext;
|
|||
public interface DdlTransactionIsolator {
|
||||
JdbcContext getJdbcContext();
|
||||
|
||||
/**
|
||||
* In general a DdlTransactionIsolator should be returned from
|
||||
* {@link TransactionCoordinatorBuilder#buildDdlTransactionIsolator}
|
||||
* already prepared for use (until {@link #release} is called).
|
||||
*
|
||||
* @deprecated Instances should be returned from
|
||||
* {@link TransactionCoordinatorBuilder#buildDdlTransactionIsolator}
|
||||
* already prepared for use
|
||||
*/
|
||||
@Deprecated
|
||||
void prepare();
|
||||
|
||||
/**
|
||||
* Returns a Connection that is usable within the bounds of the
|
||||
* {@link #prepare} and {@link #release} calls. Further, this
|
||||
* Connection will be isolated (transactionally) from any
|
||||
* transaction in effect prior to the call to {@link #prepare}.
|
||||
* {@link TransactionCoordinatorBuilder#buildDdlTransactionIsolator}
|
||||
* and {@link #release} calls. Further, this Connection will be
|
||||
* isolated (transactionally) from any transaction in effect prior
|
||||
* to the call to {@code buildDdlTransactionIsolator}.
|
||||
*
|
||||
* @return The Connection.
|
||||
*/
|
||||
|
|
|
@ -98,25 +98,6 @@ public final class Template {
|
|||
return renderWhereStringTemplate(sqlWhereString, TEMPLATE, dialect, functionRegistry);
|
||||
}
|
||||
|
||||
/**
|
||||
* Same functionality as {@link #renderWhereStringTemplate(String, String, Dialect, SqmFunctionRegistry)},
|
||||
* except that a SQLFunctionRegistry is not provided (i.e., only the dialect-defined functions are
|
||||
* considered). This is only intended for use by the annotations project until the
|
||||
* many-to-many/map-key-from-target-table feature is pulled into core.
|
||||
*
|
||||
* @deprecated Only intended for annotations usage; use {@link #renderWhereStringTemplate(String, String, Dialect, SqmFunctionRegistry)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public static String renderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect) {
|
||||
final SqmFunctionRegistry sqmFunctionRegistry = new SqmFunctionRegistry();
|
||||
return renderWhereStringTemplate(
|
||||
sqlWhereString,
|
||||
placeholder,
|
||||
dialect,
|
||||
sqmFunctionRegistry
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes the where condition provided in the mapping attribute and interpolates the alias.
|
||||
* Handles sub-selects, quoted identifiers, quoted strings, expressions, SQL functions,
|
||||
|
|
|
@ -24,12 +24,6 @@ public interface CollectionLoadingLogger extends BasicLogger {
|
|||
*/
|
||||
Logger COLL_LOAD_LOGGER = LoadingLogger.subLogger( LOCAL_NAME );
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #COLL_LOAD_LOGGER}
|
||||
*/
|
||||
@Deprecated
|
||||
Logger INSTANCE = COLL_LOAD_LOGGER;
|
||||
|
||||
boolean TRACE_ENABLED = INSTANCE.isTraceEnabled();
|
||||
boolean DEBUG_ENABLED = INSTANCE.isDebugEnabled();
|
||||
boolean TRACE_ENABLED = COLL_LOAD_LOGGER.isTraceEnabled();
|
||||
boolean DEBUG_ENABLED = COLL_LOAD_LOGGER.isDebugEnabled();
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public abstract class AbstractCollectionInitializer implements CollectionInitial
|
|||
);
|
||||
|
||||
if ( CollectionLoadingLogger.DEBUG_ENABLED ) {
|
||||
CollectionLoadingLogger.INSTANCE.debugf(
|
||||
CollectionLoadingLogger.COLL_LOAD_LOGGER.debugf(
|
||||
"(%s) Current row collection key : %s",
|
||||
DelayedCollectionInitializer.class.getSimpleName(),
|
||||
LoggingHelper.toLoggableString( getNavigablePath(), this.collectionKey.getKey() )
|
||||
|
|
|
@ -158,7 +158,7 @@ public abstract class AbstractImmediateCollectionInitializer extends AbstractCol
|
|||
|
||||
if ( collectionInstance.wasInitialized() ) {
|
||||
if ( CollectionLoadingLogger.DEBUG_ENABLED ) {
|
||||
CollectionLoadingLogger.INSTANCE.debugf(
|
||||
COLL_LOAD_LOGGER.debugf(
|
||||
"(%s) Found existing unowned collection instance [%s] in Session; skipping processing - [%s]",
|
||||
getSimpleConcreteImplName(),
|
||||
LoggingHelper.toLoggableString( getNavigablePath(), collectionKey.getKey() ),
|
||||
|
@ -285,7 +285,7 @@ public abstract class AbstractImmediateCollectionInitializer extends AbstractCol
|
|||
if ( collectionValueKey != null ) {
|
||||
// the row contains an element in the collection...
|
||||
if ( CollectionLoadingLogger.DEBUG_ENABLED ) {
|
||||
CollectionLoadingLogger.INSTANCE.debugf(
|
||||
COLL_LOAD_LOGGER.debugf(
|
||||
"(%s) Reading element from row for collection [%s] -> %s",
|
||||
getSimpleConcreteImplName(),
|
||||
LoggingHelper.toLoggableString( getNavigablePath(), collectionKey.getKey() ),
|
||||
|
|
|
@ -519,7 +519,7 @@ public class StatisticsImpl implements StatisticsImplementor, Service {
|
|||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Second-level cache region stats
|
||||
|
||||
@Override @Deprecated
|
||||
@Override
|
||||
public String[] getSecondLevelCacheRegionNames() {
|
||||
return cache.getSecondLevelCacheRegionNames();
|
||||
}
|
||||
|
@ -560,11 +560,6 @@ public class StatisticsImpl implements StatisticsImplementor, Service {
|
|||
);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public CacheRegionStatisticsImpl getSecondLevelCacheStatistics(String regionName) {
|
||||
return getCacheRegionStatistics( cache.unqualifyRegionName( regionName ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getSecondLevelCacheHitCount() {
|
||||
return secondLevelCacheHitCount.sum();
|
||||
|
|
|
@ -49,10 +49,6 @@ class DdlTransactionIsolatorProvidedConnectionImpl implements DdlTransactionIsol
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void prepare() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() {
|
||||
JdbcConnectionAccess connectionAccess = jdbcContext.getJdbcConnectionAccess();
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.hibernate.tuple.Tuplizer;
|
|||
*
|
||||
* @deprecated See {@link org.hibernate.metamodel.spi.EntityRepresentationStrategy}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public interface EntityTuplizer extends Tuplizer {
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.hibernate.tuple.NonIdentifierAttribute;
|
|||
*
|
||||
* @deprecated with no real replacement. this was always intended as an internal class
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "6.0")
|
||||
public class TypeHelper {
|
||||
/**
|
||||
* Disallow instantiation
|
||||
|
|
|
@ -28,7 +28,6 @@ public final class LobTypeMappings {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param jdbcTypeCode
|
||||
* @return true if corresponding Lob code exists; false otherwise.
|
||||
* @deprecated use {@link #isMappedToKnownLobCode(int)}
|
||||
*/
|
||||
|
@ -38,7 +37,6 @@ public final class LobTypeMappings {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param jdbcTypeCode
|
||||
* @return corresponding Lob code
|
||||
* @deprecated use {@link #getLobCodeTypeMapping(int)}
|
||||
*/
|
||||
|
|
|
@ -110,11 +110,6 @@ public class GoofyPersisterClassProvider implements PersisterClassResolver {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityTuplizer getEntityTuplizer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BytecodeEnhancementMetadata getInstrumentationMetadata() {
|
||||
return new BytecodeEnhancementMetadataNonPojoImpl( null );
|
||||
|
|
|
@ -22,7 +22,6 @@ public class OrmXmlParseTest {
|
|||
void parseNamedAttributeNode() {
|
||||
final Configuration cfg = new Configuration();
|
||||
cfg.addURL( getClass().getResource( "orm.xml" ) );
|
||||
cfg.buildMappings();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -130,11 +130,6 @@ public class PersisterClassProviderTest {
|
|||
throw new GoofyException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityTuplizer getEntityTuplizer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BytecodeEnhancementMetadata getInstrumentationMetadata() {
|
||||
return new BytecodeEnhancementMetadataNonPojoImpl( getEntityName() );
|
||||
|
|
|
@ -789,11 +789,6 @@ public class CustomPersister implements EntityPersister {
|
|||
return entityMetamodel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityTuplizer getEntityTuplizer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BytecodeEnhancementMetadata getInstrumentationMetadata() {
|
||||
return new BytecodeEnhancementMetadataNonPojoImpl( getEntityName() );
|
||||
|
|
|
@ -140,12 +140,6 @@ public class ParameterParserTest {
|
|||
public void testParseColonCharacterEscaped() {
|
||||
final StringBuilder captured = new StringBuilder();
|
||||
ParameterRecognizer recognizer = new ParameterRecognizer() {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void outParameter(int position) {
|
||||
fail();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ordinalParameter(int position) {
|
||||
fail();
|
||||
|
|
|
@ -200,11 +200,6 @@ public class TestExtraPhysicalTableTypes {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void prepare() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection getIsolatedConnection() {
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue