public void rateItem(Integer tenant, Integer user, String sessionId, String ip, ItemVO<Integer, String> item, Integer ratingValue, String description) { typedActionDAO.insertAction( new ActionVO<Integer, String>(tenant, user, sessionId, ip, item, TypeMappingService.ACTION_TYPE_RATE, ratingValue, null, null, description), false); }
public void insertAction(Integer tenant, Integer user, String sessionId, String ip, ItemVO<Integer, String> item, String actionType, Integer actionValue, String description) { typedActionDAO.insertAction( new ActionVO<Integer, String>(tenant, user, sessionId, ip, item, actionType, actionValue, null, null, description), false); }
public void purchaseItem(Integer tenant, Integer user, String sessionId, String ip, ItemVO<Integer, String> item, String description, Date actionTime) { typedActionDAO.insertAction( new ActionVO<Integer, String>(tenant, user, sessionId, ip, item, TypeMappingService.ACTION_TYPE_BUY, null, null, null, description, actionTime), true); }
public void viewItem(Integer tenant, Integer user, String sessionId, String ip, ItemVO<Integer, String> item, String description) { typedActionDAO.insertAction( new ActionVO<Integer, String>(tenant, user, sessionId, ip, item, TypeMappingService.ACTION_TYPE_VIEW, null, null, null, description), false); }
public void searchItem(Integer tenant, Integer user, String sessionId, String ip, ItemVO<Integer, String> item, Boolean searchSucceeded, Integer numberOfFoundItems, String description) { typedActionDAO.insertAction( new ActionVO<Integer, String>(tenant, user, sessionId, ip, item, TypeMappingService.ACTION_TYPE_SEARCH, null, searchSucceeded, numberOfFoundItems, description), false); }
public void searchItem(Integer tenant, Integer user, String sessionId, String ip, ItemVO<Integer, String> item, Boolean searchSucceeded, Integer numberOfFoundItems, String description, Date actionTime) { typedActionDAO.insertAction( new ActionVO<Integer, String>(tenant, user, sessionId, ip, item, TypeMappingService.ACTION_TYPE_SEARCH, null, searchSucceeded, numberOfFoundItems, description, actionTime), true); }
public void rateItem(Integer tenant, Integer user, String sessionId, String ip, ItemVO<Integer, String> item, Integer ratingValue, String description, Date actionTime) { typedActionDAO.insertAction( new ActionVO<Integer, String>(tenant, user, sessionId, ip, item, TypeMappingService.ACTION_TYPE_RATE, ratingValue, null, null, description, actionTime), true); }
public void insertAction(Integer tenant, Integer user, String sessionId, String ip, ItemVO<Integer, String> item, String actionType, Integer actionValue, String description, Date actionTime) { typedActionDAO.insertAction( new ActionVO<Integer, String>(tenant, user, sessionId, ip, item, actionType, actionValue, null, null, description, actionTime), true); }
public void purchaseItem(Integer tenant, Integer user, String sessionId, String ip, ItemVO<Integer, String> item, String description) { typedActionDAO.insertAction( new ActionVO<Integer, String>(tenant, user, sessionId, ip, item, TypeMappingService.ACTION_TYPE_BUY, null, null, null, description), false); }
public void viewItem(Integer tenant, Integer user, String sessionId, String ip, ItemVO<Integer, String> item, String description, Date actionTime) { typedActionDAO.insertAction( new ActionVO<Integer, String>(tenant, user, sessionId, ip, item, TypeMappingService.ACTION_TYPE_VIEW, null, null, null, description, actionTime), true); }
public void previewTrack(Integer tenant, Integer user, String sessionId, String ip, Integer trackId, String description) { insertAction(new ActionVO<Integer, String>(tenant, user, sessionId, ip, new ItemVO<Integer, String>(tenant, trackId, TypeMappingService.ITEM_TYPE_TRACK), TypeMappingService.ACTION_TYPE_PREVIEW, null, null, null, description)); }
public void addTrackToPlaylist(Integer tenant, Integer user, String sessionId, String ip, Integer trackId, String description) { insertAction(new ActionVO<Integer, String>(tenant, user, sessionId, ip, new ItemVO<Integer, String>(tenant, trackId, TypeMappingService.ITEM_TYPE_TRACK), TypeMappingService.ACTION_TYPE_ADD_TO_PLAYLIST, null, null, null, description)); }
action = new ActionVO<Integer, Integer>(null, null, null, null, new ItemVO<Integer, Integer>(null, null, null), null, null, null, null, null);
@Override public ActionVO<Integer, String> convertActionVO(Integer tenantId, ActionVO<Integer, Integer> action) { if (action == null) { return null; } return new ActionVO<Integer, String>( action.getId(), action.getTenant(), action.getUser(), action.getSessionId(), action.getIp(), convertItemVO(tenantId, action.getItem()), actionTypeDAO.getTypeById(tenantId, action.getActionType()), action.getRatingValue(), action.getSearchSucceeded(), action.getNumberOfFoundItems(), action.getDescription(), action.getActionTime()); }
@Override public ActionVO<Integer, Integer> convertTypedActionVO(Integer tenantId, ActionVO<Integer, String> typedAction) { if (typedAction == null) { return null; } return new ActionVO<Integer, Integer>( typedAction.getId(), typedAction.getTenant(), typedAction.getUser(), typedAction.getSessionId(), typedAction.getIp(), convertTypedItemVO(tenantId, typedAction.getItem()), actionTypeDAO.getIdOfType(tenantId, typedAction.getActionType()), typedAction.getRatingValue(), typedAction.getSearchSucceeded(), typedAction.getNumberOfFoundItems(), typedAction.getDescription(), typedAction.getActionTime()); }
public ActionVO<Integer, Integer> mapRow(ResultSet rs, int rowNum) throws SQLException { ActionVO<Integer, Integer> actionVO = new ActionVO<Integer, Integer>( DaoUtils.getInteger(rs, DEFAULT_ID_COLUMN_NAME), DaoUtils.getInteger(rs, DEFAULT_TENANT_COLUMN_NAME), DaoUtils.getInteger(rs, DEFAULT_USER_COLUMN_NAME), DaoUtils.getStringIfPresent(rs, DEFAULT_SESSION_COLUMN_NAME), DaoUtils.getStringIfPresent(rs, DEFAULT_IP_COLUMN_NAME), new ItemVO<Integer, Integer>(DaoUtils.getInteger(rs, DEFAULT_TENANT_COLUMN_NAME), DaoUtils.getInteger(rs, DEFAULT_ITEM_COLUMN_NAME), DaoUtils.getInteger(rs, DEFAULT_ITEM_TYPE_COLUMN_NAME)), DaoUtils.getInteger(rs, DEFAULT_ACTION_TYPE_COLUMN_NAME), DaoUtils.getInteger(rs, DEFAULT_RATING_VALUE_COLUMN_NAME), DaoUtils.getBoolean(rs, DEFAULT_SEARCH_SUCCEEDED_COLUMN_NAME), DaoUtils.getInteger(rs, DEFAULT_NUMBER_OF_FOUND_ITEMS), DaoUtils.getStringIfPresent(rs, DEFAULT_DESCRIPTION_COLUMN_NAME), DaoUtils.getDate(rs, DEFAULT_ACTION_TIME_COLUMN_NAME)); return actionVO; } }
public ActionVO<Integer, String> mapRow(ResultSet rs, int rowNum) throws SQLException { Integer tenantId = DaoUtils.getInteger(rs, DEFAULT_TENANT_COLUMN_NAME); return new ActionVO<Integer, String>( DaoUtils.getInteger(rs, DEFAULT_ID_COLUMN_NAME), tenantId, DaoUtils.getInteger(rs, DEFAULT_USER_COLUMN_NAME), DaoUtils.getStringIfPresent(rs, DEFAULT_SESSION_COLUMN_NAME), DaoUtils.getStringIfPresent(rs, DEFAULT_IP_COLUMN_NAME), new ItemVO<Integer, String>(DaoUtils.getInteger(rs, DEFAULT_TENANT_COLUMN_NAME), DaoUtils.getInteger(rs, DEFAULT_ITEM_COLUMN_NAME), typeMappingService .getItemTypeById(tenantId, DaoUtils.getInteger(rs, DEFAULT_ITEM_TYPE_COLUMN_NAME))), typeMappingService .getActionTypeById(tenantId, DaoUtils.getInteger(rs, DEFAULT_ACTION_TYPE_COLUMN_NAME)), DaoUtils.getInteger(rs, DEFAULT_RATING_VALUE_COLUMN_NAME), DaoUtils.getBoolean(rs, DEFAULT_SEARCH_SUCCEEDED_COLUMN_NAME), DaoUtils.getInteger(rs, DEFAULT_NUMBER_OF_FOUND_ITEMS), DaoUtils.getStringIfPresent(rs, DEFAULT_DESCRIPTION_COLUMN_NAME), DaoUtils.getDate(rs, DEFAULT_ACTION_TIME_COLUMN_NAME)); } }