LT TEST CODE 111
@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());}}
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
登录后可见
用户更多文章推荐
- LT CODE TEST 32018-05-28
- LT_CODE_TEST05032018-05-03
- LT Code Type Test2018-04-19