Removed old total fetch method.
This commit is contained in:
parent
5bbd8e4ef3
commit
e14b484ca5
18 changed files with 77 additions and 190 deletions
|
|
@ -140,12 +140,8 @@ public class MetaModelVascBackend extends AbstractVascBackend<Row> {
|
|||
public boolean isSortable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.AbstractVascBackend#fetchTotalExecuteSize(net.forwardfire.vasc.backend.VascBackendState)
|
||||
*/
|
||||
@Override
|
||||
public long fetchTotalExecuteSize(VascBackendState state) {
|
||||
|
||||
private long fetchTotalExecuteSize(VascBackendState state) {
|
||||
Schema schema = dataContext.getDefaultSchema();
|
||||
Table t = schema.getTableByName(table);
|
||||
Query q = createFilterQuery(state,t,true);
|
||||
|
|
@ -213,6 +209,10 @@ public class MetaModelVascBackend extends AbstractVascBackend<Row> {
|
|||
|
||||
@Override
|
||||
public VascBackendResult<Row> execute(VascBackendState state) throws VascBackendException {
|
||||
return new DefaultVascBackendResult<Row>(executeList(state),fetchTotalExecuteSize(state));
|
||||
}
|
||||
|
||||
private List<Row> executeList(VascBackendState state) throws VascBackendException {
|
||||
Schema schema = dataContext.getDefaultSchema();
|
||||
Table t = schema.getTableByName(table);
|
||||
if (t==null) {
|
||||
|
|
@ -243,7 +243,7 @@ public class MetaModelVascBackend extends AbstractVascBackend<Row> {
|
|||
DataSet ds = crudDataContext.executeQuery(q);
|
||||
result.addAll(ds.toRows());
|
||||
ds.close();
|
||||
return new DefaultVascBackendResult<Row>(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
DataSet ds = dataContext.executeQuery(q);
|
||||
|
|
@ -261,7 +261,7 @@ public class MetaModelVascBackend extends AbstractVascBackend<Row> {
|
|||
}
|
||||
ds.close();
|
||||
|
||||
return new DefaultVascBackendResult<Row>(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue