diff --git a/hibernate-core/src/main/java/org/hibernate/NotYetImplementedFor6Exception.java b/hibernate-core/src/main/java/org/hibernate/NotYetImplementedFor6Exception.java deleted file mode 100644 index 11ef51be69..0000000000 --- a/hibernate-core/src/main/java/org/hibernate/NotYetImplementedFor6Exception.java +++ /dev/null @@ -1,30 +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; - -import org.hibernate.metamodel.mapping.NonTransientException; - -/** - * Thrown from methods added for 6.0 that are not yet implemented. - * - * todo (6.0) : prior going final, we need to find all usages of this and implement all methods (or throw a different exception) - */ -@Internal -public class NotYetImplementedFor6Exception extends RuntimeException implements NonTransientException, - NotImplementedYetException { - public NotYetImplementedFor6Exception(String message) { - super( message ); - } - - public NotYetImplementedFor6Exception(Class clazz) { - super( clazz.getName() ); - } - - public NotYetImplementedFor6Exception() { - super( "Not yet implemented" ); - } -} diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/internal/BinderHelper.java b/hibernate-core/src/main/java/org/hibernate/boot/model/internal/BinderHelper.java index 08ff3b72cd..75c6a4bb04 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/internal/BinderHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/internal/BinderHelper.java @@ -238,9 +238,6 @@ public class BinderHelper { if ( properties.size() == 1 // necessary to handle the case where the columnOwner is a supertype && ownerEntity == columnOwner - //TODO: this is only necessary because of a NotYetImplementedFor6Exception - // in MappingMetamodelCreationHelper.interpretToOneKeyDescriptor - // and ideally we should remove this last condition once that is fixed && !( properties.get(0).getValue() instanceof ToOne ) ) { // no need to make a synthetic property return properties.get(0); diff --git a/hibernate-core/src/main/java/org/hibernate/boot/query/SqlResultSetMappingDescriptor.java b/hibernate-core/src/main/java/org/hibernate/boot/query/SqlResultSetMappingDescriptor.java index 09a3318248..8fbc642f62 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/query/SqlResultSetMappingDescriptor.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/query/SqlResultSetMappingDescriptor.java @@ -11,15 +11,9 @@ import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; -import jakarta.persistence.ColumnResult; -import jakarta.persistence.ConstructorResult; -import jakarta.persistence.EntityResult; -import jakarta.persistence.FieldResult; -import jakarta.persistence.SqlResultSetMapping; import org.hibernate.LockMode; import org.hibernate.MappingException; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.boot.spi.MetadataBuildingContext; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.internal.util.collections.CollectionHelper; @@ -30,7 +24,6 @@ import org.hibernate.metamodel.mapping.EntityMappingType; import org.hibernate.metamodel.mapping.ModelPart; import org.hibernate.metamodel.mapping.ModelPartContainer; import org.hibernate.metamodel.mapping.internal.EmbeddedAttributeMapping; -import org.hibernate.spi.NavigablePath; import org.hibernate.query.internal.FetchMementoBasicStandard; import org.hibernate.query.internal.FetchMementoEntityStandard; import org.hibernate.query.internal.ModelPartResultMementoBasicImpl; @@ -44,9 +37,16 @@ import org.hibernate.query.named.FetchMementoBasic; import org.hibernate.query.named.NamedResultSetMappingMemento; import org.hibernate.query.named.ResultMemento; import org.hibernate.query.named.ResultMementoInstantiation.ArgumentMemento; +import org.hibernate.spi.NavigablePath; import org.hibernate.sql.results.graph.entity.EntityValuedFetchable; import org.hibernate.type.descriptor.java.JavaType; +import jakarta.persistence.ColumnResult; +import jakarta.persistence.ConstructorResult; +import jakarta.persistence.EntityResult; +import jakarta.persistence.FieldResult; +import jakarta.persistence.SqlResultSetMapping; + /** * @author Steve Ebersole */ @@ -387,7 +387,7 @@ public class SqlResultSetMappingDescriptor implements NamedResultSetMappingDescr return new ModelPartResultMementoBasicImpl( path, basicPart, columnNames.get( 0 ) ); } - throw new NotYetImplementedFor6Exception( + throw new UnsupportedOperationException( "Only support for basic-valued model-parts have been implemented : " + propertyPath + " [" + subPart + "]" ); @@ -436,7 +436,7 @@ public class SqlResultSetMappingDescriptor implements NamedResultSetMappingDescr propertyPath.indexOf( "." ) + 1), null ); return getFetchMemento( navigablePath,subPart1 ); } - throw new NotYetImplementedFor6Exception( + throw new UnsupportedOperationException( "Only support for basic-valued, entity-valued and embedded model-parts have been implemented : " + propertyPath + " [" + subPart + "]" ); diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java index b6a85beae4..18ade53864 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java @@ -42,7 +42,6 @@ import java.util.regex.Pattern; import org.hibernate.Incubating; import org.hibernate.LockMode; import org.hibernate.LockOptions; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.ScrollMode; import org.hibernate.boot.TempTableDdlTransactionHandling; import org.hibernate.boot.model.TypeContributions; @@ -158,8 +157,8 @@ import org.hibernate.tool.schema.internal.StandardTableCleaner; import org.hibernate.tool.schema.internal.StandardTableExporter; import org.hibernate.tool.schema.internal.StandardTableMigrator; import org.hibernate.tool.schema.internal.StandardUniqueKeyExporter; -import org.hibernate.tool.schema.internal.TableMigrator; import org.hibernate.tool.schema.internal.StandardUserDefinedTypeExporter; +import org.hibernate.tool.schema.internal.TableMigrator; import org.hibernate.tool.schema.spi.Cleaner; import org.hibernate.tool.schema.spi.Exporter; import org.hibernate.tool.schema.spi.SchemaManagementTool; @@ -194,7 +193,39 @@ import jakarta.persistence.TemporalType; import static java.lang.Math.ceil; import static java.lang.Math.log; import static org.hibernate.internal.util.StringHelper.parseCommaSeparatedString; -import static org.hibernate.type.SqlTypes.*; +import static org.hibernate.type.SqlTypes.ARRAY; +import static org.hibernate.type.SqlTypes.BIGINT; +import static org.hibernate.type.SqlTypes.BINARY; +import static org.hibernate.type.SqlTypes.BLOB; +import static org.hibernate.type.SqlTypes.BOOLEAN; +import static org.hibernate.type.SqlTypes.CHAR; +import static org.hibernate.type.SqlTypes.CLOB; +import static org.hibernate.type.SqlTypes.DATE; +import static org.hibernate.type.SqlTypes.DECIMAL; +import static org.hibernate.type.SqlTypes.DOUBLE; +import static org.hibernate.type.SqlTypes.FLOAT; +import static org.hibernate.type.SqlTypes.INTEGER; +import static org.hibernate.type.SqlTypes.LONG32NVARCHAR; +import static org.hibernate.type.SqlTypes.LONG32VARBINARY; +import static org.hibernate.type.SqlTypes.LONG32VARCHAR; +import static org.hibernate.type.SqlTypes.NCHAR; +import static org.hibernate.type.SqlTypes.NCLOB; +import static org.hibernate.type.SqlTypes.NUMERIC; +import static org.hibernate.type.SqlTypes.NVARCHAR; +import static org.hibernate.type.SqlTypes.REAL; +import static org.hibernate.type.SqlTypes.SMALLINT; +import static org.hibernate.type.SqlTypes.TIME; +import static org.hibernate.type.SqlTypes.TIMESTAMP; +import static org.hibernate.type.SqlTypes.TIMESTAMP_UTC; +import static org.hibernate.type.SqlTypes.TIMESTAMP_WITH_TIMEZONE; +import static org.hibernate.type.SqlTypes.TIME_WITH_TIMEZONE; +import static org.hibernate.type.SqlTypes.TINYINT; +import static org.hibernate.type.SqlTypes.VARBINARY; +import static org.hibernate.type.SqlTypes.VARCHAR; +import static org.hibernate.type.SqlTypes.isFloatOrRealOrDouble; +import static org.hibernate.type.SqlTypes.isNumericOrDecimal; +import static org.hibernate.type.SqlTypes.isVarbinaryType; +import static org.hibernate.type.SqlTypes.isVarcharType; import static org.hibernate.type.descriptor.DateTimeUtils.JDBC_ESCAPE_END; import static org.hibernate.type.descriptor.DateTimeUtils.JDBC_ESCAPE_START_DATE; import static org.hibernate.type.descriptor.DateTimeUtils.JDBC_ESCAPE_START_TIME; @@ -1289,7 +1320,7 @@ public abstract class Dialect implements ConversionContext { * @param toTemporalType true if the second argument is */ public String timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException( "`" + getClass().getName() + "` does not yet support #timestampdiffPattern" ); } /** @@ -1302,7 +1333,7 @@ public abstract class Dialect implements ConversionContext { * @param intervalType The type of interval to add or null if it's not a native interval */ public String timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException( "`" + getClass().getName() + "` does not yet support #timestampaddPattern" ); } /** diff --git a/hibernate-core/src/main/java/org/hibernate/id/factory/internal/AutoGenerationTypeStrategy.java b/hibernate-core/src/main/java/org/hibernate/id/factory/internal/AutoGenerationTypeStrategy.java index b992a42266..9db449f431 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/factory/internal/AutoGenerationTypeStrategy.java +++ b/hibernate-core/src/main/java/org/hibernate/id/factory/internal/AutoGenerationTypeStrategy.java @@ -8,7 +8,6 @@ package org.hibernate.id.factory.internal; import java.util.Properties; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.id.IdentifierGenerator; import org.hibernate.id.factory.spi.GenerationTypeStrategy; import org.hibernate.id.factory.spi.GeneratorDefinitionResolver; @@ -32,7 +31,6 @@ public class AutoGenerationTypeStrategy implements GenerationTypeStrategy { GeneratorDefinitionResolver definitionResolver, ServiceRegistry serviceRegistry) { assert generationType == null || generationType == GenerationType.AUTO; - - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException( "`" + getClass().getName() + "#createIdentifierGenerator not yet implemented" ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/id/factory/internal/IdentityGenerationTypeStrategy.java b/hibernate-core/src/main/java/org/hibernate/id/factory/internal/IdentityGenerationTypeStrategy.java index 7b141ee1ec..bb2cb23bdd 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/factory/internal/IdentityGenerationTypeStrategy.java +++ b/hibernate-core/src/main/java/org/hibernate/id/factory/internal/IdentityGenerationTypeStrategy.java @@ -8,7 +8,6 @@ package org.hibernate.id.factory.internal; import java.util.Properties; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.id.IdentifierGenerator; import org.hibernate.id.factory.spi.GenerationTypeStrategy; import org.hibernate.id.factory.spi.GeneratorDefinitionResolver; @@ -31,6 +30,6 @@ public class IdentityGenerationTypeStrategy implements GenerationTypeStrategy { Properties config, GeneratorDefinitionResolver definitionResolver, ServiceRegistry serviceRegistry) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException( "`" + getClass().getName() + "#createIdentifierGenerator not yet implemented" ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/id/factory/internal/SequenceGenerationTypeStrategy.java b/hibernate-core/src/main/java/org/hibernate/id/factory/internal/SequenceGenerationTypeStrategy.java index e41f1716b9..befb96ae6d 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/factory/internal/SequenceGenerationTypeStrategy.java +++ b/hibernate-core/src/main/java/org/hibernate/id/factory/internal/SequenceGenerationTypeStrategy.java @@ -8,7 +8,6 @@ package org.hibernate.id.factory.internal; import java.util.Properties; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.id.IdentifierGenerator; import org.hibernate.id.factory.spi.GenerationTypeStrategy; import org.hibernate.id.factory.spi.GeneratorDefinitionResolver; @@ -31,6 +30,6 @@ public class SequenceGenerationTypeStrategy implements GenerationTypeStrategy { Properties config, GeneratorDefinitionResolver definitionResolver, ServiceRegistry serviceRegistry) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException( "`" + getClass().getName() + "#createIdentifierGenerator not yet implemented" ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/id/factory/internal/StandardIdentifierGeneratorFactory.java b/hibernate-core/src/main/java/org/hibernate/id/factory/internal/StandardIdentifierGeneratorFactory.java index c9b3253256..5a12d82780 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/factory/internal/StandardIdentifierGeneratorFactory.java +++ b/hibernate-core/src/main/java/org/hibernate/id/factory/internal/StandardIdentifierGeneratorFactory.java @@ -10,16 +10,15 @@ import java.io.Serializable; import java.util.Map; import java.util.Properties; import java.util.concurrent.ConcurrentHashMap; -import jakarta.persistence.GenerationType; import org.hibernate.MappingException; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.boot.registry.classloading.spi.ClassLoaderService; import org.hibernate.boot.registry.classloading.spi.ClassLoadingException; import org.hibernate.boot.registry.selector.spi.StrategySelector; import org.hibernate.dialect.Dialect; import org.hibernate.engine.config.spi.ConfigurationService; import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment; +import org.hibernate.generator.Generator; import org.hibernate.id.Assigned; import org.hibernate.id.Configurable; import org.hibernate.id.ForeignGenerator; @@ -44,10 +43,11 @@ import org.hibernate.resource.beans.internal.FallbackBeanInstanceProducer; import org.hibernate.resource.beans.internal.Helper; import org.hibernate.resource.beans.spi.ManagedBeanRegistry; import org.hibernate.service.ServiceRegistry; -import org.hibernate.generator.Generator; import org.hibernate.type.Type; import org.hibernate.type.descriptor.java.JavaType; +import jakarta.persistence.GenerationType; + import static org.hibernate.cfg.AvailableSettings.IDENTIFIER_GENERATOR_STRATEGY_PROVIDER; import static org.hibernate.id.factory.IdGenFactoryLogging.ID_GEN_FAC_LOGGER; @@ -193,7 +193,7 @@ public class StandardIdentifierGeneratorFactory serviceRegistry ); } - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException( "No GenerationTypeStrategy specified" ); } @Override @Deprecated diff --git a/hibernate-core/src/main/java/org/hibernate/id/factory/internal/TableGenerationTypeStrategy.java b/hibernate-core/src/main/java/org/hibernate/id/factory/internal/TableGenerationTypeStrategy.java index 9aa1b4dd82..cb5af4b015 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/factory/internal/TableGenerationTypeStrategy.java +++ b/hibernate-core/src/main/java/org/hibernate/id/factory/internal/TableGenerationTypeStrategy.java @@ -8,7 +8,6 @@ package org.hibernate.id.factory.internal; import java.util.Properties; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.id.IdentifierGenerator; import org.hibernate.id.factory.spi.GenerationTypeStrategy; import org.hibernate.id.factory.spi.GeneratorDefinitionResolver; @@ -31,6 +30,6 @@ public class TableGenerationTypeStrategy implements GenerationTypeStrategy { Properties config, GeneratorDefinitionResolver definitionResolver, ServiceRegistry serviceRegistry) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException( "`" + getClass().getName() + "#createIdentifierGenerator not yet implemented" ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/id/factory/internal/UUIDGenerationTypeStrategy.java b/hibernate-core/src/main/java/org/hibernate/id/factory/internal/UUIDGenerationTypeStrategy.java index d3f90aa7e7..de7c7402ad 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/factory/internal/UUIDGenerationTypeStrategy.java +++ b/hibernate-core/src/main/java/org/hibernate/id/factory/internal/UUIDGenerationTypeStrategy.java @@ -8,7 +8,6 @@ package org.hibernate.id.factory.internal; import java.util.Properties; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.id.IdentifierGenerator; import org.hibernate.id.factory.spi.GenerationTypeStrategy; import org.hibernate.id.factory.spi.GeneratorDefinitionResolver; @@ -31,6 +30,6 @@ public class UUIDGenerationTypeStrategy implements GenerationTypeStrategy { Properties config, GeneratorDefinitionResolver definitionResolver, ServiceRegistry serviceRegistry) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException( "`" + getClass().getName() + "#createIdentifierGenerator not yet implemented" ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/id/insert/DelegateHelper.java b/hibernate-core/src/main/java/org/hibernate/id/insert/DelegateHelper.java deleted file mode 100644 index 16343c405c..0000000000 --- a/hibernate-core/src/main/java/org/hibernate/id/insert/DelegateHelper.java +++ /dev/null @@ -1,23 +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 . - */ -package org.hibernate.id.insert; - -import org.hibernate.NotYetImplementedFor6Exception; -import org.hibernate.id.PostInsertIdentityPersister; - -class DelegateHelper { - static String getKeyColumnName(PostInsertIdentityPersister persister) { - String[] columnNames = persister.getRootTableKeyColumnNames(); - if ( columnNames.length != 1 ) { - //TODO: remove this limitation - throw new NotYetImplementedFor6Exception("GetGeneratedKeysDelegate does not yet support multi-column Generators"); - } - return columnNames[0]; - } - - -} diff --git a/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/MultiNaturalIdLoaderStandard.java b/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/MultiNaturalIdLoaderStandard.java index 7a39df3913..aa3aa305ad 100644 --- a/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/MultiNaturalIdLoaderStandard.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/MultiNaturalIdLoaderStandard.java @@ -11,7 +11,6 @@ import java.util.List; import org.hibernate.LockMode; import org.hibernate.LockOptions; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.loader.ast.spi.MultiNaturalIdLoadOptions; @@ -89,7 +88,7 @@ public class MultiNaturalIdLoaderStandard implements MultiNaturalIdLoader } if ( options.isOrderReturnEnabled() ) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException( "Support for ordered loading by multiple natural-id values is not supported" ); } return results; diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/RuntimeMetamodelsImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/RuntimeMetamodelsImpl.java index 6814d234e7..885321a818 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/RuntimeMetamodelsImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/RuntimeMetamodelsImpl.java @@ -6,7 +6,6 @@ */ package org.hibernate.metamodel.internal; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.boot.spi.BootstrapContext; import org.hibernate.boot.spi.MetadataImplementor; import org.hibernate.internal.SessionFactoryImpl; @@ -39,7 +38,7 @@ public class RuntimeMetamodelsImpl implements RuntimeMetamodelsImplementor { @Override public EmbeddableValuedModelPart getEmbedded(String role) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException( "Locating EmbeddableValuedModelPart by (String) role is not supported" ); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractDomainPath.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractDomainPath.java index d7f64661ee..1fed0f2821 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractDomainPath.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractDomainPath.java @@ -9,18 +9,16 @@ package org.hibernate.metamodel.mapping.internal; import java.util.ArrayList; import java.util.List; -import org.hibernate.NotYetImplementedFor6Exception; -import org.hibernate.metamodel.mapping.ordering.ast.OrderingExpression; -import org.hibernate.query.sqm.NullPrecedence; -import org.hibernate.query.sqm.SortOrder; import org.hibernate.metamodel.mapping.BasicValuedModelPart; import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart; import org.hibernate.metamodel.mapping.EntityValuedModelPart; import org.hibernate.metamodel.mapping.ModelPart; import org.hibernate.metamodel.mapping.SelectableMapping; import org.hibernate.metamodel.mapping.ordering.ast.DomainPath; +import org.hibernate.metamodel.mapping.ordering.ast.OrderingExpression; +import org.hibernate.query.sqm.NullPrecedence; +import org.hibernate.query.sqm.SortOrder; import org.hibernate.sql.ast.spi.SqlAstCreationState; -import org.hibernate.sql.ast.spi.SqlExpressionResolver; import org.hibernate.sql.ast.tree.SqlAstNode; import org.hibernate.sql.ast.tree.expression.ColumnReference; import org.hibernate.sql.ast.tree.expression.Expression; @@ -101,7 +99,7 @@ public abstract class AbstractDomainPath implements DomainPath { } else { // sure it can happen - throw new NotYetImplementedFor6Exception( "Ordering for " + referenceModelPart + " not supported" ); + throw new UnsupportedOperationException( "Ordering for " + referenceModelPart + " not supported" ); } } @@ -191,7 +189,7 @@ public abstract class AbstractDomainPath implements DomainPath { } else { // sure it can happen - throw new NotYetImplementedFor6Exception( "Ordering for " + getReferenceModelPart() + " not supported" ); + throw new UnsupportedOperationException( "Ordering for " + getReferenceModelPart() + " not supported" ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractEmbeddableMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractEmbeddableMapping.java index 14fbf2f420..49956adde9 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractEmbeddableMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AbstractEmbeddableMapping.java @@ -11,7 +11,6 @@ import java.util.Locale; import java.util.function.Consumer; import org.hibernate.MappingException; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.SharedSessionContract; import org.hibernate.bytecode.spi.ReflectionOptimizer; import org.hibernate.dialect.Dialect; @@ -353,12 +352,12 @@ public abstract class AbstractEmbeddableMapping implements EmbeddableMappingType @Override public Serializable disassemble(Object value, SharedSessionContract session) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public Object assemble(Serializable cached, SharedSessionContract session) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } }; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AnyDiscriminatorPart.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AnyDiscriminatorPart.java index 6d18b3ff16..7a2b96e00d 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AnyDiscriminatorPart.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/AnyDiscriminatorPart.java @@ -9,7 +9,6 @@ package org.hibernate.metamodel.mapping.internal; import java.io.Serializable; import java.util.function.BiConsumer; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.FetchStyle; import org.hibernate.engine.FetchTiming; import org.hibernate.engine.spi.SessionFactoryImplementor; @@ -190,13 +189,13 @@ public class AnyDiscriminatorPart implements BasicValuedModelPart, FetchOptions, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public void applySqlSelections( NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override @@ -205,7 +204,7 @@ public class AnyDiscriminatorPart implements BasicValuedModelPart, FetchOptions, TableGroup tableGroup, DomainResultCreationState creationState, BiConsumer selectionConsumer) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override @@ -220,7 +219,7 @@ public class AnyDiscriminatorPart implements BasicValuedModelPart, FetchOptions, int offset, JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/CompoundNaturalIdMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/CompoundNaturalIdMapping.java index 1e3f67c62f..b91129ba7a 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/CompoundNaturalIdMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/CompoundNaturalIdMapping.java @@ -14,7 +14,6 @@ import java.util.function.BiConsumer; import java.util.function.Consumer; import org.hibernate.HibernateException; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.spi.PersistenceContext; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; @@ -258,7 +257,8 @@ public class CompoundNaturalIdMapping extends AbstractNaturalIdMapping implement @Override public JavaType getJavaType() { - throw new NotYetImplementedFor6Exception( getClass() ); + // the JavaType is the entity itself + return getDeclaringType().getJavaType(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddableMappingTypeImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddableMappingTypeImpl.java index 642e8c50f0..27574d9faf 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddableMappingTypeImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddableMappingTypeImpl.java @@ -13,7 +13,6 @@ import java.util.function.Consumer; import java.util.function.Function; import org.hibernate.MappingException; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.SharedSessionContract; import org.hibernate.cfg.Environment; import org.hibernate.dialect.Dialect; @@ -463,12 +462,12 @@ public class EmbeddableMappingTypeImpl extends AbstractEmbeddableMapping impleme @Override public Serializable disassemble(Object value, SharedSessionContract session) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public Object assemble(Serializable cached, SharedSessionContract session) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } }; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/IdClassEmbeddable.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/IdClassEmbeddable.java index 2a3ef984a1..c721aaa88c 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/IdClassEmbeddable.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/IdClassEmbeddable.java @@ -9,7 +9,6 @@ package org.hibernate.metamodel.mapping.internal; import java.util.List; import java.util.function.Consumer; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.FetchStyle; import org.hibernate.engine.FetchTiming; import org.hibernate.engine.spi.EntityKey; @@ -438,7 +437,7 @@ public class IdClassEmbeddable extends AbstractEmbeddableMapping implements Iden int offset, JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override @@ -451,7 +450,7 @@ public class IdClassEmbeddable extends AbstractEmbeddableMapping implements Iden @Override public DomainResult createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java index 1c025205e4..23b7188f9c 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/MappingModelCreationHelper.java @@ -15,7 +15,6 @@ import java.util.SortedSet; import org.hibernate.FetchMode; import org.hibernate.MappingException; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.SharedSessionContract; import org.hibernate.collection.internal.StandardArraySemantics; import org.hibernate.collection.internal.StandardBagSemantics; @@ -346,12 +345,12 @@ public class MappingModelCreationHelper { @Override public Serializable disassemble(Object value, SharedSessionContract session) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public Object assemble(Serializable cached, SharedSessionContract session) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } }; } @@ -719,7 +718,7 @@ public class MappingModelCreationHelper { creationProcess.registerForeignKey( collectionDescriptor.getAttributeMapping(), keyDescriptor ); } else { - throw new NotYetImplementedFor6Exception( + throw new UnsupportedOperationException( "Support for " + fkTargetPart.getClass() + " foreign keys not yet implemented: " + bootValueMapping.getRole() ); } @@ -809,7 +808,7 @@ public class MappingModelCreationHelper { .getEntityName() + " -> " + bootProperty.getName() ); } else { - throw new NotYetImplementedFor6Exception( + throw new UnsupportedOperationException( "Support for foreign-keys based on `" + modelPart + "` not yet implemented: " + bootProperty.getPersistentClass().getEntityName() + " -> " + bootProperty.getName() ); @@ -912,7 +911,7 @@ public class MappingModelCreationHelper { creationProcess.registerForeignKey( attributeMapping, embeddedForeignKeyDescriptor ); } else { - throw new NotYetImplementedFor6Exception( + throw new UnsupportedOperationException( "Support for " + fkTarget.getClass() + " foreign-keys not yet implemented: " + bootProperty.getPersistentClass().getEntityName() + " -> " + bootProperty.getName() ); @@ -1263,7 +1262,7 @@ public class MappingModelCreationHelper { return indexDescriptor; } - throw new NotYetImplementedFor6Exception( + throw new UnsupportedOperationException( "Support for plural attributes with index type [" + bootMapKeyDescriptor + "] not yet implemented" ); } @@ -1591,7 +1590,7 @@ public class MappingModelCreationHelper { return attributeMapping; } else { - throw new NotYetImplementedFor6Exception( "AnyType support has not yet been implemented" ); + throw new UnsupportedOperationException( "AnyType support has not yet been implemented" ); } } } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/VirtualIdEmbeddable.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/VirtualIdEmbeddable.java index fc623d51d1..8fa668c75c 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/VirtualIdEmbeddable.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/VirtualIdEmbeddable.java @@ -9,7 +9,6 @@ package org.hibernate.metamodel.mapping.internal; import java.util.List; import java.util.function.Consumer; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.mapping.Component; import org.hibernate.mapping.IndexedConsumer; @@ -290,7 +289,7 @@ public class VirtualIdEmbeddable extends AbstractEmbeddableMapping implements Id @Override public DomainResult createDomainResult(NavigablePath navigablePath, TableGroup tableGroup, String resultVariable, DomainResultCreationState creationState) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/ArrayTupleType.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/ArrayTupleType.java index 8666001702..40fd79cbdf 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/ArrayTupleType.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/ArrayTupleType.java @@ -9,14 +9,13 @@ package org.hibernate.metamodel.model.domain.internal; import java.util.Arrays; import java.util.List; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.mapping.IndexedConsumer; import org.hibernate.metamodel.UnsupportedMappingException; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.metamodel.mapping.MappingModelExpressible; -import org.hibernate.query.ReturnableType; import org.hibernate.metamodel.model.domain.TupleType; +import org.hibernate.query.ReturnableType; import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.java.ObjectArrayJavaType; @@ -91,7 +90,7 @@ public class ArrayTupleType implements TupleType, @Override public Object disassemble(Object value, SharedSessionContractImplementor session) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override @@ -100,11 +99,11 @@ public class ArrayTupleType implements TupleType, int offset, JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public int forEachJdbcType(int offset, IndexedConsumer action) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java index a35bcf035e..8441fa5acb 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicTypeImpl.java @@ -10,7 +10,6 @@ import java.io.Serializable; import java.sql.CallableStatement; import java.sql.SQLException; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.metamodel.model.domain.BasicDomainType; import org.hibernate.type.descriptor.java.JavaType; @@ -42,24 +41,27 @@ public class BasicTypeImpl implements BasicDomainType, Serializable { @Override public boolean canDoExtraction() { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public JdbcType getJdbcType() { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public J extract( - CallableStatement statement, int paramIndex, SharedSessionContractImplementor session) throws SQLException { - throw new NotYetImplementedFor6Exception( getClass() ); + CallableStatement statement, + int paramIndex, + SharedSessionContractImplementor session) throws SQLException { + throw new UnsupportedOperationException(); } @Override public J extract( - CallableStatement statement, String paramName, SharedSessionContractImplementor session) - throws SQLException { - throw new NotYetImplementedFor6Exception( getClass() ); + CallableStatement statement, + String paramName, + SharedSessionContractImplementor session) throws SQLException { + throw new UnsupportedOperationException(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/MappingMetamodelImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/MappingMetamodelImpl.java index e3eb7d027d..fdc1a6ed26 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/MappingMetamodelImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/MappingMetamodelImpl.java @@ -22,7 +22,6 @@ import java.util.stream.Stream; import org.hibernate.EntityNameResolver; import org.hibernate.HibernateException; import org.hibernate.MappingException; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.UnknownEntityTypeException; import org.hibernate.boot.registry.classloading.spi.ClassLoaderService; import org.hibernate.boot.registry.classloading.spi.ClassLoadingException; @@ -409,7 +408,7 @@ public class MappingMetamodelImpl implements MappingMetamodelImplementor, Metamo @Override public EntityPersister resolveEntityDescriptor(EntityDomainType entityDomainType) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override @@ -423,7 +422,7 @@ public class MappingMetamodelImpl implements MappingMetamodelImplementor, Metamo @Override public EntityPersister getEntityDescriptor(NavigableRole name) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override @@ -650,12 +649,12 @@ public class MappingMetamodelImpl implements MappingMetamodelImplementor, Metamo @Override public CollectionPersister getCollectionDescriptor(NavigableRole role) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public CollectionPersister findCollectionDescriptor(NavigableRole role) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override @@ -705,22 +704,22 @@ public class MappingMetamodelImpl implements MappingMetamodelImplementor, Metamo @Override public void forEachNamedGraph(Consumer> action) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public RootGraph defaultGraph(String entityName) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public RootGraph defaultGraph(Class entityJavaType) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public RootGraph defaultGraph(EntityPersister entityDescriptor) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override @@ -730,12 +729,12 @@ public class MappingMetamodelImpl implements MappingMetamodelImplementor, Metamo @Override public List> findRootGraphsForType(Class baseEntityJavaType) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public List> findRootGraphsForType(String baseEntityName) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override @@ -824,7 +823,7 @@ public class MappingMetamodelImpl implements MappingMetamodelImplementor, Metamo } if ( sqmExpressible instanceof CompositeSqmPathSource ) { - throw new NotYetImplementedFor6Exception( "Resolution of embedded-valued SqmExpressible nodes not yet implemented" ); + throw new UnsupportedOperationException( "Resolution of embedded-valued SqmExpressible nodes not yet implemented" ); } if ( sqmExpressible instanceof EmbeddableTypeImpl ) { diff --git a/hibernate-core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java index 4cf5a6b6af..ec9f48ee88 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java @@ -25,7 +25,6 @@ import org.hibernate.Filter; import org.hibernate.HibernateException; import org.hibernate.LockOptions; import org.hibernate.MappingException; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.QueryException; import org.hibernate.Remove; import org.hibernate.TransientObjectException; @@ -51,8 +50,8 @@ import org.hibernate.engine.spi.PersistenceContext; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.engine.spi.SubselectFetch; -import org.hibernate.generator.Generator; import org.hibernate.generator.BeforeExecutionGenerator; +import org.hibernate.generator.Generator; import org.hibernate.id.IdentifierGenerator; import org.hibernate.internal.FilterAliasGenerator; import org.hibernate.internal.FilterHelper; @@ -819,11 +818,8 @@ public abstract class AbstractCollectionPersister @Override public String getSQLOrderByString(String alias) { -// return hasOrdering() -// ? orderByTranslation.injectAliases( new StandardOrderByAliasResolver( alias ) ) -// : ""; if ( hasOrdering() ) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } return ""; @@ -831,11 +827,8 @@ public abstract class AbstractCollectionPersister @Override public String getManyToManyOrderByString(String alias) { -// return hasManyToManyOrdering() -// ? manyToManyOrderByTranslation.injectAliases( new StandardOrderByAliasResolver( alias ) ) -// : ""; if ( hasManyToManyOrdering() ) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } return ""; diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java index c533a69876..628715fbfd 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java @@ -40,7 +40,6 @@ import org.hibernate.LazyInitializationException; import org.hibernate.LockMode; import org.hibernate.LockOptions; import org.hibernate.MappingException; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.QueryException; import org.hibernate.Remove; import org.hibernate.StaleObjectStateException; @@ -2152,8 +2151,7 @@ public abstract class AbstractEntityPersister */ @Override public int getSubclassPropertyTableNumber(String propertyPath) { - // todo (PropertyMapping) : clean this up - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); // String rootPropertyName = StringHelper.root( propertyPath ); // Type type = propertyMapping.toType( rootPropertyName ); // if ( type.isAssociationType() ) { diff --git a/hibernate-core/src/main/java/org/hibernate/persister/walking/spi/AttributeSource.java b/hibernate-core/src/main/java/org/hibernate/persister/walking/spi/AttributeSource.java index de83396cf5..ab883cf770 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/walking/spi/AttributeSource.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/walking/spi/AttributeSource.java @@ -6,13 +6,11 @@ */ package org.hibernate.persister.walking.spi; -import org.hibernate.NotYetImplementedFor6Exception; - /** * @author Steve Ebersole */ public interface AttributeSource { default int getPropertyIndex(String propertyName) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/procedure/internal/FunctionReturnImpl.java b/hibernate-core/src/main/java/org/hibernate/procedure/internal/FunctionReturnImpl.java index 7372f76b49..4c5481001c 100644 --- a/hibernate-core/src/main/java/org/hibernate/procedure/internal/FunctionReturnImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/procedure/internal/FunctionReturnImpl.java @@ -9,19 +9,16 @@ package org.hibernate.procedure.internal; import java.sql.Types; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.query.OutputableType; -import org.hibernate.query.BindableType; import org.hibernate.procedure.spi.FunctionReturnImplementor; import org.hibernate.procedure.spi.NamedCallableQueryMemento; import org.hibernate.procedure.spi.ProcedureCallImplementor; -import org.hibernate.query.internal.BindingTypeHelper; +import org.hibernate.query.BindableType; +import org.hibernate.query.OutputableType; import org.hibernate.sql.exec.internal.JdbcCallFunctionReturnImpl; import org.hibernate.sql.exec.internal.JdbcCallParameterExtractorImpl; import org.hibernate.sql.exec.internal.JdbcCallRefCursorExtractorImpl; import org.hibernate.sql.exec.spi.JdbcCallFunctionReturn; -import org.hibernate.type.descriptor.java.BasicJavaType; import org.hibernate.type.descriptor.java.JavaType; import org.hibernate.type.descriptor.jdbc.JdbcType; import org.hibernate.type.spi.TypeConfiguration; @@ -110,9 +107,7 @@ public class FunctionReturnImpl implements FunctionReturnImplementor { @Override public Class getParameterType() { - -// return ormType == null ? null : ormType.getJavaType(); - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override @@ -122,7 +117,7 @@ public class FunctionReturnImpl implements FunctionReturnImplementor { @Override public void applyAnticipatedType(BindableType type) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureParamBindings.java b/hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureParamBindings.java index 8935fa110b..d54403f6ad 100644 --- a/hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureParamBindings.java +++ b/hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureParamBindings.java @@ -10,7 +10,6 @@ import java.util.HashMap; import java.util.Map; import java.util.function.BiConsumer; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.cache.spi.QueryKey; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor; diff --git a/hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureParameterImpl.java b/hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureParameterImpl.java index a2bb327a4e..90af07e315 100644 --- a/hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureParameterImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/procedure/internal/ProcedureParameterImpl.java @@ -11,18 +11,16 @@ import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Objects; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.jdbc.env.spi.ExtractedDatabaseMetaData; -import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment; import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.procedure.spi.NamedCallableQueryMemento; import org.hibernate.procedure.spi.ParameterStrategy; import org.hibernate.procedure.spi.ProcedureCallImplementor; import org.hibernate.procedure.spi.ProcedureParameterImplementor; -import org.hibernate.query.OutputableType; -import org.hibernate.query.spi.AbstractQueryParameter; import org.hibernate.query.BindableType; +import org.hibernate.query.OutputableType; import org.hibernate.query.internal.BindingTypeHelper; +import org.hibernate.query.spi.AbstractQueryParameter; import org.hibernate.query.spi.QueryParameterBinding; import org.hibernate.sql.exec.internal.JdbcCallParameterExtractorImpl; import org.hibernate.sql.exec.internal.JdbcCallParameterRegistrationImpl; @@ -192,7 +190,7 @@ public class ProcedureParameterImpl extends AbstractQueryParameter impleme throw new IllegalArgumentException( "Cannot determine the bindable type for procedure parameter: " + name ); } else { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/BindableType.java b/hibernate-core/src/main/java/org/hibernate/query/BindableType.java index 52322011c0..3d5a241dc1 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/BindableType.java +++ b/hibernate-core/src/main/java/org/hibernate/query/BindableType.java @@ -7,13 +7,9 @@ package org.hibernate.query; import org.hibernate.Incubating; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.query.sqm.SqmExpressible; -import jakarta.persistence.AttributeConverter; -import jakarta.persistence.metamodel.ManagedType; - /** * Types that can be used to handle binding {@link Query} parameters * @@ -33,34 +29,8 @@ public interface BindableType { return getBindableJavaType().isInstance( value ); } - static BindableType parameterType(Class type) { - throw new NotYetImplementedFor6Exception( "BindableType#parameterType" ); - } - - static BindableType parameterType(Class javaType, AttributeConverter converter) { - throw new NotYetImplementedFor6Exception( "BindableType#parameterType" ); - } - - static BindableType parameterType(Class javaType, Class> converter) { - throw new NotYetImplementedFor6Exception( "BindableType#parameterType" ); - } - - static BindableType parameterType(ManagedType managedType) { - throw new NotYetImplementedFor6Exception( "BindableType#parameterType" ); - } - - static BindableType parameterType(jakarta.persistence.metamodel.Bindable jpaBindable) { - throw new NotYetImplementedFor6Exception( "BindableType#parameterType" ); - } - - static BindableType parameterType(org.hibernate.metamodel.mapping.Bindable bindable) { - throw new NotYetImplementedFor6Exception( "BindableType#parameterType" ); - } - /** * Resolve this parameter type to the corresponding SqmExpressible - * - * @todo (6.0) - use SessionFactory (API) here instead - we'll just cast "below" */ SqmExpressible resolveExpressible(SessionFactoryImplementor sessionFactory); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/CommonQueryContract.java b/hibernate-core/src/main/java/org/hibernate/query/CommonQueryContract.java index e7f6026f2b..bde8d708e7 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/CommonQueryContract.java +++ b/hibernate-core/src/main/java/org/hibernate/query/CommonQueryContract.java @@ -139,7 +139,6 @@ public interface CommonQueryContract { * If unable to infer an appropriate {@link BindableType}, fall back to * {@link #setParameter(String, Object)}. * - * @see BindableType#parameterType(Class) * @see #setParameter(String, Object, BindableType) */

CommonQueryContract setParameter(String parameter, P value, Class

type); @@ -147,8 +146,6 @@ public interface CommonQueryContract { /** * Bind the given argument to a named query parameter using the given * {@link BindableType}. - * - * @see BindableType#parameterType */

CommonQueryContract setParameter(String parameter, P value, BindableType

type); @@ -185,7 +182,6 @@ public interface CommonQueryContract { * If unable to infer an appropriate {@link BindableType}, fall back to * {@link #setParameter(int, Object)}. * - * @see BindableType#parameterType(Class) * @see #setParameter(int, Object, BindableType) */

CommonQueryContract setParameter(int parameter, P value, Class

type); @@ -193,8 +189,6 @@ public interface CommonQueryContract { /** * Bind the given argument to an ordinal query parameter using the given * {@link BindableType}. - * - * @see BindableType#parameterType */

CommonQueryContract setParameter(int parameter, P value, BindableType

type); @@ -242,7 +236,6 @@ public interface CommonQueryContract { * * @return {@code this}, for method chaining * - * @see BindableType#parameterType(Class) * @see #setParameter(QueryParameter, Object, BindableType) */

CommonQueryContract setParameter(QueryParameter

parameter, P value, Class

type); @@ -295,7 +288,6 @@ public interface CommonQueryContract { * If unable to infer an appropriate {@link BindableType}, fall back to * {@link #setParameterList(String, Collection)}. * - * @see BindableType#parameterType(Class) * @see #setParameterList(java.lang.String, java.util.Collection, BindableType) * * @apiNote This is used for binding a list of values to an expression @@ -336,7 +328,6 @@ public interface CommonQueryContract { * to use. If unable to determine an appropriate {@link BindableType}, * {@link #setParameterList(String, Collection)} is used * - * @see BindableType#parameterType(Class) * @see #setParameterList(java.lang.String, Object[], BindableType) * * @apiNote This is used for binding a list of values to an expression @@ -377,7 +368,6 @@ public interface CommonQueryContract { * If unable to infer an appropriate {@link BindableType}, fall back to * {@link #setParameterList(String, Collection)}. * - * @see BindableType#parameterType(Class) * @see #setParameterList(int, Collection, BindableType) * * @apiNote This is used for binding a list of values to an expression @@ -417,7 +407,6 @@ public interface CommonQueryContract { * If unable to infer an appropriate {@link BindableType}, fall back to * {@link #setParameterList(String, Collection)}. * - * @see BindableType#parameterType(Class) * @see #setParameterList(int, Object[], BindableType) * * @apiNote This is used for binding a list of values to an expression @@ -459,7 +448,6 @@ public interface CommonQueryContract { * infer an appropriate {@link BindableType}, fall back to using * {@link #setParameterList(String, Collection)}. * - * @see BindableType#parameterType(Class) * @see #setParameterList(QueryParameter, java.util.Collection, BindableType) * * @apiNote This is used for binding a list of values to an expression @@ -502,7 +490,6 @@ public interface CommonQueryContract { * infer an appropriate {@link BindableType}, fall back to using * {@link #setParameterList(String, Collection)}. * - * @see BindableType#parameterType(Class) * @see #setParameterList(QueryParameter, Object[], BindableType) * * @apiNote This is used for binding a list of values to an expression diff --git a/hibernate-core/src/main/java/org/hibernate/query/Query.java b/hibernate-core/src/main/java/org/hibernate/query/Query.java index 26c1eef739..842c8fa18f 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/Query.java +++ b/hibernate-core/src/main/java/org/hibernate/query/Query.java @@ -15,8 +15,6 @@ import java.util.Map; import java.util.Optional; import java.util.stream.Stream; -import jakarta.persistence.CacheRetrieveMode; -import jakarta.persistence.CacheStoreMode; import org.hibernate.CacheMode; import org.hibernate.FlushMode; import org.hibernate.Incubating; @@ -32,6 +30,8 @@ import org.hibernate.graph.RootGraph; import org.hibernate.query.spi.QueryOptions; import org.hibernate.transform.ResultTransformer; +import jakarta.persistence.CacheRetrieveMode; +import jakarta.persistence.CacheStoreMode; import jakarta.persistence.FlushModeType; import jakarta.persistence.LockModeType; import jakarta.persistence.Parameter; @@ -414,7 +414,6 @@ public interface Query extends SelectionQuery, MutationQuery, TypedQuery Query setParameter(String parameter, P argument, Class

type); @@ -422,8 +421,6 @@ public interface Query extends SelectionQuery, MutationQuery, TypedQuery Query setParameter(String parameter, P argument, BindableType

type); @@ -465,7 +462,6 @@ public interface Query extends SelectionQuery, MutationQuery, TypedQuery Query setParameter(int parameter, P argument, Class

type); @@ -473,8 +469,6 @@ public interface Query extends SelectionQuery, MutationQuery, TypedQuery Query setParameter(int parameter, P argument, BindableType

type); @@ -524,7 +518,6 @@ public interface Query extends SelectionQuery, MutationQuery, TypedQuery Query setParameter(QueryParameter

parameter, P argument, Class

type); @@ -582,7 +575,6 @@ public interface Query extends SelectionQuery, MutationQuery, TypedQuery extends SelectionQuery, MutationQuery, TypedQuery extends SelectionQuery, MutationQuery, TypedQuery extends SelectionQuery, MutationQuery, TypedQuery extends SelectionQuery, MutationQuery, TypedQuery extends SelectionQuery, MutationQuery, TypedQuery extends HqlParserBaseVisitor implem if ( ctx.getChildCount() != 5 ) { return idPath; } -// final HqlParser.PathContinuationContext pathContinuationContext = (HqlParser.PathContinuationContext) ctx.getChild( 4 ); - throw new NotYetImplementedFor6Exception( "Path continuation from `id()` reference not yet implemented" ); + throw new UnsupportedOperationException( "Path continuation from `id()` reference not yet implemented" ); } throw new SemanticException( "Path does not resolve to an entity type '" + sqmPath.getNavigablePath() + "'" ); @@ -3264,7 +3262,7 @@ public class SemanticQueryBuilder extends HqlParserBaseVisitor implem @Override public Object visitGeneralizedLiteral(HqlParser.GeneralizedLiteralContext ctx) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/Builders.java b/hibernate-core/src/main/java/org/hibernate/query/results/Builders.java index e74faff98a..f1ead40fc8 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/Builders.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/Builders.java @@ -9,14 +9,8 @@ package org.hibernate.query.results; import java.util.ArrayList; import java.util.HashMap; import java.util.Locale; -import jakarta.persistence.AttributeConverter; -import jakarta.persistence.metamodel.EntityType; -import jakarta.persistence.metamodel.SingularAttribute; import org.hibernate.LockMode; -import org.hibernate.metamodel.mapping.internal.DiscriminatedAssociationAttributeMapping; -import org.hibernate.query.NativeQuery; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.metamodel.RuntimeMetamodels; import org.hibernate.metamodel.mapping.AttributeMapping; @@ -24,12 +18,13 @@ import org.hibernate.metamodel.mapping.BasicValuedModelPart; import org.hibernate.metamodel.mapping.EntityMappingType; import org.hibernate.metamodel.mapping.PluralAttributeMapping; import org.hibernate.metamodel.mapping.SingularAttributeMapping; +import org.hibernate.metamodel.mapping.internal.DiscriminatedAssociationAttributeMapping; import org.hibernate.metamodel.mapping.internal.EntityCollectionPart; import org.hibernate.metamodel.mapping.internal.ToOneAttributeMapping; import org.hibernate.persister.entity.EntityPersister; -import org.hibernate.query.results.implicit.ImplicitFetchBuilderDiscriminatedAssociation; -import org.hibernate.spi.NavigablePath; +import org.hibernate.query.NativeQuery; import org.hibernate.query.internal.ResultSetMappingResolutionContext; +import org.hibernate.query.results.dynamic.DynamicFetchBuilderLegacy; import org.hibernate.query.results.dynamic.DynamicResultBuilderAttribute; import org.hibernate.query.results.dynamic.DynamicResultBuilderBasic; import org.hibernate.query.results.dynamic.DynamicResultBuilderBasicConverted; @@ -37,20 +32,25 @@ import org.hibernate.query.results.dynamic.DynamicResultBuilderBasicStandard; import org.hibernate.query.results.dynamic.DynamicResultBuilderEntityCalculated; import org.hibernate.query.results.dynamic.DynamicResultBuilderEntityStandard; import org.hibernate.query.results.dynamic.DynamicResultBuilderInstantiation; -import org.hibernate.query.results.dynamic.DynamicFetchBuilderLegacy; import org.hibernate.query.results.implicit.ImplicitFetchBuilder; import org.hibernate.query.results.implicit.ImplicitFetchBuilderBasic; +import org.hibernate.query.results.implicit.ImplicitFetchBuilderDiscriminatedAssociation; import org.hibernate.query.results.implicit.ImplicitFetchBuilderEmbeddable; import org.hibernate.query.results.implicit.ImplicitFetchBuilderEntity; import org.hibernate.query.results.implicit.ImplicitFetchBuilderEntityPart; import org.hibernate.query.results.implicit.ImplicitFetchBuilderPlural; import org.hibernate.query.results.implicit.ImplicitModelPartResultBuilderEntity; +import org.hibernate.spi.NavigablePath; import org.hibernate.sql.results.graph.DomainResultCreationState; import org.hibernate.sql.results.graph.Fetchable; import org.hibernate.sql.results.graph.embeddable.EmbeddableValuedFetchable; import org.hibernate.type.BasicType; import org.hibernate.type.descriptor.java.JavaType; +import jakarta.persistence.AttributeConverter; +import jakarta.persistence.metamodel.EntityType; +import jakarta.persistence.metamodel.SingularAttribute; + /** * @author Steve Ebersole */ @@ -147,7 +147,7 @@ public class Builders { String attributePath, SessionFactoryImplementor sessionFactory) { if ( attributePath.contains( "." ) ) { - throw new NotYetImplementedFor6Exception( + throw new UnsupportedOperationException( "Support for defining a NativeQuery attribute result based on a composite path is not yet implemented" ); } @@ -182,12 +182,12 @@ public class Builders { public static ResultBuilder attributeResult(String columnAlias, SingularAttribute attribute) { if ( ! ( attribute.getDeclaringType() instanceof EntityType ) ) { - throw new NotYetImplementedFor6Exception( + throw new UnsupportedOperationException( "Support for defining a NativeQuery attribute result based on a composite path is not yet implemented" ); } - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } /** diff --git a/hibernate-core/src/main/java/org/hibernate/query/results/ResultSetMappingImpl.java b/hibernate-core/src/main/java/org/hibernate/query/results/ResultSetMappingImpl.java index f10e4a901a..5616e765e2 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/results/ResultSetMappingImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/results/ResultSetMappingImpl.java @@ -19,8 +19,6 @@ import java.util.function.Consumer; import org.hibernate.Incubating; import org.hibernate.Internal; -import org.hibernate.NotYetImplementedFor6Exception; -import org.hibernate.engine.FetchTiming; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.internal.util.StringHelper; import org.hibernate.loader.NonUniqueDiscoveredSqlAliasException; @@ -31,12 +29,8 @@ import org.hibernate.query.named.NamedResultSetMappingMemento; import org.hibernate.query.results.dynamic.DynamicFetchBuilderLegacy; import org.hibernate.sql.ast.spi.SqlSelection; import org.hibernate.sql.results.graph.DomainResult; -import org.hibernate.sql.results.graph.Fetch; -import org.hibernate.sql.results.graph.basic.BasicFetch; import org.hibernate.sql.results.graph.basic.BasicResult; -import org.hibernate.sql.results.graph.embeddable.EmbeddableResultGraphNode; import org.hibernate.sql.results.graph.entity.EntityResult; -import org.hibernate.sql.results.graph.internal.ImmutableFetchList; import org.hibernate.sql.results.jdbc.spi.JdbcValuesMapping; import org.hibernate.sql.results.jdbc.spi.JdbcValuesMappingProducer; import org.hibernate.sql.results.jdbc.spi.JdbcValuesMetadata; @@ -328,7 +322,7 @@ public class ResultSetMappingImpl implements ResultSetMapping { @Override public NamedResultSetMappingMemento toMemento(String name) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingFunctionSqlAstExpression.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingFunctionSqlAstExpression.java index af3036b146..6607861c54 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingFunctionSqlAstExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingFunctionSqlAstExpression.java @@ -8,7 +8,6 @@ package org.hibernate.query.sqm.function; import java.util.List; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.dialect.Dialect; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.mapping.IndexedConsumer; @@ -213,6 +212,6 @@ public class SelfRenderingFunctionSqlAstExpression @Override public int forEachJdbcType(int offset, IndexedConsumer action) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/AggregatedSelectQueryPlanImpl.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/AggregatedSelectQueryPlanImpl.java index 3cbce8fe90..c748898f4e 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/AggregatedSelectQueryPlanImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/AggregatedSelectQueryPlanImpl.java @@ -12,11 +12,10 @@ import java.util.List; import org.hibernate.ScrollMode; import org.hibernate.internal.EmptyScrollableResults; -import org.hibernate.query.spi.Limit; import org.hibernate.query.spi.DomainQueryExecutionContext; +import org.hibernate.query.spi.Limit; import org.hibernate.query.spi.ScrollableResultsImplementor; import org.hibernate.query.spi.SelectQueryPlan; -import org.hibernate.NotYetImplementedFor6Exception; /** * @author Steve Ebersole @@ -75,6 +74,6 @@ public class AggregatedSelectQueryPlanImpl implements SelectQueryPlan { if ( executionContext.getQueryOptions().getEffectiveLimit().getMaxRowsJpa() == 0 ) { return EmptyScrollableResults.INSTANCE; } - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java index 938f5269f1..f0da0aee93 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java @@ -31,7 +31,6 @@ import java.util.ServiceLoader; import java.util.Set; import java.util.function.Supplier; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.QueryException; import org.hibernate.SessionFactory; import org.hibernate.engine.spi.SessionFactoryImplementor; @@ -1696,12 +1695,12 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext, @Override public > SqmExpression> keys(M map) { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @Override public > SqmExpression> indexes(L list) { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } /** @@ -1802,12 +1801,12 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, SqmCreationContext, @Override public > SqmExpression> values(C collection) { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @Override public > Expression> values(M map) { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java index b3ecff4b09..05ab55e08a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java @@ -32,7 +32,6 @@ import java.util.function.Supplier; import org.hibernate.HibernateException; import org.hibernate.Internal; import org.hibernate.LockMode; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.QueryException; import org.hibernate.boot.model.process.internal.InferredBasicValueResolver; import org.hibernate.dialect.function.TimestampaddFunction; @@ -41,8 +40,8 @@ import org.hibernate.engine.FetchTiming; import org.hibernate.engine.profile.FetchProfile; import org.hibernate.engine.spi.LoadQueryInfluencers; import org.hibernate.engine.spi.SessionFactoryImplementor; -import org.hibernate.generator.Generator; import org.hibernate.generator.BeforeExecutionGenerator; +import org.hibernate.generator.Generator; import org.hibernate.graph.spi.AppliedGraph; import org.hibernate.id.BulkInsertionCapableIdentifierGenerator; import org.hibernate.id.CompositeNestedGeneratedValueGenerator; @@ -5440,7 +5439,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base if ( inferredValueMapping != null ) { return resolveInferredValueMappingForParameter( inferredValueMapping ); } - throw new NotYetImplementedFor6Exception( "Support for embedded-valued parameters not yet implemented" ); + throw new UnsupportedOperationException( "Support for embedded-valued parameters not yet implemented" ); } if ( paramSqmType instanceof AnyDiscriminatorSqmPathSource ) { @@ -7116,7 +7115,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base @Override public Object visitFullyQualifiedClass(Class namedClass) { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); // what exactly is the expected end result here? @@ -7126,7 +7125,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base // // see if it is an entity-type // final EntityTypeDescriptor entityDescriptor = metamodel.findEntityDescriptor( namedClass ); // if ( entityDescriptor != null ) { -// throw new NotYetImplementedFor6Exception( "Add support for entity type literals as SqlExpression" ); +// throw new UnsupportedOperationException( "Add support for entity type literals as SqlExpression" ); // } // // diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/PluralValuedSimplePathInterpretation.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/PluralValuedSimplePathInterpretation.java index 6cd7537d2b..eb4f2c2592 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/PluralValuedSimplePathInterpretation.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/PluralValuedSimplePathInterpretation.java @@ -6,12 +6,11 @@ */ package org.hibernate.query.sqm.sql.internal; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.metamodel.mapping.CollectionPart; import org.hibernate.metamodel.mapping.PluralAttributeMapping; -import org.hibernate.spi.NavigablePath; import org.hibernate.query.sqm.sql.SqmToSqlAstConverter; import org.hibernate.query.sqm.tree.domain.SqmPluralValuedSimplePath; +import org.hibernate.spi.NavigablePath; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.tree.expression.Expression; import org.hibernate.sql.ast.tree.from.TableGroup; @@ -70,6 +69,6 @@ public class PluralValuedSimplePathInterpretation extends AbstractSqmPathInte @Override public void accept(SqlAstWalker sqlTreeWalker) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmTupleInterpretation.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmTupleInterpretation.java deleted file mode 100644 index e7fe2ae6a0..0000000000 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/SqmTupleInterpretation.java +++ /dev/null @@ -1,61 +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.sqm.sql.internal; - -import java.util.ArrayList; -import java.util.List; - -import org.hibernate.metamodel.mapping.MappingModelExpressible; -import org.hibernate.query.sqm.SemanticQueryWalker; -import org.hibernate.query.sqm.internal.SqmMappingModelHelper; -import org.hibernate.sql.ast.spi.SqlAstCreationState; -import org.hibernate.query.sqm.tree.expression.SqmExpression; -import org.hibernate.query.sqm.tree.expression.SqmTuple; -import org.hibernate.sql.ast.tree.expression.Expression; -import org.hibernate.sql.ast.tree.expression.SqlTuple; - -/** - * @author Steve Ebersole - */ -public class SqmTupleInterpretation extends SqlTuple { - - public static SqmTupleInterpretation from( - SqmTuple sqmTuple, - SemanticQueryWalker walker, - SqlAstCreationState sqlAstCreationState) { - final List groupedSqlExpressions = new ArrayList<>(); - - for ( SqmExpression groupedExpression : sqmTuple.getGroupedExpressions() ) { - groupedSqlExpressions.add( (Expression) groupedExpression.accept( walker ) ); - } - - return new SqmTupleInterpretation<>( - sqmTuple, - groupedSqlExpressions, - SqmMappingModelHelper.resolveMappingModelExpressible( - sqmTuple, - sqlAstCreationState.getCreationContext().getSessionFactory().getRuntimeMetamodels().getMappingMetamodel(), - sqlAstCreationState.getFromClauseAccess()::findTableGroup - ) - ); - } - - private final SqmTuple interpretedSqmTuple; - - public SqmTupleInterpretation( - SqmTuple sqmTuple, - List expressions, - MappingModelExpressible valueMapping) { - - super( expressions, valueMapping ); - interpretedSqmTuple = sqmTuple; - } - - public SqmTuple getInterpretedSqmTuple() { - return interpretedSqmTuple; - } -} diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmSpecificPluralPartPath.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmSpecificPluralPartPath.java index a4345cb446..53abca60c4 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmSpecificPluralPartPath.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmSpecificPluralPartPath.java @@ -6,11 +6,10 @@ */ package org.hibernate.query.sqm.tree.domain; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.metamodel.model.domain.PluralPersistentAttribute; -import org.hibernate.spi.NavigablePath; import org.hibernate.query.PathException; +import org.hibernate.spi.NavigablePath; /** * @author Steve Ebersole @@ -48,10 +47,6 @@ public abstract class AbstractSqmSpecificPluralPartPath extends AbstractSqmPa @Override public SqmTreatedPath treatAs(Class treatJavaType) throws PathException { - if ( getReferencedPathSource().getSqmPathType() instanceof EntityDomainType ) { - throw new NotYetImplementedFor6Exception(); - } - throw new UnsupportedOperationException( ); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmAnyValuedSimplePath.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmAnyValuedSimplePath.java index f01a6bd116..c7f9c100c1 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmAnyValuedSimplePath.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmAnyValuedSimplePath.java @@ -6,16 +6,15 @@ */ package org.hibernate.query.sqm.tree.domain; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.metamodel.model.domain.AnyMappingDomainType; import org.hibernate.metamodel.model.domain.EntityDomainType; -import org.hibernate.spi.NavigablePath; import org.hibernate.query.PathException; import org.hibernate.query.hql.spi.SqmCreationState; import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.tree.SqmCopyContext; +import org.hibernate.spi.NavigablePath; /** * @author Steve Ebersole @@ -66,12 +65,12 @@ public class SqmAnyValuedSimplePath extends AbstractSqmSimplePath { @Override public SqmTreatedPath treatAs(Class treatJavaType) throws PathException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @Override public SqmTreatedPath treatAs(EntityDomainType treatTarget) throws PathException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCteRoot.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCteRoot.java index 49744622ca..16b585ff17 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCteRoot.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmCteRoot.java @@ -7,7 +7,6 @@ package org.hibernate.query.sqm.tree.domain; import org.hibernate.Incubating; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.query.PathException; import org.hibernate.query.criteria.JpaRoot; @@ -93,9 +92,7 @@ public class SqmCteRoot extends SqmRoot implements JpaRoot { @Override public SqmCorrelatedRoot createCorrelation() { - // todo: implement - throw new NotYetImplementedFor6Exception( getClass()); -// return new SqmCorrelatedRoot<>( this ); + throw new UnsupportedOperationException(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmDerivedRoot.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmDerivedRoot.java index e2f2ee1de3..a886277ad5 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmDerivedRoot.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/SqmDerivedRoot.java @@ -7,11 +7,10 @@ package org.hibernate.query.sqm.tree.domain; import org.hibernate.Incubating; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.metamodel.model.domain.EntityDomainType; -import org.hibernate.query.derived.AnonymousTupleType; import org.hibernate.query.PathException; import org.hibernate.query.criteria.JpaDerivedRoot; +import org.hibernate.query.derived.AnonymousTupleType; import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.spi.SqmCreationHelper; @@ -95,9 +94,7 @@ public class SqmDerivedRoot extends SqmRoot implements JpaDerivedRoot { @Override public SqmCorrelatedRoot createCorrelation() { - // todo: implement - throw new NotYetImplementedFor6Exception( getClass()); -// return new SqmCorrelatedRoot<>( this ); + throw new UnsupportedOperationException(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/from/SqmCteJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/from/SqmCteJoin.java index fefb003aca..50554862b0 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/from/SqmCteJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/from/SqmCteJoin.java @@ -7,7 +7,6 @@ package org.hibernate.query.sqm.tree.from; import org.hibernate.Incubating; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.query.PathException; import org.hibernate.query.criteria.JpaJoinedFrom; @@ -112,9 +111,7 @@ public class SqmCteJoin extends AbstractSqmQualifiedJoin implements Jpa @Override public SqmCorrelatedEntityJoin createCorrelation() { - // todo: implement - throw new NotYetImplementedFor6Exception(getClass()); -// return new SqmCorrelatedEntityJoin<>( this ); + throw new UnsupportedOperationException(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/from/SqmDerivedJoin.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/from/SqmDerivedJoin.java index 2f95ebc8d1..fe1056c980 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/from/SqmDerivedJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/from/SqmDerivedJoin.java @@ -7,14 +7,12 @@ package org.hibernate.query.sqm.tree.from; import org.hibernate.Incubating; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.metamodel.model.domain.EntityDomainType; -import org.hibernate.query.criteria.JpaExpression; -import org.hibernate.query.criteria.JpaJoinedFrom; -import org.hibernate.query.criteria.JpaPredicate; -import org.hibernate.query.derived.AnonymousTupleType; import org.hibernate.query.PathException; import org.hibernate.query.criteria.JpaDerivedJoin; +import org.hibernate.query.criteria.JpaExpression; +import org.hibernate.query.criteria.JpaPredicate; +import org.hibernate.query.derived.AnonymousTupleType; import org.hibernate.query.sqm.SemanticQueryWalker; import org.hibernate.query.sqm.SqmPathSource; import org.hibernate.query.sqm.spi.SqmCreationHelper; @@ -164,9 +162,7 @@ public class SqmDerivedJoin extends AbstractSqmQualifiedJoin implements @Override public SqmCorrelatedEntityJoin createCorrelation() { - // todo: implement - throw new NotYetImplementedFor6Exception(getClass()); -// return new SqmCorrelatedEntityJoin<>( this ); + throw new UnsupportedOperationException(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/result/internal/OutputsImpl.java b/hibernate-core/src/main/java/org/hibernate/result/internal/OutputsImpl.java index 377dcfb19e..2b8f63d071 100644 --- a/hibernate-core/src/main/java/org/hibernate/result/internal/OutputsImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/result/internal/OutputsImpl.java @@ -15,11 +15,7 @@ import java.util.ArrayList; import java.util.List; import java.util.function.Supplier; - -import jakarta.persistence.ParameterMode; - import org.hibernate.JDBCException; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.internal.CoreLogging; import org.hibernate.procedure.internal.ProcedureCallImpl; @@ -45,6 +41,8 @@ import org.hibernate.type.descriptor.java.spi.JavaTypeRegistry; import org.jboss.logging.Logger; +import jakarta.persistence.ParameterMode; + /** * @author Steve Ebersole */ @@ -159,21 +157,18 @@ public class OutputsImpl implements Outputs { final JavaTypeRegistry javaTypeRegistry = context.getSession() .getTypeConfiguration() .getJavaTypeRegistry(); - procedureCall.getParameterBindings().visitBindings( - (parameterImplementor, queryParameterBinding) -> { - final ProcedureParameter parameter = (ProcedureParameter) parameterImplementor; - if ( parameter.getMode() == ParameterMode.INOUT ) { - final JavaType basicType = javaTypeRegistry.getDescriptor( - parameterImplementor.getParameterType() ); - if ( basicType != null ) { - resultSetMapping.addResultBuilder( new ScalarDomainResultBuilder<>( basicType ) ); - } - else { - throw new NotYetImplementedFor6Exception( getClass() ); - } - } + procedureCall.getParameterBindings().visitBindings( (parameterImplementor, queryParameterBinding) -> { + final ProcedureParameter parameter = (ProcedureParameter) parameterImplementor; + if ( parameter.getMode() == ParameterMode.INOUT ) { + final JavaType basicType = javaTypeRegistry.getDescriptor( parameterImplementor.getParameterType() ); + if ( basicType != null ) { + resultSetMapping.addResultBuilder( new ScalarDomainResultBuilder<>( basicType ) ); } - ); + else { + throw new UnsupportedOperationException(); + } + } + } ); final ExecutionContext executionContext = new OutputsExecutionContext( context.getSession() ); diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstWalker.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstWalker.java index 7dd8916aac..6c75f437f9 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstWalker.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstWalker.java @@ -7,13 +7,13 @@ package org.hibernate.sql.ast.spi; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.persister.internal.SqlFragmentPredicate; import org.hibernate.query.sqm.tree.expression.Conversion; import org.hibernate.sql.ast.SqlAstWalker; import org.hibernate.sql.ast.tree.SqlAstNode; import org.hibernate.sql.ast.tree.cte.CteStatement; import org.hibernate.sql.ast.tree.delete.DeleteStatement; +import org.hibernate.sql.ast.tree.expression.AggregateColumnWriteExpression; import org.hibernate.sql.ast.tree.expression.AggregateFunctionExpression; import org.hibernate.sql.ast.tree.expression.Any; import org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression; @@ -22,7 +22,6 @@ import org.hibernate.sql.ast.tree.expression.CaseSimpleExpression; import org.hibernate.sql.ast.tree.expression.CastTarget; import org.hibernate.sql.ast.tree.expression.Collation; import org.hibernate.sql.ast.tree.expression.ColumnReference; -import org.hibernate.sql.ast.tree.expression.AggregateColumnWriteExpression; import org.hibernate.sql.ast.tree.expression.Distinct; import org.hibernate.sql.ast.tree.expression.Duration; import org.hibernate.sql.ast.tree.expression.DurationUnit; @@ -543,31 +542,31 @@ public class AbstractSqlAstWalker implements SqlAstWalker { @Override public void visitCustomTableInsert(TableInsertCustomSql tableInsert) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public void visitStandardTableUpdate(TableUpdateStandard tableUpdate) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public void visitCustomTableUpdate(TableUpdateCustomSql tableUpdate) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public void visitColumnWriteFragment(ColumnWriteFragment columnWriteFragment) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public void visitStandardTableDelete(TableDeleteStandard tableDelete) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } @Override public void visitCustomTableDelete(TableDeleteCustomSql tableDelete) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } } diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/SqlTuple.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/SqlTuple.java index 344dc9efde..57e5d9ed9b 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/SqlTuple.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/expression/SqlTuple.java @@ -10,7 +10,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.metamodel.mapping.MappingModelExpressible; import org.hibernate.query.sqm.SqmExpressible; import org.hibernate.query.sqm.sql.internal.DomainResultProducer; @@ -87,7 +86,7 @@ public class SqlTuple implements Expression, SqlTupleContainer, DomainResultProd @Override public void applySqlSelections(DomainResultCreationState creationState) { - throw new NotYetImplementedFor6Exception( getClass() ); + throw new UnsupportedOperationException(); } public static class Builder { diff --git a/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/JdbcCallImpl.java b/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/JdbcCallImpl.java index 3393ac80cc..40777b3ddb 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/JdbcCallImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/JdbcCallImpl.java @@ -12,7 +12,6 @@ import java.util.List; import java.util.Set; import org.hibernate.HibernateException; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.internal.FilterJdbcParameter; import org.hibernate.query.spi.QueryOptions; import org.hibernate.sql.exec.spi.JdbcCallFunctionReturn; @@ -110,7 +109,7 @@ public class JdbcCallImpl implements JdbcOperationQueryCall { @Override public Set getAffectedTableNames() { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/JdbcCallParameterExtractorImpl.java b/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/JdbcCallParameterExtractorImpl.java index 9a0ecf8425..6a6b0d55d2 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/JdbcCallParameterExtractorImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/JdbcCallParameterExtractorImpl.java @@ -9,10 +9,7 @@ package org.hibernate.sql.exec.internal; import java.sql.CallableStatement; import java.sql.SQLException; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.query.BindableType; -import org.hibernate.metamodel.model.domain.BasicDomainType; import org.hibernate.query.OutputableType; import org.hibernate.sql.exec.spi.JdbcCallParameterExtractor; diff --git a/hibernate-core/src/main/java/org/hibernate/sql/model/ast/builder/AbstractRestrictedTableMutationBuilder.java b/hibernate-core/src/main/java/org/hibernate/sql/model/ast/builder/AbstractRestrictedTableMutationBuilder.java index 4b4d2bcb0d..5f1af84165 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/model/ast/builder/AbstractRestrictedTableMutationBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/model/ast/builder/AbstractRestrictedTableMutationBuilder.java @@ -9,7 +9,6 @@ package org.hibernate.sql.model.ast.builder; import java.util.ArrayList; import java.util.List; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.engine.jdbc.mutation.ParameterUsage; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.metamodel.mapping.JdbcMapping; @@ -95,11 +94,11 @@ public abstract class AbstractRestrictedTableMutationBuilder getFilterGeometry() { diff --git a/hibernate-spatial/src/test/java/org/hibernate/spatial/testing/dialects/db2/DB2ExpectationsFactory.java b/hibernate-spatial/src/test/java/org/hibernate/spatial/testing/dialects/db2/DB2ExpectationsFactory.java index 6bd997568b..07f9f417ec 100644 --- a/hibernate-spatial/src/test/java/org/hibernate/spatial/testing/dialects/db2/DB2ExpectationsFactory.java +++ b/hibernate-spatial/src/test/java/org/hibernate/spatial/testing/dialects/db2/DB2ExpectationsFactory.java @@ -9,7 +9,6 @@ package org.hibernate.spatial.testing.dialects.db2; import java.sql.SQLException; import java.util.Map; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.spatial.dialect.db2.DB2GeometryType; import org.hibernate.spatial.testing.AbstractExpectationsFactory; import org.hibernate.spatial.testing.NativeSQLStatement; @@ -41,7 +40,7 @@ public class DB2ExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getExtent() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } public NativeSQLStatement createNativeExtentStatement() { diff --git a/hibernate-spatial/src/test/java/org/hibernate/spatial/testing/dialects/hana/HANAExpectationsFactory.java b/hibernate-spatial/src/test/java/org/hibernate/spatial/testing/dialects/hana/HANAExpectationsFactory.java index 29d2099e25..81ad811343 100644 --- a/hibernate-spatial/src/test/java/org/hibernate/spatial/testing/dialects/hana/HANAExpectationsFactory.java +++ b/hibernate-spatial/src/test/java/org/hibernate/spatial/testing/dialects/hana/HANAExpectationsFactory.java @@ -10,7 +10,6 @@ package org.hibernate.spatial.testing.dialects.hana; import java.sql.SQLException; import java.util.Map; -import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.spatial.dialect.hana.HANASpatialUtils; import org.hibernate.spatial.testing.AbstractExpectationsFactory; import org.hibernate.spatial.testing.NativeSQLStatement; @@ -283,7 +282,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getAlphaShape(double radius) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeAlphaShapeStatement(double radius) { @@ -301,7 +300,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getArea() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeAreaStatement() { @@ -317,7 +316,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getAsEWKB() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeAsEWKBStatement() { @@ -332,7 +331,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getAsEWKT() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeAsEWKTStatement() { @@ -347,7 +346,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getAsGeoJSON() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeAsGeoJSONStatement() { @@ -362,7 +361,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getAsSVG() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeAsSVGStatement() { @@ -377,7 +376,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getAsSVGAggr() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeAsSVGAggrStatement() { @@ -392,7 +391,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getAsWKB() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeAsWKBStatement() { @@ -407,7 +406,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getAsWKT() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeAsWKTStatement() { @@ -422,7 +421,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getCentroid() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeCentroidStatement() { @@ -438,7 +437,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getConvexHullAggr() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeConvexHullAggrStatement() { @@ -453,7 +452,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getCoordDim() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeCoordDimStatement() { @@ -468,7 +467,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getCoveredBy(Geometry geom) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeCoveredByStatement(Geometry geom) { @@ -487,7 +486,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getCovers(Geometry geom) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeCoversStatement(Geometry geom) { @@ -506,7 +505,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getEndPoint() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeEndPointStatement() { @@ -522,7 +521,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getEnvelopeAggr() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeEnvelopeAggrStatement() { @@ -537,7 +536,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getExteriorRing() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeExteriorRingStatement() { @@ -553,7 +552,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getGeomFromEWKB(byte[] ewkb) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeGeomFromEWKBStatement(byte[] ewkb) { @@ -568,7 +567,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getGeomFromEWKT(String ewkt) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeGeomFromEWKTStatement(String ewkt) { @@ -583,7 +582,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getGeomFromText(String text) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeGeomFromTextStatement(String text) { @@ -598,7 +597,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getGeomFromWKB(byte[] wkb) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeGeomFromWKBStatement(byte[] wkb) { @@ -613,7 +612,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getGeomFromWKT(String wkt) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeGeomFromWKTStatement(String wkt) { @@ -628,7 +627,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getGeometryN(int n) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeGeometryNStatement(int n) { @@ -646,7 +645,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getInteriorRingN(int n) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -665,7 +664,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getIntersectionAggr() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeIntersectionAggrStatement() { @@ -680,7 +679,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getIntersectsRect(Point pmin, Point pmax) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeIntersectsRectStatement(Point pmin, Point pmax) { @@ -700,7 +699,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getIs3D() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeIs3DStatement() { @@ -716,7 +715,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getIsClosed() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeIsClosedStatement() { @@ -733,7 +732,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getIsMeasured() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeIsMeasuredStatement() { @@ -750,7 +749,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getIsRing() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeIsRingStatement() { @@ -767,7 +766,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getIsValid() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeIsValidStatement() { @@ -784,7 +783,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getLength() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeLengthStatement() { @@ -801,7 +800,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getM() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -819,7 +818,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getMMax() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -837,7 +836,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getMMin() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -855,7 +854,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getNumGeometries() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -873,7 +872,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getNumInteriorRing() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -891,7 +890,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getNumInteriorRings() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -909,7 +908,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getNumPoints() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -927,7 +926,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getOrderingEquals(Geometry geom) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -947,7 +946,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getPerimeter() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -965,7 +964,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getPointOnSurface() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -983,7 +982,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getPointN(int n) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -1003,7 +1002,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getSnapToGrid() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -1021,7 +1020,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getStartPoint() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -1038,7 +1037,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getUnionAggr() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -1054,7 +1053,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getX() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -1072,7 +1071,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getXMax() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -1090,7 +1089,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getXMin() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -1108,7 +1107,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getY() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -1126,7 +1125,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getYMax() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } @@ -1144,7 +1143,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getYMin() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeYMinStatement() { @@ -1161,7 +1160,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getZ() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeZStatement() { @@ -1178,7 +1177,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getZMax() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeZMaxStatement() { @@ -1195,7 +1194,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getZMin() throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeZMinStatement() { @@ -1212,7 +1211,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getNestedFunctionInner(Geometry geom) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeNestedFunctionInnerStatement(Geometry geom) { @@ -1231,7 +1230,7 @@ public class HANAExpectationsFactory extends AbstractExpectationsFactory { * @throws SQLException */ public Map getNestedFunctionOuter(Geometry geom) throws SQLException { - throw new NotYetImplementedFor6Exception(); + throw new UnsupportedOperationException(); } private NativeSQLStatement createNativeNestedFunctionOuterStatement(Geometry geom) {