io.github.davidchild.bitter.op.page.UnionPage Maven / Gradle / Ivy
package io.github.davidchild.bitter.op.page;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import io.github.davidchild.bitter.basequery.BaseQuery;
import io.github.davidchild.bitter.basequery.ExecuteMode;
public class UnionPage extends BaseQuery implements IUnionPageAccess {
private Integer totalCount;
private List unionQueryList = new ArrayList<>();
///
/// Total number of collections
///
public Integer getCount() {
int sum = 0;
for (IPageAccess page : unionQueryList) {
sum += page.getCount();
}
return sum;
}
///
/// Current page
///
///
public IUnionPageAccess skip(Integer pageIndex) {
for (IPageAccess page : unionQueryList) {
page.skip(pageIndex);
}
return this;
}
///
/// How many are displayed per page
///
///
public IUnionPageAccess take(Integer pageSize) {
for (IPageAccess page : unionQueryList) {
page.take(pageSize);
}
return this;
}
public IUnionPageAccess thenASC(String filedName) {
for (IPageAccess page : unionQueryList) {
page.thenASC(filedName);
}
return this;
}
public IUnionPageAccess thenDESC(String filedName) {
for (IPageAccess page : unionQueryList) {
page.thenDESC(filedName);
}
return this;
}
///
/// Find set data
///
///
public List