Deprecate method instead of removing it.

Original Pull Request: #2935
This commit is contained in:
Christoph Strobl
2024-07-02 08:16:25 +02:00
parent 4203a5bb67
commit 8b5f29ec96
2 changed files with 13 additions and 6 deletions

View File

@@ -57,11 +57,6 @@ public class BasicRedisPersistentEntity<T> extends BasicKeyValuePersistentEntity
return this.timeToLiveAccessor;
}
@Override
public boolean hasExplicitTimeToLiveProperty() {
return getExplicitTimeToLiveProperty() != null;
}
@Override
@Nullable
public RedisPersistentProperty getExplicitTimeToLiveProperty() {

View File

@@ -40,8 +40,20 @@ public interface RedisPersistentEntity<T> extends KeyValuePersistentEntity<T, Re
/**
* @return {@literal true} when a property is annotated with {@link org.springframework.data.redis.core.TimeToLive}.
* @since 1.8
* @deprecated in favor of {@link #hasExplicitTimeToLiveProperty()}.
*/
boolean hasExplicitTimeToLiveProperty();
@Deprecated(forRemoval = true)
default boolean hasExplictTimeToLiveProperty() {
return hasExplicitTimeToLiveProperty();
}
/**
* @return {@literal true} when a property is annotated with {@link org.springframework.data.redis.core.TimeToLive}.
* @since 3.4
*/
default boolean hasExplicitTimeToLiveProperty() {
return getExplicitTimeToLiveProperty() != null;
}
/**
* Get the {@link PersistentProperty} that is annotated with {@link org.springframework.data.redis.core.TimeToLive}.