Class SqlArrayTypeImpl<T>

java.lang.Object
org.jdbi.v3.core.array.SqlArrayTypeImpl<T>
All Implemented Interfaces:
SqlArrayType<T>

class SqlArrayTypeImpl<T> extends Object implements SqlArrayType<T>
  • Field Details

    • typeName

      private final String typeName
    • conversion

      private final Function<T,?> conversion
  • Constructor Details

    • SqlArrayTypeImpl

      SqlArrayTypeImpl(String typeName, Function<T,?> conversion)
  • Method Details

    • getTypeName

      public String getTypeName()
      Description copied from interface: SqlArrayType
      Returns the vendor-specific SQL type name String for the element type T. This value will be passed to Connection.createArrayOf(String, Object[]) to create SQL arrays.
      Specified by:
      getTypeName in interface SqlArrayType<T>
      Returns:
      the type name
    • convertArrayElement

      public Object convertArrayElement(T element)
      Description copied from interface: SqlArrayType
      Returns an equivalent value in a type supported by the JDBC vendor. If element type T is already supported by the JDBC vendor, this method may return element without modification.
      Specified by:
      convertArrayElement in interface SqlArrayType<T>
      Parameters:
      element - the element to convert
      Returns:
      the converted element