mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r747129 - in /lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl: model/jdbc/AbstractJDBCDataModel.java model/jdbc/MySQLJDBCDataModel.java recommender/slopeone/jdbc/MySQLJDBCDiffStorage.java
Date Mon, 23 Feb 2009 20:36:33 GMT
Author: srowen
Date: Mon Feb 23 20:36:31 2009
New Revision: 747129

URL: http://svn.apache.org/viewvc?rev=747129&view=rev
Log:
MAHOUT-107: make some stuff non-final to allow extension

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/MySQLJDBCDataModel.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/jdbc/MySQLJDBCDiffStorage.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java?rev=747129&r1=747128&r2=747129&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java
Mon Feb 23 20:36:31 2009
@@ -244,7 +244,7 @@
   }
 
   @Override
-  public final Iterable<? extends User> getUsers() throws TasteException {
+  public Iterable<? extends User> getUsers() throws TasteException {
     log.debug("Retrieving all users...");
     return new IteratorIterable<User>(new ResultSetUserIterator(dataSource, getUsersSQL));
   }
@@ -253,7 +253,7 @@
    * @throws NoSuchUserException if there is no such user
    */
   @Override
-  public final User getUser(Object id) throws TasteException {
+  public User getUser(Object id) throws TasteException {
 
     log.debug("Retrieving user ID '{}'", id);
 
@@ -292,18 +292,18 @@
   }
 
   @Override
-  public final Iterable<? extends Item> getItems() throws TasteException {
+  public Iterable<? extends Item> getItems() throws TasteException {
     log.debug("Retrieving all items...");
     return new IteratorIterable<Item>(new ResultSetItemIterator(dataSource, getItemsSQL));
   }
 
   @Override
-  public final Item getItem(Object id) throws TasteException {
+  public Item getItem(Object id) throws TasteException {
     return getItem(id, false);
   }
 
   @Override
-  public final Item getItem(Object id, boolean assumeExists) throws TasteException {
+  public Item getItem(Object id, boolean assumeExists) throws TasteException {
 
     if (assumeExists) {
       return buildItem((String) id);
@@ -336,12 +336,12 @@
   }
 
   @Override
-  public final Iterable<? extends Preference> getPreferencesForItem(Object itemID)
throws TasteException {
+  public Iterable<? extends Preference> getPreferencesForItem(Object itemID) throws
TasteException {
     return doGetPreferencesForItem(itemID);
   }
 
   @Override
-  public final Preference[] getPreferencesForItemAsArray(Object itemID) throws TasteException
{
+  public Preference[] getPreferencesForItemAsArray(Object itemID) throws TasteException {
     List<? extends Preference> list = doGetPreferencesForItem(itemID);
     return list.toArray(new Preference[list.size()]);
   }
@@ -376,17 +376,17 @@
   }
 
   @Override
-  public final int getNumItems() throws TasteException {
+  public int getNumItems() throws TasteException {
     return getNumThings("items", getNumItemsSQL);
   }
 
   @Override
-  public final int getNumUsers() throws TasteException {
+  public int getNumUsers() throws TasteException {
     return getNumThings("users", getNumUsersSQL);
   }
 
   @Override
-  public final int getNumUsersWithPreferenceFor(Object... itemIDs) throws TasteException
{
+  public int getNumUsersWithPreferenceFor(Object... itemIDs) throws TasteException {
     if (itemIDs == null) {
       throw new IllegalArgumentException("itemIDs is null");
     }
@@ -428,7 +428,7 @@
   }
 
   @Override
-  public final void setPreference(Object userID, Object itemID, double value)
+  public void setPreference(Object userID, Object itemID, double value)
           throws TasteException {
     if (userID == null || itemID == null) {
       throw new IllegalArgumentException("userID or itemID is null");
@@ -465,7 +465,7 @@
   }
 
   @Override
-  public final void removePreference(Object userID, Object itemID)
+  public void removePreference(Object userID, Object itemID)
           throws TasteException {
     if (userID == null || itemID == null) {
       throw new IllegalArgumentException("userID or itemID is null");
@@ -495,7 +495,7 @@
   }
 
   @Override
-  public final void refresh(Collection<Refreshable> alreadyRefreshed) {
+  public void refresh(Collection<Refreshable> alreadyRefreshed) {
     // do nothing
   }
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/MySQLJDBCDataModel.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/MySQLJDBCDataModel.java?rev=747129&r1=747128&r2=747129&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/MySQLJDBCDataModel.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/MySQLJDBCDataModel.java
Mon Feb 23 20:36:31 2009
@@ -76,7 +76,7 @@
  *
  * <p>Thanks to Amila Jayasooriya for contributing MySQL notes above as part of Google
Summer of Code 2007.</p>
  */
-public final class MySQLJDBCDataModel extends AbstractJDBCDataModel {
+public class MySQLJDBCDataModel extends AbstractJDBCDataModel {
 
   /**
    * <p>Creates a {@link MySQLJDBCDataModel} using the default {@link DataSource}

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/jdbc/MySQLJDBCDiffStorage.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/jdbc/MySQLJDBCDiffStorage.java?rev=747129&r1=747128&r2=747129&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/jdbc/MySQLJDBCDiffStorage.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/jdbc/MySQLJDBCDiffStorage.java
Mon Feb 23 20:36:31 2009
@@ -19,6 +19,7 @@
 
 import org.apache.mahout.cf.taste.common.TasteException;
 import org.apache.mahout.cf.taste.impl.model.jdbc.MySQLJDBCDataModel;
+import org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel;
 
 /**
  * <p>MySQL-specific implementation. Should be used in conjunction with a
@@ -55,7 +56,7 @@
 
   private static final int DEFAULT_MIN_DIFF_COUNT = 2;
 
-  public MySQLJDBCDiffStorage(MySQLJDBCDataModel dataModel) throws TasteException {
+  public MySQLJDBCDiffStorage(AbstractJDBCDataModel dataModel) throws TasteException {
     this(dataModel,
          DEFAULT_DIFF_TABLE,
          DEFAULT_ITEM_A_COLUMN,
@@ -65,7 +66,7 @@
          DEFAULT_MIN_DIFF_COUNT);
   }
 
-  public MySQLJDBCDiffStorage(MySQLJDBCDataModel dataModel,
+  public MySQLJDBCDiffStorage(AbstractJDBCDataModel dataModel,
                               String diffsTable,
                               String itemIDAColumn,
                               String itemIDBColumn,



Mime
View raw message