本文整理匯總了Java中org.easyrec.model.core.ActionVO.getRatingValue方法的典型用法代碼示例。如果您正苦於以下問題:Java ActionVO.getRatingValue方法的具體用法?Java ActionVO.getRatingValue怎麽用?Java ActionVO.getRatingValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.easyrec.model.core.ActionVO
的用法示例。
在下文中一共展示了ActionVO.getRatingValue方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: insertAction
import org.easyrec.model.core.ActionVO; //導入方法依賴的package包/類
@Override
public int insertAction(ActionVO<Integer, Integer> action, boolean useDateFromVO) {
if (logger.isTraceEnabled()) {
logger.trace("inserting action=" + action);
}
// validate non-empty fields (NOT NULL)
validateNonEmptyFields(action, useDateFromVO);
Object[] args = {action.getTenant(), action.getUser(), action.getSessionId(), action.getIp(),
((action.getItem() != null) ? action.getItem().getItem() : null),
((action.getItem() != null) ? action.getItem().getType() : null), action.getActionType(),
action.getRatingValue(),
action.getActionInfo(), ((useDateFromVO && action.getActionTime() != null) ? action.getActionTime() :
new Date(System.currentTimeMillis()))};
KeyHolder keyHolder = new GeneratedKeyHolder();
int rowsAffected = getJdbcTemplate().update(PS_INSERT_ACTION.newPreparedStatementCreator(args), keyHolder);
// retrieve auto increment id, and set to VO
action.setId(keyHolder.getKey().longValue());
return rowsAffected;
}
示例2: insertAction
import org.easyrec.model.core.ActionVO; //導入方法依賴的package包/類
@Override
public int insertAction(ActionVO<Integer, Integer> action, boolean useDateFromVO) {
if (logger.isTraceEnabled()) {
logger.trace("inserting action=" + action);
}
// validate non-empty fields (NOT NULL)
validateNonEmptyFields(action, useDateFromVO);
Object[] args = {action.getTenant(), action.getUser(), action.getSessionId(), action.getIp(),
((action.getItem() != null) ? action.getItem().getItem() : null),
((action.getItem() != null) ? action.getItem().getType() : null), action.getActionType(),
action.getRatingValue(), action.getSearchSucceeded(), action.getNumberOfFoundItems(),
action.getDescription(), ((useDateFromVO && action.getActionTime() != null) ? action.getActionTime() :
new Date(System.currentTimeMillis()))};
KeyHolder keyHolder = new GeneratedKeyHolder();
int rowsAffected = getJdbcTemplate().update(PS_INSERT_ACTION.newPreparedStatementCreator(args), keyHolder);
// retrieve auto increment id, and set to VO
action.setId(keyHolder.getKey().intValue());
return rowsAffected;
}
示例3: insertAction
import org.easyrec.model.core.ActionVO; //導入方法依賴的package包/類
public int insertAction(ActionVO<Integer, Integer> action) {
String query = QUERY_INSERT + QUERY_INSERT_VALUE;
query = query.substring(0, query.length() - 2);
Object[] args = new Object[]{action.getTenant(), action.getUser(), action.getItem().getItem(),
action.getItem().getType(), action.getRatingValue(), action.getActionTime()};
return getJdbcTemplate().update(query, args, ARGT_INSERT);
}