Ejemplo n.º 1
0
  @Override
  public ActionVersionMap getActionVersionMapByActionType(VdcActionType action_type) {
    ActionVersionMap result = cache.get(action_type);
    if (result != null) {
      if (result.isNullValue()) {
        return null;
      }
      return result;
    }
    MapSqlParameterSource parameterSource =
        getCustomMapSqlParameterSource().addValue("action_type", action_type);

    result =
        getCallsHandler()
            .executeRead(
                "Getaction_version_mapByaction_type",
                ActionVersionMapMapper.instance,
                parameterSource);
    if (result == null) {
      cache.putIfAbsent(action_type, nullActionVersionMap);
    } else {
      cache.putIfAbsent(action_type, result);
    }
    result = cache.get(action_type);
    if (result.isNullValue()) {
      return null;
    }
    return result;
  }
Ejemplo n.º 2
0
 @Override
 public ActionVersionMap mapRow(ResultSet rs, int rowNum) throws SQLException {
   ActionVersionMap entity = new ActionVersionMap();
   entity.setActionType(VdcActionType.forValue(rs.getInt("action_type")));
   entity.setClusterMinimalVersion(rs.getString("cluster_minimal_version"));
   entity.setStoragePoolMinimalVersion(rs.getString("storage_pool_minimal_version"));
   return entity;
 }