Class JdbiCollectors

java.lang.Object
org.jdbi.v3.core.collector.JdbiCollectors
All Implemented Interfaces:
JdbiConfig<JdbiCollectors>

public class JdbiCollectors extends Object implements JdbiConfig<JdbiCollectors>
Registry of collector factories. Contains a set of collector factories, registered by the application.
  • Constructor Details

    • JdbiCollectors

      public JdbiCollectors()
  • Method Details

    • register

      public JdbiCollectors register(CollectorFactory factory)
    • findFor

      public Optional<Collector<?,​?,​?>> findFor(Type containerType)
      Obtain a collector for the given type.
      Parameters:
      containerType - the container type.
      Returns:
      a Collector for the given container type, or empty null if no collector is registered for the given type.
    • findElementTypeFor

      public Optional<Type> findElementTypeFor(Type containerType)
      Returns the element type for the given container type.
      Parameters:
      containerType - the container type.
      Returns:
      the element type for the given container type, if available.
    • createCopy

      public JdbiCollectors createCopy()
      Description copied from interface: JdbiConfig
      Returns a copy of this configuration object. Changes to the copy should not modify the original, and vice-versa.
      Specified by:
      createCopy in interface JdbiConfig<JdbiCollectors>
      Returns:
      a copy of this configuration object.