protected final void mapFields(final S source, final T target, final MappingContext<? super S> mappingContext) throws Exception { for (FieldMapper<S, T> fieldMapper : fieldMappers) { fieldMapper.mapTo(source, target, mappingContext); } }
@Override public void mapTo(S source, O target, MappingContext<? super S> context) throws Exception { for(FieldMapper<S, O> mapper : mappers) { mapper.mapTo(source, target, context); } }
public void mapFrom(S source, MappingContext<? super S> context) throws Exception { for(FieldMapper<S, GenericBuilder<S, T>> fm : genericBuilderFieldMappers) { fm.mapTo(source, this, context); } }
@Override public void mapTo(S source, O target, MappingContext<? super S> context) throws Exception { for(FieldMapper<S, O> mapper : mappers) { mapper.mapTo(source, target, context); } }
public void mapFrom(S source, MappingContext<? super S> context) throws Exception { for(FieldMapper<S, GenericBuilder<S, T>> fm : genericBuilderFieldMappers) { fm.mapTo(source, this, context); } }
protected final void mapFields(final S source, final T target, final MappingContext<? super S> mappingContext) throws Exception { for (FieldMapper<S, T> fieldMapper : fieldMappers) { fieldMapper.mapTo(source, target, mappingContext); } }
@Override protected final void mapToFields(S source, T target, final MappingContext<? super S> mappingContext) throws Exception { for (FieldMapper<S, T> constructorMapper : constructorMappers) { constructorMapper.mapTo(source, target, mappingContext); } mapFields(source, target, mappingContext); }
@Override public UDTValue convert(I in, Context context) throws Exception { if (in == null) return null; UDTValue udtValue = userType.newValue(); mapper.mapTo(in, udtValue, null); return udtValue; } }
@Override public TupleValue convert(I in, Context context) throws Exception { if (in == null) return null; TupleValue tv = tupleType.newValue(); mapper.mapTo(in, tv, null); return tv; } }
@Override public void mapTo(S source, T target, MappingContext<? super S> context) throws Exception { if (predicate.test(source)) { for(FieldMapper fm : targetFieldMappers) { fm.mapTo(source, target, context); } } } });
@Override public void mapTo(S source, T target, MappingContext<? super S> mappingContext) { try { delegate.mapTo(source, target, mappingContext); } catch(Exception e) { errorHandler.errorMappingField(key, source, target, e, mappingContext); } }
@Override public void mapTo(S source, T target, MappingContext<? super S> context) throws Exception { if (predicate.test(source)) { for(FieldMapper fm : targetFieldMappers) { fm.mapTo(source, target, context); } } } });
public BoundStatement mapTo(T object, BoundStatement boundStatement) { try { mapper.mapTo(object, boundStatement, null); } catch (Exception e) { ErrorHelper.rethrow(e); } return boundStatement; }
@Override public void mapTo(S source, T target, MappingContext<? super S> mappingContext) { try { delegate.mapTo(source, target, mappingContext); } catch(Exception e) { errorHandler.errorMappingField(key, source, target, e, mappingContext); } }
@Override protected final void mapToFields(S source, T target, final MappingContext<? super S> mappingContext) throws Exception { for (FieldMapper<S, T> constructorMapper : constructorMappers) { constructorMapper.mapTo(source, target, mappingContext); } mapFields(source, target, mappingContext); }
/** * write the specified value to the underlying appendable. * @param value the value to write * @return the current writer * @throws IOException If an I/O error occurs */ public CsvWriter<T> append(T value) throws IOException { try { mapper.mapTo(value, appendable, mappingContext); } catch(Exception e) { ErrorHelper.rethrow(e); } return this; }
/** * write the specified value to the underlying appendable. * @param value the value to write * @return the current writer * @throws IOException If an I/O error occurs */ public CsvWriter<T> append(T value) throws IOException { try { mapper.mapTo(value, appendable, mappingContext); } catch(Exception e) { ErrorHelper.rethrow(e); } return this; }
@Override public void bindTo(T value, PreparedStatement ps) throws SQLException { try { queryPreparer.mapper().mapTo(value, ps, null); } catch (Exception e) { ErrorHelper.rethrow(e); } } }
@Override public void bindTo(T value, PreparedStatement ps) throws SQLException { try { queryPreparer.mapper().mapTo(value, ps, null); } catch (Exception e) { ErrorHelper.rethrow(e); } } }
@Override public PreparedStatement bind(T value) throws SQLException { PreparedStatement preparedStatement = queryPreparer.prepareStatement(connection); try { queryPreparer.mapper().mapTo(value, preparedStatement, null); return preparedStatement; } catch(Exception t) { try { preparedStatement.close(); } catch(SQLException e) { // IGNORE } ErrorHelper.rethrow(t); return null; } }