接口 TransientResolver<ID,V>

类型参数:
ID -
V -

public interface TransientResolver<ID,V>
Only for java, kotlin developers should use `KTransientResolver`
  • 方法概要

    修饰符和类型
    方法
    说明
    static @NotNull Connection
    Get the database connection should be used, it can be ignored if the current resolver is injected by spring and the spring-transaction is enabled.
    default V
    Please ignore this method if the current calculated property returns nullable type or LIST of entity objects
    default org.babyfish.jimmer.lang.Ref<SortedMap<String,Object>>
    Please ignore this method if cache for current calculated property is not enabled.
     
  • 方法详细资料

    • resolve

      Map<ID,V> resolve(Collection<ID> ids)
      参数:
      ids - A batch of ids of the current objects that are resolving calculated property, it is not null and not empty
      返回:
      A map contains resolved values
    • getDefaultValue

      default V getDefaultValue()
      Please ignore this method if the current calculated property returns nullable type or LIST of entity objects
      返回:
      Then default value, null will be ignored by jimmer.
    • getParameterMapRef

      default org.babyfish.jimmer.lang.Ref<SortedMap<String,Object>> getParameterMapRef()
      Please ignore this method if cache for current calculated property is not enabled.
      返回:
      The reference wrapper of parameterMap
      • If the `Ref` wrapper itself is null, it means there is some filter but not cacheable filter
      • If the `Ref` wrapper itself is not null, it means there is no filter(wrapped value is null) or there is a cacheable filter(wrapped value is not null)
    • currentConnection

      @NotNull static @NotNull Connection currentConnection()
      Get the database connection should be used, it can be ignored if the current resolver is injected by spring and the spring-transaction is enabled.
      返回:
      the database connection should be used, never return null.
      抛出:
      IllegalStateException - cannot retrieve the current connection.