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> org.springframework.data.mapping.model.MutablePersistentEntity<T,
,RedisPersistentProperty> org.springframework.data.mapping.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
(org.springframework.data.util.TypeInformation<T> information, org.springframework.data.keyvalue.core.mapping.KeySpaceResolver fallbackKeySpaceResolver, TimeToLiveAccessor timeToLiveAccessor) Creates newBasicRedisPersistentEntity
. -
Method Summary
Modifier and TypeMethodDescriptionGet thePersistentProperty
that is annotated withTimeToLive
.Get theTimeToLiveAccessor
associated with the entity.boolean
protected RedisPersistentProperty
Methods inherited from class org.springframework.data.keyvalue.core.mapping.BasicKeyValuePersistentEntity
getKeySpace
Methods 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, verify
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.springframework.data.keyvalue.core.mapping.KeyValuePersistentEntity
getKeySpace
Methods inherited from interface org.springframework.data.mapping.model.MutablePersistentEntity
addAssociation, addPersistentProperty, setEvaluationContextProvider, setPersistentPropertyAccessorFactory, verify
Methods 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, requiresPropertyPopulation
Methods inherited from interface org.springframework.data.redis.core.mapping.RedisPersistentEntity
isExpiring
-
Constructor Details
-
BasicRedisPersistentEntity
public BasicRedisPersistentEntity(org.springframework.data.util.TypeInformation<T> information, @Nullable org.springframework.data.keyvalue.core.mapping.KeySpaceResolver fallbackKeySpaceResolver, TimeToLiveAccessor timeToLiveAccessor) Creates newBasicRedisPersistentEntity
.- Parameters:
information
- must not be null.fallbackKeySpaceResolver
- can be null.timeToLiveAccessor
- can be null.
-
-
Method Details
-
getTimeToLiveAccessor
Description copied from interface:RedisPersistentEntity
Get theTimeToLiveAccessor
associated with the entity.- Specified by:
getTimeToLiveAccessor
in interfaceRedisPersistentEntity<T>
- Returns:
- never null.
-
hasExplictTimeToLiveProperty
public boolean hasExplictTimeToLiveProperty()- Specified by:
hasExplictTimeToLiveProperty
in interfaceRedisPersistentEntity<T>
- Returns:
- true when a property is annotated with
TimeToLive
.
-
getExplicitTimeToLiveProperty
Description copied from interface:RedisPersistentEntity
Get thePersistentProperty
that is annotated withTimeToLive
.- Specified by:
getExplicitTimeToLiveProperty
in interfaceRedisPersistentEntity<T>
- Returns:
- can be null.
-
returnPropertyIfBetterIdPropertyCandidateOrNull
@Nullable protected RedisPersistentProperty returnPropertyIfBetterIdPropertyCandidateOrNull(RedisPersistentProperty property) - Overrides:
returnPropertyIfBetterIdPropertyCandidateOrNull
in classorg.springframework.data.mapping.model.BasicPersistentEntity<T,
RedisPersistentProperty>
-