Exemplo n.º 1
0
 @SuppressWarnings({"rawtypes"})
 public String getPlaceholder(FieldType fieldType) {
   DataTypeForKv dataType = dataTypeProvider.getDataType(fieldType);
   KvValueConverter valueConverter = dataType.getKvValueConverter();
   SqlBinding sqlBinding = valueConverter.getSqlBinding();
   return sqlBinding.getPlaceholder();
 }
Exemplo n.º 2
0
 @SuppressWarnings({"rawtypes"})
 public Object getResultSetValue(FieldType fieldType, ResultSet resultSet, int index)
     throws SQLException {
   DataTypeForKv dataType = dataTypeProvider.getDataType(fieldType);
   KvValueConverter valueConverter = dataType.getKvValueConverter();
   SqlBinding sqlBinding = valueConverter.getSqlBinding();
   return sqlBinding.get(resultSet, index);
 }
Exemplo n.º 3
0
 @SuppressWarnings({"rawtypes", "unchecked"})
 public void setPreparedStatementValue(
     PreparedStatement preparedStatement,
     int parameterIndex,
     FieldType fieldType,
     KvValue<?> value)
     throws SQLException {
   DataTypeForKv dataType = dataTypeProvider.getDataType(fieldType);
   KvValueConverter valueConverter = dataType.getKvValueConverter();
   Converter converter = dataType.getConverter();
   SqlBinding sqlBinding = valueConverter.getSqlBinding();
   sqlBinding.set(preparedStatement, parameterIndex, converter.to(value));
 }