Class BasicRedisPersistentEntity<T>
java.lang.Object
org.springframework.data.mapping.model.BasicPersistentEntity<T,P>
org.springframework.data.keyvalue.core.mapping.BasicKeyValuePersistentEntity<T,RedisPersistentProperty>
org.springframework.data.redis.core.mapping.BasicRedisPersistentEntity<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Iterable<RedisPersistentProperty>,org.springframework.data.keyvalue.core.mapping.KeyValuePersistentEntity<T,,RedisPersistentProperty> MutablePersistentEntity<T,,RedisPersistentProperty> PersistentEntity<T,,RedisPersistentProperty> RedisPersistentEntity<T>
public class BasicRedisPersistentEntity<T>
extends org.springframework.data.keyvalue.core.mapping.BasicKeyValuePersistentEntity<T,RedisPersistentProperty>
implements RedisPersistentEntity<T>
RedisPersistentEntity implementation.- Author:
- Christoph Strobl, Mark Paluch
-
Constructor Summary
ConstructorsConstructorDescriptionBasicRedisPersistentEntity(TypeInformation<T> information, org.springframework.data.keyvalue.core.mapping.KeySpaceResolver keySpaceResolver, TimeToLiveAccessor timeToLiveAccessor) Creates newBasicRedisPersistentEntity. -
Method Summary
Modifier and TypeMethodDescriptionGet thePersistentPropertythat is annotated withTimeToLive.Get theTimeToLiveAccessorassociated with the entity.booleanprotected RedisPersistentPropertyMethods inherited from class org.springframework.data.keyvalue.core.mapping.BasicKeyValuePersistentEntity
getKeySpaceMethods inherited from class org.springframework.data.mapping.model.BasicPersistentEntity
addAssociation, addPersistentProperty, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getEvaluationContext, getEvaluationContext, getFallbackIsNewStrategy, getIdentifierAccessor, getIdProperty, getInstanceCreatorMetadata, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPropertyAccessor, getPropertyPathAccessor, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isCreatorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, iterator, requiresPropertyPopulation, setEvaluationContextProvider, setPersistentPropertyAccessorFactory, verifyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.springframework.data.keyvalue.core.mapping.KeyValuePersistentEntity
getKeySpaceMethods inherited from interface org.springframework.data.mapping.model.MutablePersistentEntity
addAssociation, addPersistentProperty, setEvaluationContextProvider, setPersistentPropertyAccessorFactory, verifyMethods inherited from interface org.springframework.data.mapping.PersistentEntity
doWithAll, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getInstanceCreatorMetadata, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getPropertyPathAccessor, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isCreatorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, requiresPropertyPopulationMethods inherited from interface org.springframework.data.redis.core.mapping.RedisPersistentEntity
isExpiring
-
Constructor Details
-
BasicRedisPersistentEntity
public BasicRedisPersistentEntity(TypeInformation<T> information, @Nullable org.springframework.data.keyvalue.core.mapping.KeySpaceResolver keySpaceResolver, TimeToLiveAccessor timeToLiveAccessor) Creates newBasicRedisPersistentEntity.- Parameters:
information- must not be null.keySpaceResolver- can be null.timeToLiveAccessor- can be null.
-
-
Method Details
-
getTimeToLiveAccessor
Description copied from interface:RedisPersistentEntityGet theTimeToLiveAccessorassociated with the entity.- Specified by:
getTimeToLiveAccessorin interfaceRedisPersistentEntity<T>- Returns:
- never null.
-
hasExplictTimeToLiveProperty
public boolean hasExplictTimeToLiveProperty()- Specified by:
hasExplictTimeToLivePropertyin interfaceRedisPersistentEntity<T>- Returns:
- true when a property is annotated with
TimeToLive.
-
getExplicitTimeToLiveProperty
Description copied from interface:RedisPersistentEntityGet thePersistentPropertythat is annotated withTimeToLive.- Specified by:
getExplicitTimeToLivePropertyin interfaceRedisPersistentEntity<T>- Returns:
- can be null.
-
returnPropertyIfBetterIdPropertyCandidateOrNull
@Nullable protected RedisPersistentProperty returnPropertyIfBetterIdPropertyCandidateOrNull(RedisPersistentProperty property) - Overrides:
returnPropertyIfBetterIdPropertyCandidateOrNullin classBasicPersistentEntity<T,RedisPersistentProperty>
-