Class CachedPreferredConstructorDiscoverer<T>

java.lang.Object
in.co.akshitbansal.springwebquery.tupleconverter.PreferredConstructorDiscoverer<T>
in.co.akshitbansal.springwebquery.tupleconverter.CachedPreferredConstructorDiscoverer<T>
Type Parameters:
T - target DTO type

public class CachedPreferredConstructorDiscoverer<T> extends PreferredConstructorDiscoverer<T>
Cached PreferredConstructorDiscoverer variant that memoizes constructor matches by target DTO type and tuple shape.
  • Method Details

    • discover

      public Constructor<T> discover(@NonNull @NonNull jakarta.persistence.Tuple tuple)
      Finds a constructor for the supplied tuple, serving the result from the shared cache whenever the tuple shape has already been seen.
      Overrides:
      discover in class PreferredConstructorDiscoverer<T>
      Parameters:
      tuple - tuple whose values will be passed to the constructor
      Returns:
      cached or freshly discovered matching constructor