Skip to content

Commit 2351f5a

Browse files
committed
HHH-19021 completely remove Mapping
1 parent b572c0d commit 2351f5a

File tree

12 files changed

+0
-245
lines changed

12 files changed

+0
-245
lines changed

hibernate-core/src/main/java/org/hibernate/engine/spi/Mapping.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

hibernate-core/src/main/java/org/hibernate/mapping/Collection.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.hibernate.collection.internal.CustomCollectionTypeSemantics;
2222
import org.hibernate.collection.spi.CollectionSemantics;
2323
import org.hibernate.engine.spi.ExecuteUpdateResultCheckStyle;
24-
import org.hibernate.engine.spi.Mapping;
2524
import org.hibernate.internal.FilterConfiguration;
2625
import org.hibernate.internal.util.PropertiesHelper;
2726
import org.hibernate.internal.util.StringHelper;
@@ -378,14 +377,6 @@ public void setFetchMode(FetchMode fetchMode) {
378377
this.fetchMode = fetchMode;
379378
}
380379

381-
/**
382-
* @deprecated use {@link #validate(MappingContext)}
383-
*/
384-
@Deprecated(since = "7.0", forRemoval = true)
385-
public void validate(Mapping mapping) throws MappingException {
386-
validate( (MappingContext) mapping);
387-
}
388-
389380
public void validate(MappingContext mappingContext) throws MappingException {
390381
assert getKey() != null : "Collection key not bound : " + getRole();
391382
assert getElement() != null : "Collection element not bound : " + getRole();

hibernate-core/src/main/java/org/hibernate/mapping/Column.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import org.hibernate.boot.spi.MetadataBuildingContext;
2020
import org.hibernate.dialect.Dialect;
2121
import org.hibernate.engine.jdbc.Size;
22-
import org.hibernate.engine.spi.Mapping;
2322
import org.hibernate.loader.internal.AliasConstantsHelper;
2423
import org.hibernate.metamodel.mapping.JdbcMapping;
2524
import org.hibernate.query.sqm.function.SqmFunctionRegistry;
@@ -281,14 +280,6 @@ public boolean equals(Column column) {
281280
: name.equalsIgnoreCase( column.name ) );
282281
}
283282

