本文整理匯總了Java中com.sencha.gxt.data.shared.loader.FilterConfig類的典型用法代碼示例。如果您正苦於以下問題:Java FilterConfig類的具體用法?Java FilterConfig怎麽用?Java FilterConfig使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
FilterConfig類屬於com.sencha.gxt.data.shared.loader包,在下文中一共展示了FilterConfig類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getPagingTables
import com.sencha.gxt.data.shared.loader.FilterConfig; //導入依賴的package包/類
@Override
public PagingLoadResult<TableModel> getPagingTables(
FilterPagingLoadConfig loadConfig, String uid, String dbName) throws GwtException {
List<TableModel> tl;
int offset = loadConfig.getOffset();
int limit = loadConfig.getLimit();
String name = "";
if (loadConfig.getFilters() != null
&& !loadConfig.getFilters().isEmpty()) {
for (FilterConfig f : loadConfig.getFilters()) {
if (f.getField().equals("name")) {
name = f.getValue().trim();
}
}
}
// 搜索表至少三個字符
if (name.replace(" ", "").length() >= 3) {
int totalNum = 0;
try {
totalNum = tableManager.getTotalNumber(dbName, name);
tl = convertList(tableManager.getPagingTables(dbName, name, offset,
limit));
} catch (ZeusException e) {
throw new GwtException("獲取分頁表失敗!", e);
}
return new PagingLoadResultBean<TableModel>(tl, totalNum,
loadConfig.getOffset());
} else {
return new PagingLoadResultBean<TableModel>(
Collections.<TableModel> emptyList(), 0,
loadConfig.getOffset());
}
}
示例2: getPagingTables
import com.sencha.gxt.data.shared.loader.FilterConfig; //導入依賴的package包/類
@Override
public PagingLoadResult<TableModel> getPagingTables(
FilterPagingLoadConfig loadConfig, String uid) throws GwtException {
List<TableModel> tl;
int offset = loadConfig.getOffset();
int limit = loadConfig.getLimit();
String name = "";
if (loadConfig.getFilters() != null
&& !loadConfig.getFilters().isEmpty()) {
for (FilterConfig f : loadConfig.getFilters()) {
if (f.getField().equals("name")) {
name = f.getValue().trim();
}
}
}
// 搜索表至少三個字符
if (name.replace(" ", "").length() >= 3) {
int totalNum = 0;
try {
totalNum = tableManager.getTotalNumber(name);
tl = convertList(tableManager.getPagingTables(name, offset,
limit));
} catch (ZeusException e) {
throw new GwtException("獲取分頁表失敗!", e);
}
return new PagingLoadResultBean<TableModel>(tl, totalNum,
loadConfig.getOffset());
} else {
return new PagingLoadResultBean<TableModel>(
Collections.<TableModel> emptyList(), 0,
loadConfig.getOffset());
}
}