DATAREDIS-1179 - Polishing.
Reorder methods. Make MappingRedisConverter(RedisMappingContext) public. Tweak docs wording. Original pull request: #548.
This commit is contained in:
@@ -129,8 +129,9 @@ public class MappingRedisConverter implements RedisConverter, InitializingBean {
|
||||
* Creates new {@link MappingRedisConverter}.
|
||||
*
|
||||
* @param context can be {@literal null}.
|
||||
* @since 2.4
|
||||
*/
|
||||
MappingRedisConverter(RedisMappingContext context) {
|
||||
public MappingRedisConverter(RedisMappingContext context) {
|
||||
this(context, null, null, null);
|
||||
}
|
||||
|
||||
|
||||
@@ -80,6 +80,19 @@ public class ObjectHashMapper implements HashMapper<Object, byte[], byte[]> {
|
||||
this(new RedisCustomConversions());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@link ObjectHashMapper} using the given {@link RedisConverter} for conversion.
|
||||
*
|
||||
* @param converter must not be {@literal null}.
|
||||
* @throws IllegalArgumentException if the given {@literal converter} is {@literal null}.
|
||||
* @since 2.4
|
||||
*/
|
||||
public ObjectHashMapper(RedisConverter converter) {
|
||||
|
||||
Assert.notNull(converter, "Converter must not be null!");
|
||||
this.converter = converter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new {@link ObjectHashMapper}.
|
||||
*
|
||||
@@ -107,19 +120,6 @@ public class ObjectHashMapper implements HashMapper<Object, byte[], byte[]> {
|
||||
converter = mappingConverter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@link ObjectHashMapper} using the given {@link RedisConverter} for conversion.
|
||||
*
|
||||
* @param converter must not be {@literal null}.
|
||||
* @throws IllegalArgumentException if the given {@literal converter} is {@literal null}.
|
||||
* @since 2.4
|
||||
*/
|
||||
public ObjectHashMapper(RedisConverter converter) {
|
||||
|
||||
Assert.notNull(converter, "Converter must not be null!");
|
||||
this.converter = converter;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.redis.hash.HashMapper#toHash(java.lang.Object)
|
||||
|
||||
Reference in New Issue
Block a user