Examples of NoSuchUserException


Examples of org.apache.mahout.cf.taste.common.NoSuchUserException

 
  @Override
  public void removePreference(long userID, long itemID) throws TasteException {
    if (userID == TEMP_USER_ID) {
      if (tempPrefs == null) {
        throw new NoSuchUserException();
      }
      throw new UnsupportedOperationException();
    }
    delegate.removePreference(userID, itemID);
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchUserException

   */
  @Override
  public PreferenceArray getPreferencesFromUser(long userID) throws NoSuchUserException {
    PreferenceArray prefs = preferenceFromUsers.get(userID);
    if (prefs == null) {
      throw new NoSuchUserException();
    }
    return prefs;
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchUserException

    if (timestamps == null) {
      return null;
    }
    FastByIDMap<Long> itemTimestamps = timestamps.get(userID);
    if (itemTimestamps == null) {
      throw new NoSuchUserException();
    }
    return itemTimestamps.get(itemID);
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchUserException

      while (rs.next()) {
        prefs.add(buildPreference(rs));
      }

      if (prefs.isEmpty()) {
        throw new NoSuchUserException();
      }

      return new GenericUserPreferenceArray(prefs);

    } catch (SQLException sqle) {
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchUserException

      while (rs.next()) {
        result.add(getLongColumn(rs, 2));
      }

      if (result.isEmpty()) {
        throw new NoSuchUserException();
      }

      return result;

    } catch (SQLException sqle) {
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchUserException

 
  @Override
  public float estimatePreference(long userID, long itemID) throws TasteException {
    Integer useridx = userMap.get(userID);
    if (useridx == null) {
      throw new NoSuchUserException();
    }
    Integer itemidx = itemMap.get(itemID);
    if (itemidx == null) {
      throw new NoSuchItemException();
    }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchUserException

  @Override
  public User getUser(Object id) throws NoSuchUserException {
    User user = userMap.get(id);
    if (user == null) {
      throw new NoSuchUserException();
    }
    return user;
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchUserException

   */
  @Override
  public User getUser(Object id) throws NoSuchUserException {
    User user = userMap.get(id);
    if (user == null) {
      throw new NoSuchUserException();
    }
    return user;
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchUserException

      while (rs.next()) {
        addPreference(rs, prefs);
      }

      if (prefs.isEmpty()) {
        throw new NoSuchUserException();
      }

      return buildUser(idString, prefs);

    } catch (SQLException sqle) {
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchUserException

  }

  public double[] getUserFeatures(long userID) throws NoSuchUserException {
    Integer index = userIDMapping.get(userID);
    if (index == null) {
      throw new NoSuchUserException(userID);
    }
    return userFeatures[index];
  }
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.