S - sourceT - targetpublic abstract class AbstractDataConverter<S,T> extends Object implements Function<S,T>
| 构造器和说明 |
|---|
AbstractDataConverter() |
| 限定符和类型 | 方法和说明 |
|---|---|
T |
apply(S source) |
List<T> |
convert(List<S> list) |
static <S,T> List<T> |
convert(List<S> list,
Function<S,T> converter) |
Page<T> |
convert(Page<S> page) |
static <S,T> Page<T> |
convert(Page<S> page,
Function<S,T> converter) |
T |
convert(S source)
Returns an target object copy source the argument object
Sub class can override this method
|
static <S,T> T |
convert(S source,
Class<T> targetType) |
static <S,T> T |
convert(S source,
Class<T> targetType,
org.springframework.cglib.beans.BeanCopier copier) |
static <S,T> T |
convert(S source,
Function<S,T> converter) |
Result<T> |
convertResultBean(Result<S> result) |
static <S,T> Result<T> |
convertResultBean(Result<S> result,
Function<S,T> converter) |
Result<List<T>> |
convertResultList(Result<List<S>> result) |
static <S,T> Result<List<T>> |
convertResultList(Result<List<S>> result,
Function<S,T> converter) |
Result<Page<T>> |
convertResultPage(Result<Page<S>> result) |
static <S,T> Result<Page<T>> |
convertResultPage(Result<Page<S>> result,
Function<S,T> converter) |
static <S,T> void |
copy(S source,
T target) |
static <S,T> void |
copy(S source,
T target,
org.springframework.cglib.beans.BeanCopier copier) |
void |
copyProperties(S source,
T target) |
public T convert(S source)
Sub class can override this method
source - the objectpublic static <S,T> T convert(S source,
Class<T> targetType)
public static <S,T> T convert(S source,
Class<T> targetType,
org.springframework.cglib.beans.BeanCopier copier)
public static <S,T> void copy(S source,
T target)
public static <S,T> void copy(S source,
T target,
org.springframework.cglib.beans.BeanCopier copier)
public static <S,T> T convert(S source,
Function<S,T> converter)
public static <S,T> Result<T> convertResultBean(Result<S> result, Function<S,T> converter)
public static <S,T> Result<List<T>> convertResultList(Result<List<S>> result, Function<S,T> converter)
Copyright © 2023. All rights reserved.