mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
支持链式编程
This commit is contained in:
parent
c596255e4a
commit
0790ba3d36
@ -147,9 +147,11 @@ public class Page implements Segment<Integer>, Serializable {
|
|||||||
* 设置排序
|
* 设置排序
|
||||||
*
|
*
|
||||||
* @param orders 排序
|
* @param orders 排序
|
||||||
|
* @return this
|
||||||
*/
|
*/
|
||||||
public void addOrder(final Order... orders) {
|
public Page addOrder(final Order... orders) {
|
||||||
this.orders = ArrayUtil.append(this.orders, orders);
|
this.orders = ArrayUtil.append(this.orders, orders);
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
// ---------------------------------------------------------- Getters and Setters end
|
// ---------------------------------------------------------- Getters and Setters end
|
||||||
|
|
||||||
|
@ -336,10 +336,12 @@ public class Condition implements Cloneable, Serializable {
|
|||||||
* 设置与前一个Condition连接的逻辑运算符,可以是and或or
|
* 设置与前一个Condition连接的逻辑运算符,可以是and或or
|
||||||
*
|
*
|
||||||
* @param linkOperator 与前一个Condition连接的逻辑运算符,可以是and或or
|
* @param linkOperator 与前一个Condition连接的逻辑运算符,可以是and或or
|
||||||
|
* @return this
|
||||||
* @since 5.4.3
|
* @since 5.4.3
|
||||||
*/
|
*/
|
||||||
public void setLinkOperator(final LogicalOperator linkOperator) {
|
public Condition setLinkOperator(final LogicalOperator linkOperator) {
|
||||||
this.linkOperator = linkOperator;
|
this.linkOperator = linkOperator;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------- Getters and Setters end
|
// --------------------------------------------------------------- Getters and Setters end
|
||||||
|
@ -79,10 +79,13 @@ public class Order implements Serializable{
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 设置排序方向
|
* 设置排序方向
|
||||||
|
*
|
||||||
* @param direction 排序方向
|
* @param direction 排序方向
|
||||||
|
* @return this
|
||||||
*/
|
*/
|
||||||
public void setDirection(final Direction direction) {
|
public Order setDirection(final Direction direction) {
|
||||||
this.direction = direction;
|
this.direction = direction;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------- Getters and Setters end
|
//---------------------------------------------------------- Getters and Setters end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user