public class BeanUtilsHashMapper<T> extends Object implements HashMapper<T,String,String>, HashObjectReader<String,String>
Constructor and Description |
---|
BeanUtilsHashMapper(Class<T> type)
Create a new
BeanUtilsHashMapper for the given type . |
Modifier and Type | Method and Description |
---|---|
<R> R |
fromHash(Class<R> type,
Map<String,String> hash)
Materialize an object of the
type from a hash . |
T |
fromHash(Map<String,String> hash)
Convert a
hash (map) to an object. |
Map<String,String> |
toHash(T object)
Convert an
object to a map that can be used with Redis hashes. |
public BeanUtilsHashMapper(Class<T> type)
BeanUtilsHashMapper
for the given type
.type
- must not be null.public T fromHash(Map<String,String> hash)
HashMapper
hash
(map) to an object.fromHash
in interface HashMapper<T,String,String>
public <R> R fromHash(Class<R> type, Map<String,String> hash)
HashObjectReader
type
from a hash
.fromHash
in interface HashObjectReader<String,String>
hash
- must not be null.hash
.public Map<String,String> toHash(T object)
HashMapper
object
to a map that can be used with Redis hashes.toHash
in interface HashMapper<T,String,String>
Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.