Class ResultSetMappers

    • Field Detail

      • MAP_RESULT_SET_MAPPER

        public static final ResultSetMapper<Map<String,​Object>> MAP_RESULT_SET_MAPPER
        A ResultSetMapper that will return a Map where the key is the column name and the value is the result of calling getObject.
    • Method Detail

      • beanMapper

        public static <T> ResultSetMapper<T> beanMapper​(@NonNull
                                                        @NonNull Class<T> tClass)
        Creates a ResultSetMapper that will return objects of the given type using a BeanMap. Objects must have a no-argument constructor and the column names must align with the object's properties.
        Type Parameters:
        T - the type parameter
        Parameters:
        tClass - the class of the object to create
        Returns:
        the ResultSetMapper