Example usage for org.springframework.data.redis.core HashOperations get

List of usage examples for org.springframework.data.redis.core HashOperations get

Introduction

In this page you can find the example usage for org.springframework.data.redis.core HashOperations get.

Prototype

@Nullable
HV get(H key, Object hashKey);

Source Link

Document

Get value for given hashKey from hash at key .

Usage

From source file:com.easarrive.datasource.redis.etago.AbstractDaoByRedisTemplate.java

public V hashGet(K key, F feild) {
    HashOperations<K, F, V> hashOperations = redisTemplate.opsForHash();
    V object = null;/*  w  w  w. jav  a  2s.  c  o  m*/
    if (hashOperations.hasKey(key, feild)) {
        object = hashOperations.get(key, feild);
    }
    return object;
}

From source file:com.company.project.service.dao.RedisDao.java

public Object getHash(String objectKey, String key) {
    HashOperations opsForHash = redisTemplate.opsForHash();
    return opsForHash.get(objectKey, key);
}