@Override
  public void setValues(PreparedStatement ps, int i) throws SQLException {
    Object param = batchParams[i];

    StatementCreatorUtils.setParameterValue(
        ps, 1, SqlTypeValue.TYPE_UNKNOWN, Jsr310JdbcUtils.convertIfNecessary(param, zoneId));
  }
Ejemplo n.º 2
0
  /** {@inheritDoc} */
  @Override
  public Object getValue(String paramName) {
    Object value = null;
    if (privateFields.contains(paramName)) {
      value = beanWrapper.getPropertyValue(paramName);
    } else if (publicFeilds.containsKey(paramName)) {
      Field field = publicFeilds.get(paramName);
      try {
        value = field.get(entity);
      } catch (IllegalAccessException e) {
        throw new IllegalArgumentException(e);
      }
    }

    if (value == null) {
      return null;
    }

    return Jsr310JdbcUtils.convertIfNecessary(value, zoneId);
  }