Package br.net.woodstock.rockframework.core.jdbc

Examples of br.net.woodstock.rockframework.core.jdbc.Client


  }

  @Override
  public <T> T getSingle(final JDBCFilter filter, final JDBCMapper<T> mapper) {
    try {
      Client client = new CommonCallableClient(this.getConnection());
      ResultSet rs = client.executeQuery(filter.getFilter(), this.toParameterList(filter.getParameters()));
      if (rs.next()) {
        return mapper.map(rs);
      }
      return null;
    } catch (SQLException e) {
View Full Code Here


  }

  @Override
  public <T> Collection<T> getCollection(final JDBCFilter filter, final JDBCMapper<T> mapper) {
    try {
      Client client = new CommonCallableClient(this.getConnection());
      ResultSet rs = client.executeQuery(filter.getFilter(), this.toParameterList(filter.getParameters()));
      List<T> list = new LinkedList<T>();
      while (rs.next()) {
        list.add(mapper.map(rs));
      }
      return list;
View Full Code Here

  }

  @Override
  public int executeUpdate(final JDBCFilter filter) {
    try {
      Client client = new CommonCallableClient(this.getConnection());
      int i = client.executeUpdate(filter.getFilter(), this.toParameterList(filter.getParameters()));
      return i;
    } catch (SQLException e) {
      throw new PersistenceException(e);
    }
  }
View Full Code Here

TOP

Related Classes of br.net.woodstock.rockframework.core.jdbc.Client

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.