284-
/**
285-
* @deprecated use {@link #getSqlTypeCode(MappingContext)}
286-
*/
287-
@Deprecated(since = "7.0", forRemoval = true)
288-
public int getSqlTypeCode(Mapping mapping) throws MappingException{
289-
return getSqlTypeCode((MappingContext) mapping);
290-
}
291-
292283
public int getSqlTypeCode(MappingContext mapping) throws MappingException {
293284
if ( sqlTypeCode == null ) {
294285
final Type type = getValue().getType();
@@ -422,14 +413,6 @@ public String getSqlType(Metadata mapping) {
422413
return getSqlTypeName( database.getTypeConfiguration(), database.getDialect(), mapping );
423414
}
424415

425-
/**
426-
* @deprecated use {@link #getSqlType(Metadata)}
427-
*/
428-
@Deprecated(since = "6.2", forRemoval = true)
429-
public String getSqlType(TypeConfiguration typeConfiguration, Dialect dialect, Mapping mapping) {
430-
return getSqlTypeName( typeConfiguration, dialect, mapping );
431-
}
432-
433416
@Override
434417
public String getTypeName() {
435418
return sqlTypeName;
@@ -460,14 +443,6 @@ public int getDecimalDigits() {
460443
return scale == null ? 0 : scale;
461444
}
462445

463-
/**
464-
* @deprecated use {@link #getColumnSize(Dialect, MappingContext)}
465-
*/
466-
@Deprecated(since = "7.0", forRemoval = true)
467-
public Size getColumnSize(Dialect dialect, Mapping mapping) {
468-
return getColumnSize(dialect, (MappingContext) mapping);
469-
}
470-
471446
public Size getColumnSize(Dialect dialect, MappingContext mappingContext) {
472447
if ( columnSize == null ) {
473448
columnSize = calculateColumnSize( dialect, mappingContext );

hibernate-core/src/main/java/org/hibernate/mapping/IdentifierCollection.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import org.hibernate.MappingException;
1010
import org.hibernate.boot.spi.MetadataBuildingContext;
11-
import org.hibernate.engine.spi.Mapping;
1211
import org.hibernate.resource.beans.spi.ManagedBean;
1312
import org.hibernate.type.MappingContext;
1413
import org.hibernate.usertype.UserCollectionType;
@@ -66,11 +65,6 @@ void createPrimaryKey() {
6665
// create an index on the key columns??
6766
}
6867

69-
@Deprecated(forRemoval = true)
70-
public void validate(Mapping mapping) throws MappingException {
71-
validate( (MappingContext) mapping);
72-
}
73-
7468
public void validate(MappingContext mappingContext) throws MappingException {
7569
super.validate( mappingContext );
7670

hibernate-core/src/main/java/org/hibernate/mapping/IndexedCollection.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import org.hibernate.MappingException;
1010
import org.hibernate.boot.spi.MetadataBuildingContext;
11-
import org.hibernate.engine.spi.Mapping;
1211
import org.hibernate.resource.beans.spi.ManagedBean;
1312
import org.hibernate.type.MappingContext;
1413
import org.hibernate.usertype.UserCollectionType;
@@ -96,11 +95,6 @@ void createPrimaryKey() {
9695
// }
9796
}
9897

99-
@Deprecated(forRemoval = true)
100-
public void validate(Mapping mapping) throws MappingException {
101-
validate( (MappingContext) mapping);
102-
}
103-
10498
public void validate(MappingContext mappingContext) throws MappingException {
10599
super.validate( mappingContext );
106100

hibernate-core/src/main/java/org/hibernate/mapping/Property.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import org.hibernate.cfg.AvailableSettings;
1919
import org.hibernate.engine.spi.CascadeStyle;
2020
import org.hibernate.engine.spi.CascadeStyles;
21-
import org.hibernate.engine.spi.Mapping;
2221
import org.hibernate.jpa.event.spi.CallbackDefinition;
2322
import org.hibernate.metamodel.RepresentationMode;
2423
import org.hibernate.metamodel.spi.RuntimeModelCreationContext;
@@ -276,14 +275,6 @@ public void setMetaAttributes(Map<String, MetaAttribute> metas) {
276275
this.metaAttributes = metas;
277276
}
278277

279-
/**
280-
* @deprecated use {@link #isValid(MappingContext)}
281-
*/
282-
@Deprecated(since = "7.0", forRemoval = true)
283-
public boolean isValid(Mapping mapping) throws MappingException {
284-
return isValid( (MappingContext) mapping);
285-
}
286-
287278
public boolean isValid(MappingContext mappingContext) throws MappingException {
288279
final Value value = getValue();
289280
if ( value instanceof BasicValue basicValue && basicValue.isDisallowedWrapperArray() ) {

hibernate-core/src/main/java/org/hibernate/mapping/Set.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import org.hibernate.MappingException;
1010
import org.hibernate.boot.spi.MetadataBuildingContext;
11-
import org.hibernate.engine.spi.Mapping;
1211
import org.hibernate.resource.beans.spi.ManagedBean;
1312
import org.hibernate.type.CollectionType;
1413
import org.hibernate.type.OrderedSetType;
@@ -48,11 +47,6 @@ public Set copy() {
4847
return new Set( this );
4948
}
5049

51-
@Deprecated(forRemoval = true)
52-
public void validate(Mapping mapping) throws MappingException {
53-
validate( (MappingContext) mapping );
54-
}
55-
5650
public void validate(MappingContext mappingContext) throws MappingException {
5751
super.validate( mappingContext );
5852
//for backward compatibility, disable this:

hibernate-core/src/main/java/org/hibernate/mapping/Value.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.hibernate.Internal;
1414
import org.hibernate.MappingException;
1515
import org.hibernate.boot.spi.MetadataBuildingContext;
16-
import org.hibernate.engine.spi.Mapping;
1716
import org.hibernate.metamodel.mapping.JdbcMapping;
1817
import org.hibernate.service.ServiceRegistry;
1918
import org.hibernate.type.CompositeType;
@@ -72,14 +71,6 @@ default List<Column> getConstraintColumns() {
7271

7372
Type getType() throws MappingException;
7473

75-
/**
76-
* @deprecated use {@link #getSelectableType(MappingContext, int)}
77-
*/
78-
@Deprecated(since = "7.0", forRemoval = true)
79-
default JdbcMapping getSelectableType(Mapping factory, int index) throws MappingException {
80-
return getSelectableType( (MappingContext) factory, index );
81-
}
82-
8374
@Incubating
8475
default JdbcMapping getSelectableType(MappingContext mappingContext, int index) throws MappingException {
8576
return getType( mappingContext, getType(), index );
@@ -143,14 +134,6 @@ private Type getIdType(EntityType entityType) {
143134

144135
boolean isSimpleValue();
145136

146-
/**
147-
* @deprecated use {@link #isValid(MappingContext)}
148-
*/
149-
@Deprecated(since = "7.0", forRemoval = true)
150-
default boolean isValid(Mapping mapping) throws MappingException{
151-
return isValid( (MappingContext) mapping );
152-
}
153-
154137
boolean isValid(MappingContext mappingContext) throws MappingException;
155138

156139
void setTypeUsingReflection(String className, String propertyName) throws MappingException;

hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/SelectableMappingsImpl.java

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import java.util.List;
99

1010
import org.hibernate.dialect.Dialect;
11-
import org.hibernate.engine.spi.Mapping;
1211
import org.hibernate.internal.util.collections.CollectionHelper;
1312
import org.hibernate.mapping.Selectable;
1413
import org.hibernate.mapping.Value;
@@ -55,34 +54,6 @@ private static void resolveJdbcMappings(List<JdbcMapping> jdbcMappings, MappingC
5554
}
5655
}
5756

58-
/**
59-
* @deprecated use {@link #from(String, Value, int[], MappingContext, TypeConfiguration, boolean[], boolean[], Dialect, SqmFunctionRegistry, RuntimeModelCreationContext)}
60-
*/
61-
@Deprecated(since = "7.0")
62-
public static SelectableMappings from(
63-
String containingTableExpression,
64-
Value value,
65-
int[] propertyOrder,
66-
Mapping mapping,
67-
TypeConfiguration typeConfiguration,
68-
boolean[] insertable,
69-
boolean[] updateable,
70-
Dialect dialect,
71-
SqmFunctionRegistry sqmFunctionRegistry,
72-
RuntimeModelCreationContext creationContext) {
73-
return from(
74-
containingTableExpression,
75-
value, propertyOrder,
76-
(MappingContext) mapping,
77-
typeConfiguration,
78-
insertable,
79-
updateable,
80-
dialect,
81-
sqmFunctionRegistry,
82-
creationContext
83-
);
84-
}
85-
8657
public static SelectableMappings from(
8758
String containingTableExpression,
8859
Value value,

hibernate-core/src/main/java/org/hibernate/type/EntityType.java

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.hibernate.MappingException;
1414
import org.hibernate.bytecode.enhance.spi.interceptor.EnhancementAsProxyLazinessInterceptor;
1515
import org.hibernate.engine.spi.EntityUniqueKey;
16-
import org.hibernate.engine.spi.Mapping;
1716
import org.hibernate.engine.spi.PersistenceContext;
1817
import org.hibernate.engine.spi.PersistentAttributeInterceptor;
1918
import org.hibernate.engine.spi.SessionFactoryImplementor;
@@ -567,19 +566,6 @@ public boolean isLogicalOneToOne() {
567566
return isOneToOne();
568567
}
569568

570-
/**
571-
* Convenience method to locate the identifier type of the associated entity.
572-
*
573-
* @param factory The mappings...
574-
*
575-
* @return The identifier type
576-
* @deprecated use {@link #getIdentifierType(MappingContext)}
577-
*/
578-
@Deprecated(since = "7.0", forRemoval = true)
579-
Type getIdentifierType(final Mapping factory) {
580-
return getIdentifierType( (MappingContext) factory );
581-
}
582-
583569
Type getIdentifierType(final MappingContext mappingContext) {
584570
final Type type = associatedIdentifierType;
585571
//The following branch implements a simple lazy-initialization, but rather than the canonical
@@ -612,24 +598,6 @@ Type getIdentifierType(final SharedSessionContractImplementor session) {
612598
}
613599
}
614600

615-
/**
616-
* Determine the type of either (1) the identifier if we reference the
617-
* associated entity's PK or (2) the unique key to which we refer (i.e.
618-
* the property-ref).
619-
*
620-
* @param factory The mappings...
621-
*
622-
* @return The appropriate type.
623-
*
624-
* @throws MappingException Generally, if unable to resolve the associated entity name
625-
* or unique key property name.
626-
* @deprecated use {@link #getIdentifierOrUniqueKeyType(MappingContext)}
627-
*/
628-
@Deprecated(since = "7.0", forRemoval = true)
629-
public final Type getIdentifierOrUniqueKeyType(Mapping factory) throws MappingException {
630-
return getIdentifierOrUniqueKeyType( (MappingContext) factory );
631-
}
632-
633601
/**
634602
* Determine the type of either:
635603
* <ol>
@@ -657,24 +625,6 @@ public final Type getIdentifierOrUniqueKeyType(MappingContext mappingContext) th
657625
}
658626
}
659627

660-
/**
661-
* The name of the property on the associated entity to which our FK
662-
* refers
663-
*
664-
* @param factory The mappings...
665-
*
666-
* @return The appropriate property name.
667-
*
668-
* @throws MappingException Generally, if unable to resolve the associated entity name
669-
*
670-
* @deprecated No longer used
671-
*/
672-
@Deprecated(since = "7", forRemoval = true)
673-
public final String getIdentifierOrUniqueKeyPropertyName(Mapping factory)
674-
throws MappingException {
675-
return getIdentifierOrUniqueKeyPropertyName( (MappingContext) factory);
676-
}
677-
678628
/**
679629
* The name of the property on the associated entity to which our FK
680630
* refers

0 commit comments

Comments
 (0)