org.springframework.data.redis.hash
Class JacksonHashMapper<T>

java.lang.Object
  extended by org.springframework.data.redis.hash.JacksonHashMapper<T>
All Implemented Interfaces:
HashMapper<T,String,Object>

public class JacksonHashMapper<T>
extends Object
implements HashMapper<T,String,Object>

Mapper based on Jackson library. Supports nested properties (rich objects).


Constructor Summary
JacksonHashMapper(Class<T> type)
           
JacksonHashMapper(Class<T> type, ObjectMapper mapper)
           
 
Method Summary
 T fromHash(Map<String,Object> hash)
           
 Map<String,Object> toHash(T object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JacksonHashMapper

public JacksonHashMapper(Class<T> type)

JacksonHashMapper

public JacksonHashMapper(Class<T> type,
                         ObjectMapper mapper)
Method Detail

fromHash

public T fromHash(Map<String,Object> hash)
Specified by:
fromHash in interface HashMapper<T,String,Object>

toHash

public Map<String,Object> toHash(T object)
Specified by:
toHash in interface HashMapper<T,String,Object>