接口 Fetcher<E>
- 所有已知子接口:
FetcherImplementor<E>
- 所有已知实现类:
AbstractTypedFetcher,FetcherImpl
public interface Fetcher<E>
-
方法概要
修饰符和类型方法说明Fetch a property without child fetcher, for associated property, that means fetch id-only objectFetch a property with child fetcher, error will be raised if the specified property is not associationadd(String prop, Fetcher<?> childFetcher, Consumer<? extends FieldConfig<?, ? extends Table<?>>> loaderBlock) Fetch a property with child fetcher and more configuration, error will be raised if the specified property is not associationadd(String prop, IdOnlyFetchType referenceType) Fetch association directly based on foreign key, the associated object has only id propertyallScalars + allForeignKeysorg.babyfish.jimmer.meta.ImmutableTypeUnfetch a propertytoString(boolean multiLine)
-
方法详细资料
-
getJavaClass
-
getImmutableType
org.babyfish.jimmer.meta.ImmutableType getImmutableType() -
getFieldMap
-
allScalarFields
-
allTableFields
allScalars + allForeignKeys- 返回:
- A new fetcher
-
add
Fetch a property without child fetcher, for associated property, that means fetch id-only object- 参数:
prop- Propery name- 返回:
- A new fetcher
-
add
Fetch a property with child fetcher, error will be raised if the specified property is not association- 参数:
prop- Property namechildFetcher- Deeper child fetcher for associated objects- 返回:
- A new fetcher
-
add
@NewChain Fetcher<E> add(String prop, Fetcher<?> childFetcher, Consumer<? extends FieldConfig<?, ? extends Table<?>>> loaderBlock) Fetch a property with child fetcher and more configuration, error will be raised if the specified property is not association- 参数:
prop- Property namechildFetcher- Deeper child fetcher for associated objectsloaderBlock- An optional lambda expression that lets the user set more configurations- 返回:
- A new fetcher
-
add
Fetch association directly based on foreign key, the associated object has only id property- 参数:
prop- Property namereferenceType- Reference type which has 2 choices- DEFAULT: The associated will filtered by global filters(include built-lt logical deleted filter)
- RAW: Raw value of foreign key
If the property is not an association directly based on foreign key, this argument will be ignored
- 返回:
- A new fetcher
-
remove
Unfetch a property- 参数:
prop- Property name- 返回:
- A new fetcher
-
toString
-