From 152815273561e8393eebce59f843cbc6fdd8528d Mon Sep 17 00:00:00 2001 From: Gavin Date: Tue, 11 Jan 2022 18:20:25 +0100 Subject: [PATCH] remove deprecated methods of Cache interface --- .../src/main/java/org/hibernate/Cache.java | 142 ------------------ 1 file changed, 142 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/Cache.java b/hibernate-core/src/main/java/org/hibernate/Cache.java index f3eb1fadcb..98c1475fa2 100644 --- a/hibernate-core/src/main/java/org/hibernate/Cache.java +++ b/hibernate-core/src/main/java/org/hibernate/Cache.java @@ -6,8 +6,6 @@ */ package org.hibernate; -import java.io.Serializable; - /** * An API for directly querying and managing the second level cache. *

@@ -289,144 +287,4 @@ public interface Cache extends jakarta.persistence.Cache { evictDefaultQueryRegion(); evictQueryRegions(); } - - - - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Deprecations (5.3) - - /** - * Evicts the entity data for a particular entity "instance". - * - * @param entityClass The entity class. - * @param identifier The entity identifier - * - * @deprecated Use {@link Cache#evictEntityData(Class, Object)} instead - */ - @Deprecated - default void evictEntity(Class entityClass, Object identifier) { - evictEntityData( entityClass, identifier ); - } - - /** - * Evicts the entity data for a particular entity "instance". - * - * @param entityName The entity name. - * @param identifier The entity identifier - * - * @deprecated Use {@link Cache#evictEntityData(String, Object)} instead - */ - @Deprecated - default void evictEntity(String entityName, Object identifier) { - evictEntityData( entityName, identifier ); - } - - /** - * Evicts all entity data from the given region (i.e. for all entities of - * type). - * - * @param entityClass The entity class. - * - * @deprecated Use {@link Cache#evictEntityData(Class)} instead - */ - @Deprecated - default void evictEntityRegion(Class entityClass) { - evictEntityData( entityClass ); - } - - /** - * Evicts all entity data from the given region (i.e. for all entities of - * type). - * - * @param entityName The entity name. - * - * @deprecated Use {@link Cache#evictEntityData(String)} instead - */ - @Deprecated - default void evictEntityRegion(String entityName) { - evictEntityData( entityName ); - } - - /** - * Evict data from all entity regions. - * - * @deprecated Use {@link Cache#evictEntityData()} instead - */ - @Deprecated - default void evictEntityRegions() { - evictEntityData(); - } - - /** - * Evicts all naturalId data from the given region (i.e. for all entities of - * type). - * - * @param entityClass The entity class. - * - * @deprecated Use {@link Cache#evictNaturalIdData(Class)} instead - */ - @Deprecated - default void evictNaturalIdRegion(Class entityClass) { - evictNaturalIdData( entityClass ); - } - - /** - * Evicts all naturalId data from the given region (i.e. for all entities of - * type). - * - * @param entityName The entity name. - * - * @deprecated Use {@link Cache#evictNaturalIdData(String)} instead - */ - @Deprecated - default void evictNaturalIdRegion(String entityName) { - evictNaturalIdData( entityName ); - } - - /** - * Evict data from all naturalId regions. - * - * @deprecated Use {@link Cache#evictNaturalIdData()} instead - */ - @Deprecated - default void evictNaturalIdRegions() { - evictNaturalIdData(); - } - - /** - * Evicts the cache data for the given identified collection instance. - * - * @param role The "collection role" (of form {@code package.OwnerEntityName.collectionPropertyName}). - * @param ownerIdentifier The identifier of the owning entity - * - * @deprecated Use {@link Cache#evictCollectionData(String, Object)} instead - */ - @Deprecated - default void evictCollection(String role, Serializable ownerIdentifier) { - evictCollectionData( role, ownerIdentifier ); - } - - /** - * Evicts all entity data from the given region (i.e. evicts all cached data - * for the specified collection role). - * - * @param role The "collection role" (in form [owner-entity-name].[collection-property-name]). - * - * @deprecated Use {@link Cache#evictCollectionData(String)} instead - */ - @Deprecated - default void evictCollectionRegion(String role) { - evictCollectionData( role ); - } - - /** - * Evict data from all collection regions. - * - * @deprecated Use {@link Cache#evictCollectionData()} instead - */ - @Deprecated - default void evictCollectionRegions() { - evictCollectionData(); - } - }