@Override
public List<Table> getPagingTables(String pattern, int offset, int limit)
throws ZeusException {
if (offset < 0 || limit < 0) {
throw new ZeusException("获取分页表信息失败,参数不正确");
}
if (pattern == null) {
pattern = "";
}
List<Table> tables = new ArrayList<Table>();
try {
List<String> tbs = client.getTables(DEFAULT_DB,
getPatternFromQuery(pattern));
limit = offset + limit > tbs.size() ? tbs.size() - offset : limit;
for (String t : tbs.subList(offset, offset + limit)) {
tables.add(client.getTable(DEFAULT_DB, t));
}
} catch (Exception e) {
log.error("获取分页表信息失败", e);
throw new ZeusException("获取所有表信息失败", e);
}
return tables;
}