Class JdbiPersistMapper


  • public class JdbiPersistMapper
    extends java.lang.Object
    A Jdbi-based PersistentObjectMapper::persistMapper.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.function.BiFunction<org.jdbi.v3.core.statement.Update,​java.lang.Object,​org.jdbi.v3.core.statement.Update> binder  
      java.lang.String insertStatement  
      java.lang.String updateStatement  
    • Constructor Summary

      Constructors 
      Constructor Description
      JdbiPersistMapper​(java.lang.String insertStatement, java.lang.String updateStatement, java.util.function.BiFunction<org.jdbi.v3.core.statement.Update,​java.lang.Object,​org.jdbi.v3.core.statement.Update> binder)
      Construct my state with insertStatement, updateStatement, and binder.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static JdbiPersistMapper with​(java.lang.String insertStatement, java.lang.String updateStatement, java.util.function.BiFunction<org.jdbi.v3.core.statement.Update,​java.lang.Object,​org.jdbi.v3.core.statement.Update> binder)
      Answer a new JdbiPersistMapper with insertStatement, updateStatement, and binder.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • insertStatement

        public final java.lang.String insertStatement
      • updateStatement

        public final java.lang.String updateStatement
      • binder

        public final java.util.function.BiFunction<org.jdbi.v3.core.statement.Update,​java.lang.Object,​org.jdbi.v3.core.statement.Update> binder
    • Constructor Detail

      • JdbiPersistMapper

        public JdbiPersistMapper​(java.lang.String insertStatement,
                                 java.lang.String updateStatement,
                                 java.util.function.BiFunction<org.jdbi.v3.core.statement.Update,​java.lang.Object,​org.jdbi.v3.core.statement.Update> binder)
        Construct my state with insertStatement, updateStatement, and binder.
        Parameters:
        insertStatement - the String insert statement
        updateStatement - the String update statement
        binder - the BiFunction<Update,Object,Update> used to bind parameters
    • Method Detail

      • with

        public static JdbiPersistMapper with​(java.lang.String insertStatement,
                                             java.lang.String updateStatement,
                                             java.util.function.BiFunction<org.jdbi.v3.core.statement.Update,​java.lang.Object,​org.jdbi.v3.core.statement.Update> binder)
        Answer a new JdbiPersistMapper with insertStatement, updateStatement, and binder.
        Parameters:
        insertStatement - the String insert statement
        updateStatement - the String update statement
        binder - the BiFunction<Update,Object,Update> used to bind parameters
        Returns:
        JdbiPersistMapper