|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mahout.cf.taste.impl.common.jdbc.AbstractJDBCComponent
org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel
org.apache.mahout.cf.taste.impl.model.jdbc.AbstractBooleanPrefJDBCDataModel
org.apache.mahout.cf.taste.impl.model.jdbc.SQL92BooleanPrefJDBCDataModel
org.apache.mahout.cf.taste.impl.model.jdbc.PostgreSQLBooleanPrefJDBCDataModel
public class PostgreSQLBooleanPrefJDBCDataModel
See also PostgreSQLJDBCDataModel --
same except deals with a table without preference info:
CREATE TABLE taste_preferences ( user_id BIGINT NOT NULL, item_id BIGINT NOT NULL, PRIMARY KEY (user_id, item_id) ); CREATE INDEX taste_preferences_user_id_index ON taste_preferences (user_id); CREATE INDEX taste_preferences_item_id_index ON taste_preferences (item_id);
PostgreSQLJDBCDataModel,
Serialized Form| Field Summary |
|---|
| Fields inherited from class org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel |
|---|
DEFAULT_ITEM_ID_COLUMN, DEFAULT_PREFERENCE_COLUMN, DEFAULT_PREFERENCE_TABLE, DEFAULT_PREFERENCE_TIME_COLUMN, DEFAULT_USER_ID_COLUMN |
| Fields inherited from class org.apache.mahout.cf.taste.impl.common.jdbc.AbstractJDBCComponent |
|---|
DEFAULT_DATASOURCE_NAME |
| Constructor Summary | |
|---|---|
PostgreSQLBooleanPrefJDBCDataModel()
Creates a using the default DataSource (named
AbstractJDBCComponent.DEFAULT_DATASOURCE_NAME and default table/column names. |
|
PostgreSQLBooleanPrefJDBCDataModel(DataSource dataSource)
Creates a using the given DataSource and default
table/column names. |
|
PostgreSQLBooleanPrefJDBCDataModel(DataSource dataSource,
String preferenceTable,
String userIDColumn,
String itemIDColumn,
String timestampColumn)
Creates a using the given DataSource and default
table/column names. |
|
PostgreSQLBooleanPrefJDBCDataModel(String dataSourceName)
Creates a using the default DataSource found
under the given name, and using default table/column names. |
|
| Method Summary | |
|---|---|
void |
setPreference(long userID,
long itemID,
float value)
Override since PostgreSQL doesn't have the same non-standard capability that MySQL has, to optionally ignore an insert that fails since the row exists already. |
| Methods inherited from class org.apache.mahout.cf.taste.impl.model.jdbc.SQL92BooleanPrefJDBCDataModel |
|---|
getVerifyPreferenceSQL |
| Methods inherited from class org.apache.mahout.cf.taste.impl.model.jdbc.AbstractBooleanPrefJDBCDataModel |
|---|
buildPreference, getMaxPreference, getMinPreference, hasPreferenceValues |
| Methods inherited from class org.apache.mahout.cf.taste.impl.model.jdbc.AbstractJDBCDataModel |
|---|
doGetPreferencesForItem, exportWithIDsOnly, exportWithPrefs, getDataSource, getItemIDColumn, getItemIDs, getItemIDsFromUser, getLongColumn, getNumItems, getNumUsers, getNumUsersWithPreferenceFor, getNumUsersWithPreferenceFor, getPreferenceColumn, getPreferencesForItem, getPreferencesFromUser, getPreferenceTable, getPreferenceTime, getPreferenceValue, getUserIDColumn, getUserIDs, refresh, removePreference, setLongParameter |
| Methods inherited from class org.apache.mahout.cf.taste.impl.common.jdbc.AbstractJDBCComponent |
|---|
checkNotNullAndLog, checkNotNullAndLog, getFetchSize, lookupDataSource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PostgreSQLBooleanPrefJDBCDataModel()
throws TasteException
Creates a using the default DataSource (named
AbstractJDBCComponent.DEFAULT_DATASOURCE_NAME and default table/column names.
TasteException - if DataSource can't be found
public PostgreSQLBooleanPrefJDBCDataModel(String dataSourceName)
throws TasteException
Creates a using the default DataSource found
under the given name, and using default table/column names.
dataSourceName - name of DataSource to look up
TasteException - if DataSource can't be foundpublic PostgreSQLBooleanPrefJDBCDataModel(DataSource dataSource)
Creates a using the given DataSource and default
table/column names.
dataSource - DataSource to use
public PostgreSQLBooleanPrefJDBCDataModel(DataSource dataSource,
String preferenceTable,
String userIDColumn,
String itemIDColumn,
String timestampColumn)
Creates a using the given DataSource and default
table/column names.
dataSource - DataSource to usepreferenceTable - name of table containing preference datauserIDColumn - user ID column nameitemIDColumn - item ID column nametimestampColumn - timestamp column name (may be null)| Method Detail |
|---|
public void setPreference(long userID,
long itemID,
float value)
throws TasteException
setPreference in interface DataModelsetPreference in class SQL92BooleanPrefJDBCDataModelTasteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||