org.apache.mahout.cf.taste.ejb
Class RecommenderEJBBean

java.lang.Object
  extended by org.apache.mahout.cf.taste.ejb.RecommenderEJBBean
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class RecommenderEJBBean
extends java.lang.Object
implements javax.ejb.SessionBean

Recommender EJB bean implementation.

This class exposes a subset of the Recommender API. In particular it does not support Recommender.getDataModel() since it doesn't make sense to access this via an EJB component.

See Also:
Serialized Form

Constructor Summary
RecommenderEJBBean()
           
 
Method Summary
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 double estimatePreference(long userID, long itemID)
           
 java.util.List<RecommendedItem> recommend(long userID, int howMany)
           
 java.util.List<RecommendedItem> recommend(long userID, int howMany, IDRescorer rescorer)
           
 void refresh(java.util.Collection<Refreshable> alreadyRefreshed)
           
 void removePreference(long userID, long itemID)
           
 void setPreference(long userID, long itemID, float value)
           
 void setSessionContext(javax.ejb.SessionContext sessionContext)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RecommenderEJBBean

public RecommenderEJBBean()
Method Detail

recommend

public java.util.List<RecommendedItem> recommend(long userID,
                                                 int howMany)
                                          throws TasteException
Throws:
TasteException

recommend

public java.util.List<RecommendedItem> recommend(long userID,
                                                 int howMany,
                                                 IDRescorer rescorer)
                                          throws TasteException
Throws:
TasteException

estimatePreference

public double estimatePreference(long userID,
                                 long itemID)
                          throws TasteException
Throws:
TasteException

setPreference

public void setPreference(long userID,
                          long itemID,
                          float value)
                   throws TasteException
Throws:
TasteException

removePreference

public void removePreference(long userID,
                             long itemID)
                      throws TasteException
Throws:
TasteException

refresh

public void refresh(java.util.Collection<Refreshable> alreadyRefreshed)

setSessionContext

public void setSessionContext(javax.ejb.SessionContext sessionContext)
Specified by:
setSessionContext in interface javax.ejb.SessionBean

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

ejbRemove

public void ejbRemove()
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.