Java Code Examples for org.apache.ibatis.cache.CacheKey#NULL_CACHE_KEY

The following examples show how to use org.apache.ibatis.cache.CacheKey#NULL_CACHE_KEY . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultResultSetHandler.java    From mybaties with Apache License 2.0 5 votes vote down vote up
private CacheKey combineKeys(CacheKey rowKey, CacheKey parentRowKey) {
  if (rowKey.getUpdateCount() > 1 && parentRowKey.getUpdateCount() > 1) {
    CacheKey combinedKey;
    try {
      combinedKey = rowKey.clone();
    } catch (CloneNotSupportedException e) {
      throw new ExecutorException("Error cloning cache key.  Cause: " + e, e);
    }
    combinedKey.update(parentRowKey);
    return combinedKey;
  }
  return CacheKey.NULL_CACHE_KEY;
}
 
Example 2
Source File: DefaultResultSetHandler.java    From mybatis with Apache License 2.0 5 votes vote down vote up
private CacheKey combineKeys(CacheKey rowKey, CacheKey parentRowKey) {
  if (rowKey.getUpdateCount() > 1 && parentRowKey.getUpdateCount() > 1) {
    CacheKey combinedKey;
    try {
      combinedKey = rowKey.clone();
    } catch (CloneNotSupportedException e) {
      throw new ExecutorException("Error cloning cache key.  Cause: " + e, e);
    }
    combinedKey.update(parentRowKey);
    return combinedKey;
  }
  return CacheKey.NULL_CACHE_KEY;
}