Search in sources :

Example 1 with PageOf

use of com.netsteadfast.greenstep.base.model.PageOf in project bamboobsc by billchen198318.

the class HessianServiceProxyAspect method setReCalculateSizePageOfForPageFindGridResult.

/**
	 * 給 GridPage 查詢返回後處理
	 * 如果 hessian 遠端呼叫有啟用時, 要重新調用 PageOf.setCountSize 與 PageOf.toCalculateSize
	 * 因為帶入遠端 Service 的 PageOf 並沒有回傳, 遠端只有回傳 QueryResult 
	 * 
	 * @param queryResult
	 * @param pageOf
	 */
private void setReCalculateSizePageOfForPageFindGridResult(Object resultObj, Object[] params) {
    if (null == resultObj || !(resultObj instanceof QueryResult)) {
        return;
    }
    if (params == null || params.length < 1) {
        return;
    }
    PageOf pageOf = null;
    for (int i = 0; i < params.length && pageOf == null; i++) {
        if (params[i] instanceof PageOf) {
            pageOf = (PageOf) params[i];
        }
    }
    if (null == pageOf) {
        return;
    }
    QueryResult<?> result = (QueryResult<?>) resultObj;
    pageOf.setCountSize(String.valueOf(result.getRowCount()));
    pageOf.toCalculateSize();
}
Also used : QueryResult(com.netsteadfast.greenstep.base.model.QueryResult) PageOf(com.netsteadfast.greenstep.base.model.PageOf) ProceedingJoinPoint(org.aspectj.lang.ProceedingJoinPoint)

Example 2 with PageOf

use of com.netsteadfast.greenstep.base.model.PageOf in project bamboobsc by billchen198318.

the class BaseSupportAction method init.

private void init() {
    if (this.pageOf == null) {
        this.pageOf = new PageOf();
    }
    if (this.searchValue == null) {
        this.searchValue = new SearchValue();
        this.searchValue.setText("");
        this.searchValue.setType("");
    }
}
Also used : SearchValue(com.netsteadfast.greenstep.base.model.SearchValue) PageOf(com.netsteadfast.greenstep.base.model.PageOf)

Aggregations

PageOf (com.netsteadfast.greenstep.base.model.PageOf)2 QueryResult (com.netsteadfast.greenstep.base.model.QueryResult)1 SearchValue (com.netsteadfast.greenstep.base.model.SearchValue)1 ProceedingJoinPoint (org.aspectj.lang.ProceedingJoinPoint)1