Examples of RowCallbackHandler


Examples of org.springframework.cassandra.core.RowCallbackHandler

    final String isbn = "999999999";

    final Book b1 = getBook(isbn);

    cqlTemplate.query("select * from book where isbn='" + isbn + "'", new RowCallbackHandler() {

      @Override
      public void processRow(Row row) throws DriverException {

        assertNotNull(row);
View Full Code Here

Examples of org.springframework.cassandra.core.RowCallbackHandler

    ResultSet rs = rsf.getUninterruptibly();

    assertNotNull(rs);

    cqlTemplate.process(rs, new RowCallbackHandler() {

      @Override
      public void processRow(Row row) throws DriverException {

        assertNotNull(row);
View Full Code Here

Examples of org.springframework.cassandra.core.RowCallbackHandler

      @Override
      public BoundStatement bindValues(PreparedStatement ps) throws DriverException {
        return ps.bind(isbn);
      }
    }, new RowCallbackHandler() {

      @Override
      public void processRow(Row row) throws DriverException {

        Book b = rowToBook(row);
View Full Code Here

Examples of org.springframework.cassandra.core.RowCallbackHandler

      @Override
      public PreparedStatement createPreparedStatement(Session session) throws DriverException {
        return session.prepare(cql);
      }
    }, new RowCallbackHandler() {

      @Override
      public void processRow(Row row) throws DriverException {

        rowToBook(row);
View Full Code Here

Examples of org.springframework.cassandra.core.RowCallbackHandler

      @Override
      public BoundStatement bindValues(PreparedStatement ps) throws DriverException {
        return ps.bind(isbn);
      }
    }, new RowCallbackHandler() {

      @Override
      public void processRow(Row row) throws DriverException {
        Book b = rowToBook(row);
        Book b2 = getBook(isbn);
View Full Code Here

Examples of org.springframework.jdbc.core.RowCallbackHandler

        restrictionsTypes = new int[1];
      }
      restrictionsValues[0] = storePath;
      restrictionsTypes[0] = Types.VARCHAR;
      jdbcTemplate.query(sql.toString(), restrictionsValues, restrictionsTypes,
          new RowCallbackHandler() {

            @Override
            public void processRow(ResultSet rs) throws SQLException {
              preferences.put(rs.getString(1), rs.getString(2));
            }
View Full Code Here

Examples of org.springframework.jdbc.core.RowCallbackHandler

    String sql = "select d.path, f.filename, f.modified, f.size from library.file f"
        + " inner join library.directory d on f.directory_id = d.id"
        + " where d.path = ?";
   
    final Set<File> files = new HashSet<>();
    jdbcTemplate.query(sql, new Object[]{directory}, new RowCallbackHandler() {
      @Override
      public void processRow(ResultSet rs) throws SQLException {
        String directory = rs.getString(1);
        String filename = rs.getString(2);
        DateTime modified = new DateTime(rs.getTimestamp(3).getTime());
View Full Code Here

Examples of org.springframework.jdbc.core.RowCallbackHandler

        + " where lt.id in (" + PostgreSQLUtil.getIdParameters(trackIds) + ")";

    final Map<Integer, String> map = new HashMap<>();

    if (!trackIds.isEmpty()) {
      jdbcTemplate.query(sql, new RowCallbackHandler() {
        @Override
        public void processRow(ResultSet rs) throws SQLException {
          String coverArtFile = getFileName(rs.getString(2), rs.getString(3));
          if (coverArtFile == null) {
            coverArtFile = getFileName(rs.getString(4), rs.getString(5));
View Full Code Here

Examples of org.springframework.jdbc.core.RowCallbackHandler

  public Map<String, String> getCorrectedTags() {
    String sql = "select t.tag_name, tc.tag_name from music.tag t"
        + " inner join music.tag tc on t.corrected_id = tc.id";

    final Map<String, String> correctedTags = new HashMap<>();
    jdbcTemplate.query(sql, new RowCallbackHandler() {
      @Override
      public void processRow(ResultSet rs) throws SQLException {
        correctedTags.put(rs.getString(1), rs.getString(2));
      }
    });
View Full Code Here

Examples of org.springframework.jdbc.core.RowCallbackHandler

        + " inner join music.album alb on ai.album_id = alb.id"
        + " where alb.id in (" + getParameters(paths.size()) + ")";

    final Map<Integer, AlbumInfo> albumInfos = new HashMap<>();
    try {
      jdbcTemplate.query(sql, paths.toArray(), new RowCallbackHandler() {
        @Override
        public void processRow(ResultSet rs) throws SQLException {
          AlbumInfo ai = new AlbumInfo();
          String albumName = rs.getString(1);
          ai.setMediumImageUrl(rs.getString(2));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.