Skip to content

Commit

Permalink
add forRemoval = true to some @deprecated tags
Browse files Browse the repository at this point in the history
gavinking committed Jan 5, 2025
1 parent fc4a9a2 commit 7e9ff01
Showing 11 changed files with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -23,6 +23,6 @@
* {@link org.hibernate.metamodel.RuntimeMetamodels},
* or {@link MappingContext} to access such information
*/
@Deprecated(since = "6.0")
@Deprecated(since = "6.0", forRemoval = true)
public interface Mapping extends MappingContext {
}
Original file line number Diff line number Diff line change
@@ -381,7 +381,7 @@ public void setFetchMode(FetchMode fetchMode) {
/**
* @deprecated use {@link #validate(MappingContext)}
*/
@Deprecated(since = "7.0")
@Deprecated(since = "7.0", forRemoval = true)
public void validate(Mapping mapping) throws MappingException {
validate( (MappingContext) mapping);
}
Original file line number Diff line number Diff line change
@@ -284,7 +284,7 @@ public boolean equals(Column column) {
/**
* @deprecated use {@link #getSqlTypeCode(MappingContext)}
*/
@Deprecated(since = "7.0")
@Deprecated(since = "7.0", forRemoval = true)
public int getSqlTypeCode(Mapping mapping) throws MappingException{
return getSqlTypeCode((MappingContext) mapping);
}
@@ -425,7 +425,7 @@ public String getSqlType(Metadata mapping) {
/**
* @deprecated use {@link #getSqlType(Metadata)}
*/
@Deprecated(since = "6.2")
@Deprecated(since = "6.2", forRemoval = true)
public String getSqlType(TypeConfiguration typeConfiguration, Dialect dialect, Mapping mapping) {
return getSqlTypeName( typeConfiguration, dialect, mapping );
}
@@ -463,7 +463,7 @@ public int getDecimalDigits() {
/**
* @deprecated use {@link #getColumnSize(Dialect, MappingContext)}
*/
@Deprecated(since = "7.0")
@Deprecated(since = "7.0", forRemoval = true)
public Size getColumnSize(Dialect dialect, Mapping mapping) {
return getColumnSize(dialect, (MappingContext) mapping);
}
Original file line number Diff line number Diff line change
@@ -66,6 +66,7 @@ void createPrimaryKey() {
// create an index on the key columns??
}

@Deprecated(forRemoval = true)
public void validate(Mapping mapping) throws MappingException {
validate( (MappingContext) mapping);
}
Original file line number Diff line number Diff line change
@@ -96,7 +96,7 @@ void createPrimaryKey() {
// }
}

@Deprecated
@Deprecated(forRemoval = true)
public void validate(Mapping mapping) throws MappingException {
validate( (MappingContext) mapping);
}
Original file line number Diff line number Diff line change
@@ -279,7 +279,7 @@ public void setMetaAttributes(Map<String, MetaAttribute> metas) {
/**
* @deprecated use {@link #isValid(MappingContext)}
*/
@Deprecated(since = "7.0")
@Deprecated(since = "7.0", forRemoval = true)
public boolean isValid(Mapping mapping) throws MappingException {
return isValid( (MappingContext) mapping);
}
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@ public Set copy() {
return new Set( this );
}

@Deprecated(forRemoval = true)
public void validate(Mapping mapping) throws MappingException {
validate( (MappingContext) mapping );
}
4 changes: 2 additions & 2 deletions hibernate-core/src/main/java/org/hibernate/mapping/Value.java
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ default List<Column> getConstraintColumns() {
/**
* @deprecated use {@link #getSelectableType(MappingContext, int)}
*/
@Deprecated(since = "7.0")
@Deprecated(since = "7.0", forRemoval = true)
default JdbcMapping getSelectableType(Mapping factory, int index) throws MappingException {
return getSelectableType( (MappingContext) factory, index );
}
@@ -146,7 +146,7 @@ private Type getIdType(EntityType entityType) {
/**
* @deprecated use {@link #isValid(MappingContext)}
*/
@Deprecated(since = "7.0")
@Deprecated(since = "7.0", forRemoval = true)
default boolean isValid(Mapping mapping) throws MappingException{
return isValid( (MappingContext) mapping );
}
Original file line number Diff line number Diff line change
@@ -575,7 +575,7 @@ public boolean isLogicalOneToOne() {
* @return The identifier type
* @deprecated use {@link #getIdentifierType(MappingContext)}
*/
@Deprecated(since = "7.0")
@Deprecated(since = "7.0", forRemoval = true)
Type getIdentifierType(final Mapping factory) {
return getIdentifierType( (MappingContext) factory );
}
@@ -625,7 +625,7 @@ Type getIdentifierType(final SharedSessionContractImplementor session) {
* or unique key property name.
* @deprecated use {@link #getIdentifierOrUniqueKeyType(MappingContext)}
*/
@Deprecated(since = "7.0")
@Deprecated(since = "7.0", forRemoval = true)
public final Type getIdentifierOrUniqueKeyType(Mapping factory) throws MappingException {
return getIdentifierOrUniqueKeyType( (MappingContext) factory );
}
Original file line number Diff line number Diff line change
@@ -123,7 +123,7 @@ public String toXMLString(Object value, SessionFactoryImplementor factory) throw
/**
* @deprecated use {@link #fromXMLString(String, MappingContext)}
*/
@Deprecated(since = "7.0")
@Deprecated(since = "7.0", forRemoval = true)
public Object fromXMLString(String xml, Mapping factory) throws HibernateException {
return fromXMLString( xml, (MappingContext) factory );
}
6 changes: 3 additions & 3 deletions hibernate-core/src/main/java/org/hibernate/type/Type.java
Original file line number Diff line number Diff line change
@@ -103,7 +103,7 @@ public interface Type extends Serializable {
* @throws MappingException Generally indicates an issue accessing the passed mapping object.
* @deprecated use {@link #getColumnSpan(MappingContext)}
*/
@Deprecated(since = "7.0")
@Deprecated(since = "7.0", forRemoval = true)
default int getColumnSpan(Mapping mapping) throws MappingException{
return getColumnSpan( (MappingContext) mapping);
}
@@ -134,7 +134,7 @@ default int getColumnSpan(Mapping mapping) throws MappingException{
* @throws MappingException Generally indicates an issue accessing the passed mapping object.
* @deprecated use {@link #getSqlTypeCodes(MappingContext)}
*/
@Deprecated(since = "7.0")
@Deprecated(since = "7.0", forRemoval = true)
default int[] getSqlTypeCodes(Mapping mapping) throws MappingException{
return getSqlTypeCodes((MappingContext) mapping);
}
@@ -544,7 +544,7 @@ String toLoggableString(@Nullable Object value, SessionFactoryImplementor factor
* @return array indicating column nullness for a value instance
* @deprecated use {@link #toColumnNullness(Object, MappingContext)}
*/
@Deprecated(since = "7.0")
@Deprecated(since = "7.0", forRemoval = true)
default boolean[] toColumnNullness(@Nullable Object value, Mapping mapping){
return toColumnNullness( value,(MappingContext) mapping);
}

0 comments on commit 7e9ff01

Please sign in to comment.