Some deprecation removals (#4681)
* Remove deprecations in org.hibernate.action.internal Signed-off-by: Jan Schatteman <jschatte@redhat.com> * Remove deprecated org.hibernate.lob.ReaderInputStream Signed-off-by: Jan Schatteman <jschatte@redhat.com> * Remove deprecated org.hibernate.tool.schema.extract.spi.SequenceInformation.getIncrementSize() Signed-off-by: Jan Schatteman <jschatte@redhat.com> * Update hibernate-core/src/main/java/org/hibernate/tool/schema/internal/AbstractSchemaValidator.java Co-authored-by: Christian Beikov <christian.beikov@gmail.com> Co-authored-by: Christian Beikov <christian.beikov@gmail.com>
This commit is contained in:
parent
a79891a426
commit
27b2271130
|
@ -16,10 +16,7 @@ import org.hibernate.cache.spi.access.CollectionDataAccess;
|
||||||
import org.hibernate.cache.spi.access.SoftLock;
|
import org.hibernate.cache.spi.access.SoftLock;
|
||||||
import org.hibernate.collection.spi.PersistentCollection;
|
import org.hibernate.collection.spi.PersistentCollection;
|
||||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||||
import org.hibernate.event.service.spi.EventListenerGroup;
|
|
||||||
import org.hibernate.event.service.spi.EventListenerRegistry;
|
|
||||||
import org.hibernate.event.spi.EventSource;
|
import org.hibernate.event.spi.EventSource;
|
||||||
import org.hibernate.event.spi.EventType;
|
|
||||||
import org.hibernate.internal.FastSessionServices;
|
import org.hibernate.internal.FastSessionServices;
|
||||||
import org.hibernate.internal.util.StringHelper;
|
import org.hibernate.internal.util.StringHelper;
|
||||||
import org.hibernate.persister.collection.CollectionPersister;
|
import org.hibernate.persister.collection.CollectionPersister;
|
||||||
|
@ -185,19 +182,6 @@ public abstract class CollectionAction implements Executable, Serializable, Comp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated This will be removed as it's not very efficient. If you need access to EventListenerGroup(s),
|
|
||||||
* use the direct references from {@link #getFastSessionServices()}.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
protected <T> EventListenerGroup<T> listenerGroup(EventType<T> eventType) {
|
|
||||||
return getSession()
|
|
||||||
.getFactory()
|
|
||||||
.getServiceRegistry()
|
|
||||||
.getService( EventListenerRegistry.class )
|
|
||||||
.getEventListenerGroup( eventType );
|
|
||||||
}
|
|
||||||
|
|
||||||
protected EventSource eventSource() {
|
protected EventSource eventSource() {
|
||||||
return (EventSource) getSession();
|
return (EventSource) getSession();
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,19 +187,6 @@ public abstract class EntityAction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated This will be removed as it's not very efficient. If you need access to EventListenerGroup(s),
|
|
||||||
* use the direct references from {@link #getFastSessionServices()}.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
protected <T> EventListenerGroup<T> listenerGroup(EventType<T> eventType) {
|
|
||||||
return getSession()
|
|
||||||
.getFactory()
|
|
||||||
.getServiceRegistry()
|
|
||||||
.getService( EventListenerRegistry.class )
|
|
||||||
.getEventListenerGroup( eventType );
|
|
||||||
}
|
|
||||||
|
|
||||||
protected EventSource eventSource() {
|
protected EventSource eventSource() {
|
||||||
return (EventSource) getSession();
|
return (EventSource) getSession();
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,19 +201,6 @@ public class EntityIdentityInsertAction extends AbstractEntityInsertAction {
|
||||||
this.generatedId = generatedId;
|
this.generatedId = generatedId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Access to the delayed entity key
|
|
||||||
*
|
|
||||||
* @return The delayed entity key
|
|
||||||
*
|
|
||||||
* @deprecated No Hibernate code currently uses this method
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
@SuppressWarnings("UnusedDeclaration")
|
|
||||||
public EntityKey getDelayedEntityKey() {
|
|
||||||
return delayedEntityKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEarlyInsert() {
|
public boolean isEarlyInsert() {
|
||||||
return !isDelayed;
|
return !isDelayed;
|
||||||
|
|
|
@ -1,28 +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.lob;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.Reader;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Exposes a {@link Reader} as an {@link java.io.InputStream}.
|
|
||||||
*
|
|
||||||
* @deprecated Should not be used anymore.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public class ReaderInputStream extends org.hibernate.engine.jdbc.ReaderInputStream {
|
|
||||||
|
|
||||||
public ReaderInputStream(Reader reader) {
|
|
||||||
super(reader);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int read() throws IOException {
|
|
||||||
return super.read();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -22,19 +22,6 @@ public interface SequenceInformation {
|
||||||
*/
|
*/
|
||||||
QualifiedSequenceName getSequenceName();
|
QualifiedSequenceName getSequenceName();
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieve the extracted increment-size defined for the sequence.
|
|
||||||
*
|
|
||||||
* @return The extracted increment size; use a negative number to indicate the increment could not be extracted.
|
|
||||||
*
|
|
||||||
* @deprecated use {@link #getIncrementValue()} instead.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default int getIncrementSize() {
|
|
||||||
Long incrementSize = getIncrementValue();
|
|
||||||
return incrementSize != null ? incrementSize.intValue() : -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the extracted start value defined for the sequence.
|
* Retrieve the extracted start value defined for the sequence.
|
||||||
*
|
*
|
||||||
|
|
|
@ -187,13 +187,13 @@ public abstract class AbstractSchemaValidator implements SchemaValidator {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( sequenceInformation.getIncrementSize() > 0
|
if ( sequenceInformation.getIncrementValue() != null && sequenceInformation.getIncrementValue() > 0
|
||||||
&& sequence.getIncrementSize() != sequenceInformation.getIncrementSize() ) {
|
&& sequence.getIncrementSize() != sequenceInformation.getIncrementValue() ) {
|
||||||
throw new SchemaManagementException(
|
throw new SchemaManagementException(
|
||||||
String.format(
|
String.format(
|
||||||
"Schema-validation: sequence [%s] defined inconsistent increment-size; found [%s] but expecting [%s]",
|
"Schema-validation: sequence [%s] defined inconsistent increment-size; found [%s] but expecting [%s]",
|
||||||
sequence.getName(),
|
sequence.getName(),
|
||||||
sequenceInformation.getIncrementSize(),
|
sequenceInformation.getIncrementValue(),
|
||||||
sequence.getIncrementSize()
|
sequence.getIncrementSize()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue