Remove few NotYetImplementedFor6Exception

This commit is contained in:
Andrea Boriero 2021-10-06 16:46:54 +02:00 committed by Christian Beikov
parent 87c059ac95
commit 67f73f20ef
32 changed files with 270 additions and 114 deletions

View File

@ -18,7 +18,6 @@ import org.hibernate.AnnotationException;
import org.hibernate.AssertionFailure; import org.hibernate.AssertionFailure;
import org.hibernate.CacheMode; import org.hibernate.CacheMode;
import org.hibernate.FlushMode; import org.hibernate.FlushMode;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.annotations.CacheModeType; import org.hibernate.annotations.CacheModeType;
import org.hibernate.annotations.FlushModeType; import org.hibernate.annotations.FlushModeType;
import org.hibernate.annotations.QueryHints; import org.hibernate.annotations.QueryHints;

View File

@ -13,7 +13,6 @@ import java.util.Properties;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.MappingException; import org.hibernate.MappingException;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.boot.model.relational.SqlStringGenerationContext; import org.hibernate.boot.model.relational.SqlStringGenerationContext;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor;

View File

@ -28,7 +28,4 @@ public interface EmbeddableInstantiator extends Instantiator {
*/ */
Object instantiate(Supplier<Object[]> valuesAccess, SessionFactoryImplementor sessionFactory); Object instantiate(Supplier<Object[]> valuesAccess, SessionFactoryImplementor sessionFactory);
// default Object instantiate(IntFunction<Object> valueAccess, SessionFactoryImplementor sessionFactory) {
// throw new NotYetImplementedFor6Exception( getClass() );
// }
} }

View File

@ -7,7 +7,6 @@
package org.hibernate.metamodel; package org.hibernate.metamodel;
import org.hibernate.Incubating; import org.hibernate.Incubating;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart; import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart;
import org.hibernate.metamodel.mapping.EntityMappingType; import org.hibernate.metamodel.mapping.EntityMappingType;
import org.hibernate.metamodel.mapping.PluralAttributeMapping; import org.hibernate.metamodel.mapping.PluralAttributeMapping;
@ -46,10 +45,8 @@ public interface RuntimeMetamodels {
return getMappingMetamodel().findCollectionDescriptor( role ).getAttributeMapping(); return getMappingMetamodel().findCollectionDescriptor( role ).getAttributeMapping();
} }
default EmbeddableValuedModelPart getEmbedded(String role) {
// todo (6.0) : I think we might need a form of mapping-model look-up for embeddables, something like: // todo (6.0) : I think we might need a form of mapping-model look-up for embeddables, something like:
throw new NotYetImplementedFor6Exception( getClass() ); EmbeddableValuedModelPart getEmbedded(String role);
}
default String getImportedName(String name) { default String getImportedName(String name) {
return getMappingMetamodel().getImportedName( name ); return getMappingMetamodel().getImportedName( name );

View File

@ -6,11 +6,13 @@
*/ */
package org.hibernate.metamodel.internal; package org.hibernate.metamodel.internal;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.boot.spi.BootstrapContext; import org.hibernate.boot.spi.BootstrapContext;
import org.hibernate.boot.spi.MetadataImplementor; import org.hibernate.boot.spi.MetadataImplementor;
import org.hibernate.internal.SessionFactoryImpl; import org.hibernate.internal.SessionFactoryImpl;
import org.hibernate.metamodel.MappingMetamodel; import org.hibernate.metamodel.MappingMetamodel;
import org.hibernate.metamodel.RuntimeMetamodels; import org.hibernate.metamodel.RuntimeMetamodels;
import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart;
import org.hibernate.metamodel.model.domain.JpaMetamodel; import org.hibernate.metamodel.model.domain.JpaMetamodel;
import org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl; import org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl;
@ -34,6 +36,11 @@ public class RuntimeMetamodelsImpl implements RuntimeMetamodels {
return mappingMetamodel; return mappingMetamodel;
} }
@Override
public EmbeddableValuedModelPart getEmbedded(String role) {
throw new NotYetImplementedFor6Exception( getClass() );
}
/** /**
* Chicken-and-egg because things try to use the SessionFactory (specifically the MappingMetamodel) * Chicken-and-egg because things try to use the SessionFactory (specifically the MappingMetamodel)
* before it is ready. So we do this fugly code... * before it is ready. So we do this fugly code...

View File

@ -9,22 +9,6 @@ package org.hibernate.metamodel.mapping;
import java.util.List; import java.util.List;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;
import org.hibernate.MappingException;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.SharedSessionContract;
import org.hibernate.boot.model.relational.SqlStringGenerationContext;
import org.hibernate.cfg.Environment;
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.FetchTiming;
import org.hibernate.engine.config.spi.ConfigurationService;
import org.hibernate.engine.spi.CascadeStyle;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.internal.util.config.ConfigurationHelper;
import org.hibernate.mapping.Any;
import org.hibernate.mapping.BasicValue;
import org.hibernate.mapping.Column;
import org.hibernate.mapping.Component;
import org.hibernate.mapping.IndexedConsumer; import org.hibernate.mapping.IndexedConsumer;
import org.hibernate.metamodel.mapping.internal.EmbeddedAttributeMapping; import org.hibernate.metamodel.mapping.internal.EmbeddedAttributeMapping;
import org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess; import org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess;

View File

@ -17,7 +17,6 @@ import java.util.function.Function;
import org.hibernate.MappingException; import org.hibernate.MappingException;
import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.SharedSessionContract; import org.hibernate.SharedSessionContract;
import org.hibernate.boot.model.relational.SqlStringGenerationContext;
import org.hibernate.cfg.Environment; import org.hibernate.cfg.Environment;
import org.hibernate.dialect.Dialect; import org.hibernate.dialect.Dialect;
import org.hibernate.engine.FetchTiming; import org.hibernate.engine.FetchTiming;
@ -35,7 +34,6 @@ import org.hibernate.mapping.Component;
import org.hibernate.mapping.IndexedConsumer; import org.hibernate.mapping.IndexedConsumer;
import org.hibernate.mapping.Property; import org.hibernate.mapping.Property;
import org.hibernate.mapping.Selectable; import org.hibernate.mapping.Selectable;
import org.hibernate.mapping.Table;
import org.hibernate.metamodel.UnsupportedMappingException; import org.hibernate.metamodel.UnsupportedMappingException;
import org.hibernate.metamodel.mapping.AttributeMapping; import org.hibernate.metamodel.mapping.AttributeMapping;
import org.hibernate.metamodel.mapping.EmbeddableMappingType; import org.hibernate.metamodel.mapping.EmbeddableMappingType;

View File

@ -10,7 +10,6 @@ import java.util.List;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.boot.model.relational.SqlStringGenerationContext;
import org.hibernate.engine.FetchStyle; import org.hibernate.engine.FetchStyle;
import org.hibernate.engine.FetchTiming; import org.hibernate.engine.FetchTiming;
import org.hibernate.engine.spi.EntityKey; import org.hibernate.engine.spi.EntityKey;
@ -20,7 +19,6 @@ import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.mapping.Component; import org.hibernate.mapping.Component;
import org.hibernate.mapping.IndexedConsumer; import org.hibernate.mapping.IndexedConsumer;
import org.hibernate.mapping.RootClass; import org.hibernate.mapping.RootClass;
import org.hibernate.mapping.Table;
import org.hibernate.metamodel.mapping.AttributeMapping; import org.hibernate.metamodel.mapping.AttributeMapping;
import org.hibernate.metamodel.mapping.EmbeddableMappingType; import org.hibernate.metamodel.mapping.EmbeddableMappingType;
import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart; import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart;
@ -398,6 +396,16 @@ public class IdClassEmbeddable extends AbstractEmbeddableMapping implements Iden
return result; return result;
} }
@Override
public int forEachDisassembledJdbcValue(
Object value,
Clause clause,
int offset,
JdbcValuesConsumer valuesConsumer,
SharedSessionContractImplementor session) {
throw new NotYetImplementedFor6Exception( getClass() );
}
@Override @Override
public int forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action) { public int forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action) {
return selectableMappings.forEachSelectable( return selectableMappings.forEachSelectable(

View File

@ -10,11 +10,9 @@ import java.util.List;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.boot.model.relational.SqlStringGenerationContext;
import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.mapping.Component; import org.hibernate.mapping.Component;
import org.hibernate.mapping.IndexedConsumer; import org.hibernate.mapping.IndexedConsumer;
import org.hibernate.mapping.Table;
import org.hibernate.metamodel.mapping.AttributeMapping; import org.hibernate.metamodel.mapping.AttributeMapping;
import org.hibernate.metamodel.mapping.EmbeddableMappingType; import org.hibernate.metamodel.mapping.EmbeddableMappingType;
import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart; import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart;

View File

@ -19,5 +19,4 @@ import jakarta.persistence.metamodel.EmbeddableType;
* @author Steve Ebersole * @author Steve Ebersole
*/ */
public interface EmbeddableDomainType<J> extends ManagedDomainType<J>, EmbeddableType<J>, AllowableParameterType<J> { public interface EmbeddableDomainType<J> extends ManagedDomainType<J>, EmbeddableType<J>, AllowableParameterType<J> {
ManagedTypeRepresentationStrategy getRepresentationStrategy();
} }

View File

@ -11,7 +11,9 @@ import java.util.List;
import org.hibernate.NotYetImplementedFor6Exception; import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.mapping.IndexedConsumer;
import org.hibernate.metamodel.UnsupportedMappingException; import org.hibernate.metamodel.UnsupportedMappingException;
import org.hibernate.metamodel.mapping.JdbcMapping;
import org.hibernate.metamodel.mapping.MappingModelExpressable; import org.hibernate.metamodel.mapping.MappingModelExpressable;
import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType; import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType;
import org.hibernate.metamodel.model.domain.AllowableParameterType; import org.hibernate.metamodel.model.domain.AllowableParameterType;

View File

@ -10,6 +10,7 @@ import java.io.Serializable;
import org.hibernate.graph.internal.SubGraphImpl; import org.hibernate.graph.internal.SubGraphImpl;
import org.hibernate.graph.spi.SubGraphImplementor; import org.hibernate.graph.spi.SubGraphImplementor;
import org.hibernate.metamodel.ManagedTypeRepresentationStrategy;
import org.hibernate.metamodel.model.domain.AbstractManagedType; import org.hibernate.metamodel.model.domain.AbstractManagedType;
import org.hibernate.metamodel.model.domain.EmbeddableDomainType; import org.hibernate.metamodel.model.domain.EmbeddableDomainType;
import org.hibernate.metamodel.model.domain.JpaMetamodel; import org.hibernate.metamodel.model.domain.JpaMetamodel;

View File

@ -156,10 +156,7 @@ public interface EntityPersister
*/ */
SqmMultiTableMutationStrategy getSqmMultiTableMutationStrategy(); SqmMultiTableMutationStrategy getSqmMultiTableMutationStrategy();
default SqmMultiTableInsertStrategy getSqmMultiTableInsertStrategy() { SqmMultiTableInsertStrategy getSqmMultiTableInsertStrategy();
throw new NotYetImplementedFor6Exception( getClass() );
}
/** /**
* Retrieve the underlying entity metamodel instance... * Retrieve the underlying entity metamodel instance...
* *

View File

@ -6,7 +6,6 @@
*/ */
package org.hibernate.persister.entity; package org.hibernate.persister.entity;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.QueryException; import org.hibernate.QueryException;
import org.hibernate.type.Type; import org.hibernate.type.Type;
@ -44,9 +43,7 @@ public interface PropertyMapping {
* todo (6.0) : define an exception in the signature for cases where the PropertyMapping * todo (6.0) : define an exception in the signature for cases where the PropertyMapping
* cannot be de-referenced (basic values) * cannot be de-referenced (basic values)
*/ */
default PropertyMapping resolveSubMapping(String name) { // PropertyMapping resolveSubMapping(String name);
throw new NotYetImplementedFor6Exception();
}
// todo (6.0) : add capability to create SqmPath, i.e. // todo (6.0) : add capability to create SqmPath, i.e.
// SqmPath createSqmPath(SqmPath<?> lhs, SqmCreationState creationState); // SqmPath createSqmPath(SqmPath<?> lhs, SqmCreationState creationState);
@ -61,10 +58,10 @@ public interface PropertyMapping {
/** /**
* Given a component path expression, get the type of the property * Given a component path expression, get the type of the property
*/ */
public Type toType(String propertyName) throws QueryException; Type toType(String propertyName) throws QueryException;
/** /**
* Given a property path, return the corresponding column name(s). * Given a property path, return the corresponding column name(s).
*/ */
public String[] toColumns(String propertyName) throws QueryException, UnsupportedOperationException; String[] toColumns(String propertyName) throws QueryException, UnsupportedOperationException;
} }

View File

@ -25,7 +25,6 @@ import org.hibernate.query.sqm.internal.SqmQuerySpecCreationProcessingStateStand
import org.hibernate.query.sqm.spi.BaseSemanticQueryWalker; import org.hibernate.query.sqm.spi.BaseSemanticQueryWalker;
import org.hibernate.query.sqm.spi.SqmCreationContext; import org.hibernate.query.sqm.spi.SqmCreationContext;
import org.hibernate.query.sqm.tree.SqmDeleteOrUpdateStatement; import org.hibernate.query.sqm.tree.SqmDeleteOrUpdateStatement;
import org.hibernate.query.sqm.tree.SqmQuery;
import org.hibernate.query.sqm.tree.cte.SqmCteContainer; import org.hibernate.query.sqm.tree.cte.SqmCteContainer;
import org.hibernate.query.sqm.tree.cte.SqmCteStatement; import org.hibernate.query.sqm.tree.cte.SqmCteStatement;
import org.hibernate.query.sqm.tree.delete.SqmDeleteStatement; import org.hibernate.query.sqm.tree.delete.SqmDeleteStatement;
@ -790,17 +789,6 @@ public class QuerySplitter {
return () -> false; return () -> false;
} }
// @Override
// public String generateUniqueIdentifier() {
// // todo (6.0) : not sure these are needed
// throw new NotYetImplementedFor6Exception( );
// }
//
// @Override
// public ImplicitAliasGenerator getImplicitAliasGenerator() {
// // todo (6.0) : not sure these are needed
// throw new NotYetImplementedFor6Exception( );
// }
} }
} }

View File

@ -6,36 +6,15 @@
*/ */
package org.hibernate.query.results; package org.hibernate.query.results;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.metamodel.mapping.AttributeMapping;
import org.hibernate.metamodel.mapping.BasicValuedModelPart;
import org.hibernate.metamodel.mapping.EmbeddableValuedModelPart;
import org.hibernate.metamodel.mapping.EntityIdentifierMapping; import org.hibernate.metamodel.mapping.EntityIdentifierMapping;
import org.hibernate.metamodel.mapping.EntityMappingType;
import org.hibernate.metamodel.mapping.ModelPart; import org.hibernate.metamodel.mapping.ModelPart;
import org.hibernate.metamodel.mapping.internal.SingleAttributeIdentifierMapping; import org.hibernate.metamodel.mapping.internal.SingleAttributeIdentifierMapping;
import org.hibernate.query.EntityIdentifierNavigablePath; import org.hibernate.query.EntityIdentifierNavigablePath;
import org.hibernate.query.NavigablePath;
import org.hibernate.query.internal.ImplicitAttributeFetchMemento;
import org.hibernate.query.internal.ImplicitModelPartResultMemento;
import org.hibernate.query.internal.ResultSetMappingResolutionContext;
import org.hibernate.query.named.FetchMemento;
import org.hibernate.query.named.ModelPartResultMemento;
import org.hibernate.query.named.ResultMemento;
import org.hibernate.query.results.implicit.ImplicitFetchBuilder;
import org.hibernate.query.results.implicit.ImplicitFetchBuilderBasic;
import org.hibernate.query.results.implicit.ImplicitFetchBuilderEmbeddable;
import org.hibernate.query.results.implicit.ImplicitModelPartResultBuilderEntity;
import org.hibernate.sql.ast.tree.from.TableGroup; import org.hibernate.sql.ast.tree.from.TableGroup;
import org.hibernate.sql.results.graph.DomainResult; import org.hibernate.sql.results.graph.DomainResult;
import org.hibernate.sql.results.graph.DomainResultCreationState; import org.hibernate.sql.results.graph.DomainResultCreationState;
import org.hibernate.sql.results.graph.Fetch; import org.hibernate.sql.results.graph.Fetch;
import org.hibernate.sql.results.graph.FetchParent;
import org.hibernate.sql.results.graph.Fetchable;
import org.hibernate.sql.results.graph.basic.BasicFetch; import org.hibernate.sql.results.graph.basic.BasicFetch;
import org.hibernate.sql.results.graph.embeddable.EmbeddableValuedFetchable;
import org.hibernate.sql.results.graph.entity.EntityValuedFetchable;
/** /**
* @author Steve Ebersole * @author Steve Ebersole

View File

@ -8,7 +8,6 @@ package org.hibernate.query.sqm;
import java.util.List; import java.util.List;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.query.sqm.sql.internal.SelfInterpretingSqmPath; import org.hibernate.query.sqm.sql.internal.SelfInterpretingSqmPath;
import org.hibernate.query.sqm.tree.cte.SqmCteContainer; import org.hibernate.query.sqm.tree.cte.SqmCteContainer;
import org.hibernate.query.sqm.tree.cte.SqmCteStatement; import org.hibernate.query.sqm.tree.cte.SqmCteStatement;

View File

@ -9,7 +9,6 @@ package org.hibernate.query.sqm.internal;
import java.util.function.Function; import java.util.function.Function;
import jakarta.persistence.metamodel.Bindable; import jakarta.persistence.metamodel.Bindable;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.metamodel.mapping.CollectionPart; import org.hibernate.metamodel.mapping.CollectionPart;
import org.hibernate.metamodel.mapping.EntityMappingType; import org.hibernate.metamodel.mapping.EntityMappingType;

View File

@ -3453,6 +3453,11 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
.resolveDescriptor( Map.Entry.class ); .resolveDescriptor( Map.Entry.class );
return new SqmMapEntryResult<>( indexResult, valueResult, resultVariable, mapEntryDescriptor ); return new SqmMapEntryResult<>( indexResult, valueResult, resultVariable, mapEntryDescriptor );
} }
@Override
public void applySqlSelections(DomainResultCreationState creationState) {
throw new NotYetImplementedFor6Exception( getClass() );
}
}; };
} }

View File

@ -8,6 +8,7 @@ package org.hibernate.query.sqm.tree.domain;
import java.util.Locale; import java.util.Locale;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.metamodel.model.domain.EntityDomainType; import org.hibernate.metamodel.model.domain.EntityDomainType;
import org.hibernate.query.NavigablePath; import org.hibernate.query.NavigablePath;
import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.NodeBuilder;
@ -19,6 +20,8 @@ import org.hibernate.query.sqm.tree.SqmJoinType;
import org.hibernate.query.sqm.tree.from.SqmFrom; import org.hibernate.query.sqm.tree.from.SqmFrom;
import org.hibernate.query.sqm.tree.from.SqmQualifiedJoin; import org.hibernate.query.sqm.tree.from.SqmQualifiedJoin;
import org.hibernate.query.sqm.tree.predicate.SqmPredicate; import org.hibernate.query.sqm.tree.predicate.SqmPredicate;
import org.hibernate.sql.results.graph.DomainResult;
import org.hibernate.sql.results.graph.DomainResultCreationState;
/** /**
* @author Christian Beikov * @author Christian Beikov
@ -111,4 +114,15 @@ public class SqmPluralPartJoin<O,T> extends AbstractSqmJoin<O,T> implements Doma
getReferencedPathSource().getPathName() getReferencedPathSource().getPathName()
); );
} }
@Override
public DomainResult<T> createDomainResult(
String resultVariable, DomainResultCreationState creationState) {
throw new NotYetImplementedFor6Exception( getClass() );
}
@Override
public void applySqlSelections(DomainResultCreationState creationState) {
throw new NotYetImplementedFor6Exception( getClass() );
}
} }

View File

@ -13,6 +13,7 @@ import org.hibernate.metamodel.model.domain.SingularPersistentAttribute;
import org.hibernate.query.NavigablePath; import org.hibernate.query.NavigablePath;
import org.hibernate.query.hql.spi.SqmCreationProcessingState; import org.hibernate.query.hql.spi.SqmCreationProcessingState;
import org.hibernate.query.sqm.NodeBuilder; import org.hibernate.query.sqm.NodeBuilder;
import org.hibernate.query.sqm.SqmJoinable;
import org.hibernate.query.sqm.tree.SqmJoinType; import org.hibernate.query.sqm.tree.SqmJoinType;
import org.hibernate.query.sqm.tree.from.SqmAttributeJoin; import org.hibernate.query.sqm.tree.from.SqmAttributeJoin;
import org.hibernate.query.sqm.tree.from.SqmFrom; import org.hibernate.query.sqm.tree.from.SqmFrom;

View File

@ -7,7 +7,6 @@
package org.hibernate.sql.ast.tree.expression; package org.hibernate.sql.ast.tree.expression;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.metamodel.mapping.BasicValuedMapping; import org.hibernate.metamodel.mapping.BasicValuedMapping;
import org.hibernate.metamodel.mapping.MappingModelExpressable; import org.hibernate.metamodel.mapping.MappingModelExpressable;
import org.hibernate.query.UnaryArithmeticOperator; import org.hibernate.query.UnaryArithmeticOperator;

View File

@ -8,7 +8,6 @@ package org.hibernate.sql.results.graph.entity.internal;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer; import org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer;
import org.hibernate.engine.spi.EntityKey; import org.hibernate.engine.spi.EntityKey;
import org.hibernate.engine.spi.EntityUniqueKey; import org.hibernate.engine.spi.EntityUniqueKey;
@ -213,12 +212,12 @@ public class EntityDelayedFetchInitializer extends AbstractFetchParentAccess imp
@Override @Override
public EntityKey getEntityKey() { public EntityKey getEntityKey() {
throw new NotYetImplementedFor6Exception( getClass() ); throw new UnsupportedOperationException();
} }
@Override @Override
public Object getParentKey() { public Object getParentKey() {
throw new NotYetImplementedFor6Exception( getClass() ); throw new UnsupportedOperationException();
} }
@Override @Override

View File

@ -8,7 +8,6 @@ package org.hibernate.sql.results.graph.entity.internal;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.engine.spi.EntityKey; import org.hibernate.engine.spi.EntityKey;
import org.hibernate.engine.spi.PersistenceContext; import org.hibernate.engine.spi.PersistenceContext;
import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.engine.spi.SharedSessionContractImplementor;
@ -247,12 +246,12 @@ public class EntitySelectFetchInitializer extends AbstractFetchParentAccess impl
@Override @Override
public EntityKey getEntityKey() { public EntityKey getEntityKey() {
throw new NotYetImplementedFor6Exception( getClass() ); throw new UnsupportedOperationException();
} }
@Override @Override
public Object getParentKey() { public Object getParentKey() {
throw new NotYetImplementedFor6Exception( getClass() ); return parentAccess.getParentKey();
} }
@Override @Override

View File

@ -33,10 +33,10 @@ public class JdbcValuesMappingProducerStandard implements JdbcValuesMappingProdu
resolvedMapping = new StandardJdbcValuesMapping( sqlSelections, domainResults ); resolvedMapping = new StandardJdbcValuesMapping( sqlSelections, domainResults );
} }
// @Override @Override
// public void addAffectedTableNames(Set<String> affectedTableNames, SessionFactoryImplementor sessionFactory) { public void addAffectedTableNames(Set<String> affectedTableNames, SessionFactoryImplementor sessionFactory) {
//
// } }
@Override @Override
public JdbcValuesMapping resolve( public JdbcValuesMapping resolve(

View File

@ -9,7 +9,6 @@ package org.hibernate.sql.results.jdbc.spi;
import java.util.Set; import java.util.Set;
import org.hibernate.Incubating; import org.hibernate.Incubating;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.query.results.ResultSetMapping; import org.hibernate.query.results.ResultSetMapping;
@ -35,9 +34,7 @@ public interface JdbcValuesMappingProducer {
JdbcValuesMetadata jdbcResultsMetadata, JdbcValuesMetadata jdbcResultsMetadata,
SessionFactoryImplementor sessionFactory); SessionFactoryImplementor sessionFactory);
default void addAffectedTableNames(Set<String> affectedTableNames, SessionFactoryImplementor sessionFactory) { void addAffectedTableNames(Set<String> affectedTableNames, SessionFactoryImplementor sessionFactory);
throw new NotYetImplementedFor6Exception( getClass() );
}
default JdbcValuesMappingProducer cacheKeyInstance() { default JdbcValuesMappingProducer cacheKeyInstance() {
return this; return this;

View File

@ -12,6 +12,7 @@ import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.function.BiConsumer;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.hibernate.Filter; import org.hibernate.Filter;
@ -39,6 +40,7 @@ import org.hibernate.id.IdentifierGenerator;
import org.hibernate.internal.FilterAliasGenerator; import org.hibernate.internal.FilterAliasGenerator;
import org.hibernate.loader.ast.spi.MultiIdLoadOptions; import org.hibernate.loader.ast.spi.MultiIdLoadOptions;
import org.hibernate.mapping.Collection; import org.hibernate.mapping.Collection;
import org.hibernate.mapping.IndexedConsumer;
import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.PersistentClass;
import org.hibernate.metadata.ClassMetadata; import org.hibernate.metadata.ClassMetadata;
import org.hibernate.metadata.CollectionMetadata; import org.hibernate.metadata.CollectionMetadata;
@ -48,6 +50,8 @@ import org.hibernate.metamodel.mapping.EntityIdentifierMapping;
import org.hibernate.metamodel.mapping.EntityMappingType; import org.hibernate.metamodel.mapping.EntityMappingType;
import org.hibernate.metamodel.mapping.EntityRowIdMapping; import org.hibernate.metamodel.mapping.EntityRowIdMapping;
import org.hibernate.metamodel.mapping.EntityVersionMapping; import org.hibernate.metamodel.mapping.EntityVersionMapping;
import org.hibernate.metamodel.mapping.JdbcMapping;
import org.hibernate.metamodel.mapping.ModelPart;
import org.hibernate.metamodel.mapping.NaturalIdMapping; import org.hibernate.metamodel.mapping.NaturalIdMapping;
import org.hibernate.metamodel.model.domain.NavigableRole; import org.hibernate.metamodel.model.domain.NavigableRole;
import org.hibernate.metamodel.spi.EntityRepresentationStrategy; import org.hibernate.metamodel.spi.EntityRepresentationStrategy;
@ -59,10 +63,16 @@ import org.hibernate.persister.walking.spi.AttributeDefinition;
import org.hibernate.persister.walking.spi.CollectionElementDefinition; import org.hibernate.persister.walking.spi.CollectionElementDefinition;
import org.hibernate.persister.walking.spi.CollectionIndexDefinition; import org.hibernate.persister.walking.spi.CollectionIndexDefinition;
import org.hibernate.persister.walking.spi.EntityIdentifierDefinition; import org.hibernate.persister.walking.spi.EntityIdentifierDefinition;
import org.hibernate.query.NavigablePath;
import org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy;
import org.hibernate.sql.ast.Clause;
import org.hibernate.sql.ast.spi.SqlAstCreationState; import org.hibernate.sql.ast.spi.SqlAstCreationState;
import org.hibernate.query.sqm.mutation.spi.SqmMultiTableMutationStrategy; import org.hibernate.query.sqm.mutation.spi.SqmMultiTableMutationStrategy;
import org.hibernate.sql.ast.spi.SqlSelection;
import org.hibernate.sql.ast.tree.from.TableGroup; import org.hibernate.sql.ast.tree.from.TableGroup;
import org.hibernate.sql.ast.tree.predicate.Predicate; import org.hibernate.sql.ast.tree.predicate.Predicate;
import org.hibernate.sql.results.graph.DomainResult;
import org.hibernate.sql.results.graph.DomainResultCreationState;
import org.hibernate.tuple.entity.BytecodeEnhancementMetadataNonPojoImpl; import org.hibernate.tuple.entity.BytecodeEnhancementMetadataNonPojoImpl;
import org.hibernate.tuple.entity.EntityMetamodel; import org.hibernate.tuple.entity.EntityMetamodel;
import org.hibernate.tuple.entity.EntityTuplizer; import org.hibernate.tuple.entity.EntityTuplizer;
@ -139,11 +149,72 @@ public class GoofyPersisterClassProvider implements PersisterClassResolver {
return null; return null;
} }
@Override
public ModelPart findSubPart(
String name, EntityMappingType targetType) {
return null;
}
@Override
public void visitSubParts(Consumer<ModelPart> consumer, EntityMappingType targetType) {
}
@Override
public <T> DomainResult<T> createDomainResult(
NavigablePath navigablePath,
TableGroup tableGroup,
String resultVariable,
DomainResultCreationState creationState) {
return null;
}
@Override
public void applySqlSelections(
NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState) {
}
@Override
public void applySqlSelections(
NavigablePath navigablePath,
TableGroup tableGroup,
DomainResultCreationState creationState,
BiConsumer<SqlSelection, JdbcMapping> selectionConsumer) {
}
@Override
public int forEachJdbcType(
int offset, IndexedConsumer<JdbcMapping> action) {
return 0;
}
@Override
public Object disassemble(Object value, SharedSessionContractImplementor session) {
return null;
}
@Override
public int forEachDisassembledJdbcValue(
Object value,
Clause clause,
int offset,
JdbcValuesConsumer valuesConsumer,
SharedSessionContractImplementor session) {
return 0;
}
@Override @Override
public SqmMultiTableMutationStrategy getSqmMultiTableMutationStrategy() { public SqmMultiTableMutationStrategy getSqmMultiTableMutationStrategy() {
return null; return null;
} }
@Override
public SqmMultiTableInsertStrategy getSqmMultiTableInsertStrategy() {
return null;
}
@Override @Override
public AttributeMapping findDeclaredAttributeMapping(String name) { public AttributeMapping findDeclaredAttributeMapping(String name) {
return null; return null;

View File

@ -2,22 +2,11 @@ package org.hibernate.orm.test.hbm.query;
import java.io.StringReader; import java.io.StringReader;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.SessionFactory;
import org.hibernate.boot.Metadata;
import org.hibernate.boot.MetadataSources;
import org.hibernate.boot.query.NamedResultSetMappingDescriptor;
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.boot.registry.internal.StandardServiceRegistryImpl;
import org.hibernate.boot.query.NamedNativeQueryDefinition;
import org.hibernate.cfg.Configuration; import org.hibernate.cfg.Configuration;
import org.hibernate.engine.jdbc.ReaderInputStream; import org.hibernate.engine.jdbc.ReaderInputStream;
import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.query.NativeQuery;
import org.hibernate.query.internal.ResultSetMappingResolutionContext; import org.hibernate.query.internal.ResultSetMappingResolutionContext;
import org.hibernate.query.named.NamedResultSetMappingMemento; import org.hibernate.query.named.NamedResultSetMappingMemento;
import org.hibernate.query.results.ResultBuilderEntityValued;
import org.hibernate.query.results.ResultSetMapping; import org.hibernate.query.results.ResultSetMapping;
import org.hibernate.query.results.ResultSetMappingImpl; import org.hibernate.query.results.ResultSetMappingImpl;
import org.hibernate.query.results.complete.CompleteResultBuilderEntityValued; import org.hibernate.query.results.complete.CompleteResultBuilderEntityValued;

View File

@ -12,6 +12,7 @@ import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.function.BiConsumer;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
@ -36,6 +37,7 @@ import org.hibernate.internal.FilterAliasGenerator;
import org.hibernate.jpa.boot.spi.Bootstrap; import org.hibernate.jpa.boot.spi.Bootstrap;
import org.hibernate.loader.ast.spi.MultiIdLoadOptions; import org.hibernate.loader.ast.spi.MultiIdLoadOptions;
import org.hibernate.mapping.Collection; import org.hibernate.mapping.Collection;
import org.hibernate.mapping.IndexedConsumer;
import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.PersistentClass;
import org.hibernate.metadata.ClassMetadata; import org.hibernate.metadata.ClassMetadata;
import org.hibernate.metamodel.mapping.AttributeMapping; import org.hibernate.metamodel.mapping.AttributeMapping;
@ -44,6 +46,8 @@ import org.hibernate.metamodel.mapping.EntityIdentifierMapping;
import org.hibernate.metamodel.mapping.EntityMappingType; import org.hibernate.metamodel.mapping.EntityMappingType;
import org.hibernate.metamodel.mapping.EntityRowIdMapping; import org.hibernate.metamodel.mapping.EntityRowIdMapping;
import org.hibernate.metamodel.mapping.EntityVersionMapping; import org.hibernate.metamodel.mapping.EntityVersionMapping;
import org.hibernate.metamodel.mapping.JdbcMapping;
import org.hibernate.metamodel.mapping.ModelPart;
import org.hibernate.metamodel.mapping.NaturalIdMapping; import org.hibernate.metamodel.mapping.NaturalIdMapping;
import org.hibernate.metamodel.model.domain.NavigableRole; import org.hibernate.metamodel.model.domain.NavigableRole;
import org.hibernate.metamodel.spi.EntityRepresentationStrategy; import org.hibernate.metamodel.spi.EntityRepresentationStrategy;
@ -55,7 +59,14 @@ import org.hibernate.persister.spi.PersisterClassResolver;
import org.hibernate.persister.spi.PersisterCreationContext; import org.hibernate.persister.spi.PersisterCreationContext;
import org.hibernate.persister.walking.spi.AttributeDefinition; import org.hibernate.persister.walking.spi.AttributeDefinition;
import org.hibernate.persister.walking.spi.EntityIdentifierDefinition; import org.hibernate.persister.walking.spi.EntityIdentifierDefinition;
import org.hibernate.query.NavigablePath;
import org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy;
import org.hibernate.query.sqm.mutation.spi.SqmMultiTableMutationStrategy; import org.hibernate.query.sqm.mutation.spi.SqmMultiTableMutationStrategy;
import org.hibernate.sql.ast.Clause;
import org.hibernate.sql.ast.spi.SqlSelection;
import org.hibernate.sql.ast.tree.from.TableGroup;
import org.hibernate.sql.results.graph.DomainResult;
import org.hibernate.sql.results.graph.DomainResultCreationState;
import org.hibernate.tuple.entity.BytecodeEnhancementMetadataNonPojoImpl; import org.hibernate.tuple.entity.BytecodeEnhancementMetadataNonPojoImpl;
import org.hibernate.tuple.entity.EntityMetamodel; import org.hibernate.tuple.entity.EntityMetamodel;
import org.hibernate.tuple.entity.EntityTuplizer; import org.hibernate.tuple.entity.EntityTuplizer;
@ -163,11 +174,72 @@ public class PersisterClassProviderTest {
return null; return null;
} }
@Override
public ModelPart findSubPart(
String name, EntityMappingType targetType) {
return null;
}
@Override
public void visitSubParts(Consumer<ModelPart> consumer, EntityMappingType targetType) {
}
@Override
public <T> DomainResult<T> createDomainResult(
NavigablePath navigablePath,
TableGroup tableGroup,
String resultVariable,
DomainResultCreationState creationState) {
return null;
}
@Override
public void applySqlSelections(
NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState) {
}
@Override
public void applySqlSelections(
NavigablePath navigablePath,
TableGroup tableGroup,
DomainResultCreationState creationState,
BiConsumer<SqlSelection, JdbcMapping> selectionConsumer) {
}
@Override
public int forEachJdbcType(
int offset, IndexedConsumer<JdbcMapping> action) {
return 0;
}
@Override
public Object disassemble(Object value, SharedSessionContractImplementor session) {
return null;
}
@Override
public int forEachDisassembledJdbcValue(
Object value,
Clause clause,
int offset,
JdbcValuesConsumer valuesConsumer,
SharedSessionContractImplementor session) {
return 0;
}
@Override @Override
public SqmMultiTableMutationStrategy getSqmMultiTableMutationStrategy() { public SqmMultiTableMutationStrategy getSqmMultiTableMutationStrategy() {
return null; return null;
} }
@Override
public SqmMultiTableInsertStrategy getSqmMultiTableInsertStrategy() {
return null;
}
@Override @Override
public AttributeMapping findDeclaredAttributeMapping(String name) { public AttributeMapping findDeclaredAttributeMapping(String name) {
return null; return null;

View File

@ -14,6 +14,7 @@ import java.util.Hashtable;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.function.BiConsumer;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
@ -40,6 +41,7 @@ import org.hibernate.id.UUIDHexGenerator;
import org.hibernate.internal.FilterAliasGenerator; import org.hibernate.internal.FilterAliasGenerator;
import org.hibernate.internal.StaticFilterAliasGenerator; import org.hibernate.internal.StaticFilterAliasGenerator;
import org.hibernate.loader.ast.spi.MultiIdLoadOptions; import org.hibernate.loader.ast.spi.MultiIdLoadOptions;
import org.hibernate.mapping.IndexedConsumer;
import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.PersistentClass;
import org.hibernate.metadata.ClassMetadata; import org.hibernate.metadata.ClassMetadata;
import org.hibernate.metamodel.mapping.AttributeMapping; import org.hibernate.metamodel.mapping.AttributeMapping;
@ -48,6 +50,8 @@ import org.hibernate.metamodel.mapping.EntityIdentifierMapping;
import org.hibernate.metamodel.mapping.EntityMappingType; import org.hibernate.metamodel.mapping.EntityMappingType;
import org.hibernate.metamodel.mapping.EntityRowIdMapping; import org.hibernate.metamodel.mapping.EntityRowIdMapping;
import org.hibernate.metamodel.mapping.EntityVersionMapping; import org.hibernate.metamodel.mapping.EntityVersionMapping;
import org.hibernate.metamodel.mapping.JdbcMapping;
import org.hibernate.metamodel.mapping.ModelPart;
import org.hibernate.metamodel.mapping.NaturalIdMapping; import org.hibernate.metamodel.mapping.NaturalIdMapping;
import org.hibernate.metamodel.model.domain.NavigableRole; import org.hibernate.metamodel.model.domain.NavigableRole;
import org.hibernate.metamodel.spi.EntityRepresentationStrategy; import org.hibernate.metamodel.spi.EntityRepresentationStrategy;
@ -55,7 +59,14 @@ import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.persister.spi.PersisterCreationContext; import org.hibernate.persister.spi.PersisterCreationContext;
import org.hibernate.persister.walking.spi.AttributeDefinition; import org.hibernate.persister.walking.spi.AttributeDefinition;
import org.hibernate.persister.walking.spi.EntityIdentifierDefinition; import org.hibernate.persister.walking.spi.EntityIdentifierDefinition;
import org.hibernate.query.NavigablePath;
import org.hibernate.query.sqm.mutation.spi.SqmMultiTableInsertStrategy;
import org.hibernate.query.sqm.mutation.spi.SqmMultiTableMutationStrategy; import org.hibernate.query.sqm.mutation.spi.SqmMultiTableMutationStrategy;
import org.hibernate.sql.ast.Clause;
import org.hibernate.sql.ast.spi.SqlSelection;
import org.hibernate.sql.ast.tree.from.TableGroup;
import org.hibernate.sql.results.graph.DomainResult;
import org.hibernate.sql.results.graph.DomainResultCreationState;
import org.hibernate.tuple.entity.BytecodeEnhancementMetadataNonPojoImpl; import org.hibernate.tuple.entity.BytecodeEnhancementMetadataNonPojoImpl;
import org.hibernate.tuple.entity.EntityMetamodel; import org.hibernate.tuple.entity.EntityMetamodel;
import org.hibernate.tuple.entity.EntityTuplizer; import org.hibernate.tuple.entity.EntityTuplizer;
@ -121,11 +132,72 @@ public class CustomPersister implements EntityPersister {
return Custom.class.getName(); return Custom.class.getName();
} }
@Override
public ModelPart findSubPart(
String name, EntityMappingType targetType) {
return null;
}
@Override
public void visitSubParts(Consumer<ModelPart> consumer, EntityMappingType targetType) {
}
@Override
public <T> DomainResult<T> createDomainResult(
NavigablePath navigablePath,
TableGroup tableGroup,
String resultVariable,
DomainResultCreationState creationState) {
return null;
}
@Override
public void applySqlSelections(
NavigablePath navigablePath, TableGroup tableGroup, DomainResultCreationState creationState) {
}
@Override
public void applySqlSelections(
NavigablePath navigablePath,
TableGroup tableGroup,
DomainResultCreationState creationState,
BiConsumer<SqlSelection, JdbcMapping> selectionConsumer) {
}
@Override
public int forEachJdbcType(
int offset, IndexedConsumer<JdbcMapping> action) {
return 0;
}
@Override
public Object disassemble(Object value, SharedSessionContractImplementor session) {
return null;
}
@Override
public int forEachDisassembledJdbcValue(
Object value,
Clause clause,
int offset,
JdbcValuesConsumer valuesConsumer,
SharedSessionContractImplementor session) {
return 0;
}
@Override @Override
public SqmMultiTableMutationStrategy getSqmMultiTableMutationStrategy() { public SqmMultiTableMutationStrategy getSqmMultiTableMutationStrategy() {
return null; return null;
} }
@Override
public SqmMultiTableInsertStrategy getSqmMultiTableInsertStrategy() {
return null;
}
@Override @Override
public AttributeMapping findDeclaredAttributeMapping(String name) { public AttributeMapping findDeclaredAttributeMapping(String name) {
return null; return null;

View File

@ -9,7 +9,6 @@ package org.hibernate.envers.boot.model;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping; import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmHibernateMapping;
import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmJoinedSubclassEntityType; import org.hibernate.boot.jaxb.hbm.spi.JaxbHbmJoinedSubclassEntityType;
import org.hibernate.envers.configuration.internal.metadata.AuditTableData; import org.hibernate.envers.configuration.internal.metadata.AuditTableData;

View File

@ -9,15 +9,6 @@ package org.hibernate.spatial.predicate;
import jakarta.persistence.criteria.Expression; import jakarta.persistence.criteria.Expression;
import jakarta.persistence.criteria.Predicate; import jakarta.persistence.criteria.Predicate;
import org.hibernate.NotYetImplementedFor6Exception;
import org.hibernate.query.sqm.NodeBuilder;
import org.hibernate.query.sqm.SemanticQueryWalker;
import org.hibernate.query.sqm.tree.predicate.AbstractNegatableSqmPredicate;
import org.hibernate.spatial.jts.EnvelopeAdapter;
import org.locationtech.jts.geom.Envelope;
import org.locationtech.jts.geom.Geometry;
/** /**
* JPA Spatial Filter {@link Predicate} * JPA Spatial Filter {@link Predicate}
*/ */