You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by sr...@apache.org on 2009/07/30 11:07:22 UTC

svn commit: r799212 - /lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/jdbc/AbstractJDBCDiffStorage.java

Author: srowen
Date: Thu Jul 30 09:07:22 2009
New Revision: 799212

URL: http://svn.apache.org/viewvc?rev=799212&view=rev
Log:
Oops, fix change missed in MAHOUT-150 -- need to use getObject()

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/jdbc/AbstractJDBCDiffStorage.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/jdbc/AbstractJDBCDiffStorage.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/jdbc/AbstractJDBCDiffStorage.java?rev=799212&r1=799211&r2=799212&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/jdbc/AbstractJDBCDiffStorage.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/jdbc/AbstractJDBCDiffStorage.java Thu Jul 30 09:07:22 2009
@@ -56,7 +56,6 @@
   public static final String DEFAULT_COUNT_COLUMN = "count";
   public static final String DEFAULT_AVERAGE_DIFF_COLUMN = "average_diff";
 
-  private final JDBCDataModel dataModel;
   private final DataSource dataSource;
   private final String getDiffSQL;
   private final String getDiffsSQL;
@@ -96,7 +95,6 @@
     if (minDiffCount < 0) {
       throw new IllegalArgumentException("minDiffCount is not positive");
     }
-    this.dataModel = dataModel;
     this.dataSource = dataModel.getDataSource();
     this.getDiffSQL = getDiffSQL;
     this.getDiffsSQL = getDiffsSQL;
@@ -171,7 +169,7 @@
       // with nulls for Preferences that have no corresponding result row
       int i = 0;
       while (rs.next()) {
-        String nextResultItemID = rs.getString(3);
+        Comparable<?> nextResultItemID = (Comparable<?>) rs.getObject(3);
         while (!prefs[i].getItemID().equals(nextResultItemID)) {
           i++;
           // result[i] is null for these values of i