Class DecoratingStringHashMapper<T>

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

public class DecoratingStringHashMapper<T> extends Object implements HashMapper<T,String,String>
Delegating hash mapper used for flattening objects into Strings. Suitable when dealing with mappers that support Strings and type conversion.
Author:
Costin Leau
  • Constructor Details

    • DecoratingStringHashMapper

      public DecoratingStringHashMapper(HashMapper<T,?,?> mapper)
  • Method Details

    • fromHash

      public @Nullable T fromHash(Map hash)
      Description copied from interface: HashMapper
      Convert a hash (map) to an object.
      Specified by:
      fromHash in interface HashMapper<T,String,String>
      Parameters:
      hash -
      Returns:
    • toHash

      public @Nullable Map<String,String> toHash(@Nullable T object)
      Description copied from interface: HashMapper
      Convert an object to a map that can be used with Redis hashes.
      Specified by:
      toHash in interface HashMapper<T,String,String>
      Parameters:
      object -
      Returns: