This commit is contained in:
@@ -40,6 +40,11 @@ public final class Flipper implements Serializable, Cloneable {
|
||||
this.offset = offset < 0 ? 0 : offset;
|
||||
}
|
||||
|
||||
public Flipper(int limit, String sortColumn) {
|
||||
this.limit = limit > 0 ? limit : DEFAULT_LIMIT;
|
||||
this.sort = sortColumn;
|
||||
}
|
||||
|
||||
public Flipper(int limit, int offset, String sortColumn) {
|
||||
this.limit = limit > 0 ? limit : DEFAULT_LIMIT;
|
||||
this.offset = offset < 0 ? 0 : offset;
|
||||
|
||||
@@ -80,6 +80,18 @@ public class SelectColumn implements Predicate<String> {
|
||||
return new SelectColumn(columns, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* class中的字段名
|
||||
*
|
||||
* @param cols 包含的字段名集合
|
||||
* @param columns 包含的字段名集合
|
||||
*
|
||||
* @return SelectColumn
|
||||
*/
|
||||
public static SelectColumn createIncludes(String[] cols, String... columns) {
|
||||
return new SelectColumn(Utility.append(cols, columns), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* class中的字段名
|
||||
*
|
||||
@@ -91,6 +103,18 @@ public class SelectColumn implements Predicate<String> {
|
||||
return new SelectColumn(columns, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* class中的字段名
|
||||
*
|
||||
* @param cols 排除的字段名集合
|
||||
* @param columns 排除的字段名集合
|
||||
*
|
||||
* @return SelectColumn
|
||||
*/
|
||||
public static SelectColumn createExcludes(String[] cols, String... columns) {
|
||||
return new SelectColumn(Utility.append(cols, columns), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean test(final String column) {
|
||||
if (this.columns != null) {
|
||||
|
||||
Reference in New Issue
Block a user