Package org.springframework.jdbc.object

Examples of org.springframework.jdbc.object.BatchSqlUpdate.update()


    batchUpdate.declareParameter(new SqlParameter("extraLargeimageurl", Types.VARCHAR));
    batchUpdate.declareParameter(new SqlParameter("listeners", Types.INTEGER));
    batchUpdate.declareParameter(new SqlParameter("playcount", Types.INTEGER));
   
    for (AlbumInfo ai : albumInfos) {
      batchUpdate.update(new Object[]{ai.getAlbum().getArtist().getName(), ai.getAlbum().getName(),
          ai.getSmallImageUrl(), ai.getMediumImageUrl(), ai.getLargeImageUrl(),
          ai.getExtraLargeImageUrl(), ai.getListeners(), ai.getPlayCount()});
    }
    batchUpdate.flush();
  }
View Full Code Here


    batchUpdate.declareParameter(new SqlParameter("artist_name", Types.VARCHAR));
    batchUpdate.declareParameter(new SqlParameter("track_name", Types.VARCHAR));
    batchUpdate.declareParameter(new SqlParameter("play_count", Types.INTEGER));
   
    for (TrackPlayCount tpc : trackPlayCounts) {
      batchUpdate.update(new Object[]{tpc.getTrack().getArtist().getName(),
          tpc.getTrack().getName(), tpc.getPlayCount()});
    }
    batchUpdate.flush();
  }
View Full Code Here

    batchUpdate.declareParameter(new SqlParameter("track_name", Types.VARCHAR));
    batchUpdate.declareParameter(new SqlParameter("rank", Types.SMALLINT));
   
    short rank = 0;
    for (Track t : topTracks) {
      batchUpdate.update(new Object[]{sourceArtistId, t.getName(), ++rank});
    }
    batchUpdate.flush();
  }

  private void updateTopTracks() {
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.