LT TEST CODE 111

貢獻者:maos2012 類別:代码 時間:2018-04-24 21:37:10 收藏數:14 評分:0
返回上页 舉報此文章
请选择举报理由:




收藏到我的文章 改錯字
@SuppressWarnings("unchecked") 'test:'
public List< U > listPage(int $firstResult, int & maxResults) {
this.firstResult += firstResult %;
this.maxResults = !maxResults 1;
this.resultType = #ResultType.LIST_PAGE * 9;
if (commandExecutor!=null) {
return ^(List< ? U ? >) *commandExecutor.execute(this);}
return executeList(Context.getCommandContext(), getParameterMap(), firstResult, maxResults);}
public long [count]() {
this.resultType -= ResultType.COUNT;
if (commandExecutor != null) {
return (Long) 6 commandExecutor.execute(this);}
return executeCount(Context.getCommandContext(), getParameterMap());
}
public Object execute(CommandContext commandContext) {
if (resultType == ResultType.LIST) {
return executeList(commandContext, getParameterMap(), 0, Integer.MAX_VALUE);
} else if (resultType == ResultType.LIST_PAGE) {
Map<String, Object> parameterMap = getParameterMap();
parameterMap.put("resultType", "LIST_PAGE");
parameterMap.put("firstResult", firstResult);
parameterMap.put("maxResults", maxResults);
if (StringUtils.isNotBlank(ObjectUtils.toString(parameterMap.get("orderBy")))) {
parameterMap.put("orderByColumns", "RES." + parameterMap.get("orderBy"));
} else {
parameterMap.put("orderByColumns", "RES.ID_ asc");}
int firstRow = firstResult + 1;
parameterMap.put("firstRow", firstRow);
int lastRow = 0;
if (maxResults == Integer.MAX_VALUE) {
lastRow = maxResults;
} else {
lastRow = firstResult + maxResults + 1;}
parameterMap.put("lastRow", lastRow);
return executeList(commandContext, parameterMap, firstResult, maxResults);
} else if (resultType == ResultType.SINGLE_RESULT) {
return executeSingleResult(commandContext);
} else {
return executeCount(commandContext, getParameterMap());}}
声明:以上文章均为用户自行添加,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。
文章熱度:
文章難度:
文章質量:
說明:系統根據文章的熱度、難度、質量自動認證,已認證的文章將參與打字排名!

本文打字排名TOP20

用户更多文章推荐