修改类名,调整包结构。
parent
d580c4757e
commit
516c9d9d79
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package xyz.zhouxy.plusone.commons.domain;
|
package xyz.zhouxy.plusone.commons.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package xyz.zhouxy.plusone.commons.util;
|
package xyz.zhouxy.plusone.commons.model.dto;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -30,21 +30,21 @@ import xyz.zhouxy.plusone.commons.annotation.StaticFactoryMethod;
|
||||||
* @author <a href="http://zhouxy.xyz:3000/ZhouXY108">ZhouXY</a>
|
* @author <a href="http://zhouxy.xyz:3000/ZhouXY108">ZhouXY</a>
|
||||||
* @see PagingAndSortingQueryParams
|
* @see PagingAndSortingQueryParams
|
||||||
*/
|
*/
|
||||||
public class PageDTO<T> {
|
public class PageResult<T> {
|
||||||
|
|
||||||
private final long total;
|
private final long total;
|
||||||
|
|
||||||
private final List<T> content;
|
private final List<T> content;
|
||||||
|
|
||||||
private PageDTO(List<T> content, long total) {
|
private PageResult(List<T> content, long total) {
|
||||||
Preconditions.checkNotNull(content, "Content must not be null.");
|
Preconditions.checkNotNull(content, "Content must not be null.");
|
||||||
this.content = content;
|
this.content = content;
|
||||||
this.total = total;
|
this.total = total;
|
||||||
}
|
}
|
||||||
|
|
||||||
@StaticFactoryMethod(PageDTO.class)
|
@StaticFactoryMethod(PageResult.class)
|
||||||
public static <T> PageDTO<T> of(List<T> content, long total) {
|
public static <T> PageResult<T> of(List<T> content, long total) {
|
||||||
return new PageDTO<>(content, total);
|
return new PageResult<>(content, total);
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTotal() {
|
public long getTotal() {
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package xyz.zhouxy.plusone.commons.util;
|
package xyz.zhouxy.plusone.commons.model.dto;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.function.BooleanSupplier;
|
import java.util.function.BooleanSupplier;
|
|
@ -1,4 +1,4 @@
|
||||||
package xyz.zhouxy.plusone.commons.domain;
|
package xyz.zhouxy.plusone.commons.model;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
|
|
Loading…
Reference in New Issue