|
|
@@ -29,9 +29,6 @@ public class Sort implements Serializable {
|
|
|
* 如果为true,则反转默认的升序
|
|
|
*/
|
|
|
public Sort(Field field, boolean reverse) {
|
|
|
- if (field == null) {
|
|
|
- throw new NullPointerException();
|
|
|
- }
|
|
|
this.field = field;
|
|
|
this.reverse = reverse;
|
|
|
}
|
|
|
@@ -44,6 +41,10 @@ public class Sort implements Serializable {
|
|
|
this(field, false);
|
|
|
}
|
|
|
|
|
|
+ public Sort() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @return 排序的字段
|
|
|
*/
|
|
|
@@ -51,6 +52,10 @@ public class Sort implements Serializable {
|
|
|
return field;
|
|
|
}
|
|
|
|
|
|
+ public void setField(Field field) {
|
|
|
+ this.field = field;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 排序是否应该被反转
|
|
|
*
|