public class DefaultRedisTypeMapper extends DefaultTypeMapper<Bucket.BucketPropertyPath> implements RedisTypeMapper
RedisTypeMapper allowing configuration of the key to lookup and store type
information via Bucket.BucketPropertyPath in buckets. The key defaults to DEFAULT_TYPE_KEY. Actual
type-to-byte[] conversion and back is done in BucketTypeAliasAccessor.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_TYPE_KEY |
| Constructor and Description |
|---|
DefaultRedisTypeMapper()
Create a new
DefaultRedisTypeMapper using DEFAULT_TYPE_KEY to exchange type hints. |
DefaultRedisTypeMapper(String typeKey)
Create a new
DefaultRedisTypeMapper given typeKey to exchange type hints. |
DefaultRedisTypeMapper(String typeKey,
List<? extends TypeInformationMapper> mappers)
Create a new
DefaultRedisTypeMapper given typeKey to exchange type hints and List of
TypeInformationMapper. |
DefaultRedisTypeMapper(String typeKey,
MappingContext<? extends PersistentEntity<?,?>,?> mappingContext)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isTypeKey(String key)
Returns whether the given
key is the type key. |
getAliasFor, getFallbackTypeFor, readType, readType, writeType, writeTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadType, readType, writeType, writeTypepublic static final String DEFAULT_TYPE_KEY
public DefaultRedisTypeMapper()
DefaultRedisTypeMapper using DEFAULT_TYPE_KEY to exchange type hints.public DefaultRedisTypeMapper(@Nullable String typeKey)
DefaultRedisTypeMapper given typeKey to exchange type hints. Does not consider type
hints if typeKey is null.typeKey - the type key can be null to skip type hinting.public DefaultRedisTypeMapper(@Nullable String typeKey, MappingContext<? extends PersistentEntity<?,?>,?> mappingContext)
DefaultRedisTypeMapper given typeKey to exchange type hints and
MappingContext. Does not consider type hints if typeKey is null. MappingContext
is used to obtain entity-based aliasestypeKey - the type key can be null to skip type hinting.mappingContext - must not be null.TypeAliaspublic DefaultRedisTypeMapper(@Nullable String typeKey, List<? extends TypeInformationMapper> mappers)
DefaultRedisTypeMapper given typeKey to exchange type hints and List of
TypeInformationMapper. Does not consider type hints if typeKey is null.
MappingContext is used to obtain entity-based aliasestypeKey - the type key can be null to skip type hinting.mappers - must not be null.public boolean isTypeKey(@Nullable String key)
RedisTypeMapperkey is the type key.isTypeKey in interface RedisTypeMapperkey is the type key.Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.