接口 Fetcher<E>

所有已知子接口:
FetcherImplementor<E>
所有已知实现类:
AbstractTypedFetcher, FetcherImpl

public interface Fetcher<E>
  • 方法详细资料

    • getJavaClass

      Class<E> getJavaClass()
    • getImmutableType

      org.babyfish.jimmer.meta.ImmutableType getImmutableType()
    • getFieldMap

      Map<String,Field> getFieldMap()
    • allScalarFields

      @NewChain Fetcher<E> allScalarFields()
    • allReferenceFields

      @NewChain Fetcher<E> allReferenceFields()
    • allTableFields

      @NewChain Fetcher<E> allTableFields()
      allScalars + allForeignKeys
      返回:
      A new fetcher
    • add

      @NewChain Fetcher<E> add(String prop)
      Fetch a property without child fetcher, for associated property, that means fetch id-only object
      参数:
      prop - Propery name
      返回:
      A new fetcher
    • add

      @NewChain Fetcher<E> add(String prop, Fetcher<?> childFetcher)
      Fetch a property with child fetcher, error will be raised if the specified property is not association
      参数:
      prop - Property name
      childFetcher - 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 name
      childFetcher - Deeper child fetcher for associated objects
      loaderBlock - An optional lambda expression that lets the user set more configurations
      返回:
      A new fetcher
    • addRecursion

      @NewChain Fetcher<E> addRecursion(String prop, Consumer<? extends FieldConfig<?,? extends Table<?>>> loaderBlock)
    • add

      @NewChain Fetcher<E> add(String prop, IdOnlyFetchType referenceType)
      Fetch association directly based on foreign key, the associated object has only id property
      参数:
      prop - Property name
      referenceType - 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

      @NewChain Fetcher<E> remove(String prop)
      Unfetch a property
      参数:
      prop - Property name
      返回:
      A new fetcher
    • toString

      String toString(boolean multiLine)