Class JDBCConnection

  • Direct Known Subclasses:
    JDBCRowMapper

    public class JDBCConnection
    extends Object
    Holds a connection to a JDBC database.
    • Field Detail

      • model

        protected final Model model
        The model used to do the mapping.
      • sqlInfo

        protected final SQLInfo sqlInfo
        The SQL information.
      • dialect

        protected final Dialect dialect
        The dialect.
      • connection

        public Connection connection
        The actual connection.
      • supportsBatchUpdates

        protected boolean supportsBatchUpdates
      • countExecutes

        public boolean countExecutes
      • executeCount

        public int executeCount
      • setClientInfo

        protected boolean setClientInfo
    • Constructor Detail

      • JDBCConnection

        public JDBCConnection​(Model model,
                              SQLInfo sqlInfo)
        Creates a new Mapper.
        Parameters:
        model - the model
        sqlInfo - the sql info
      • JDBCConnection

        public JDBCConnection()
        for tests only
        Since:
        5.9.3
    • Method Detail

      • getRepositoryName

        public String getRepositoryName()
      • countExecute

        protected void countExecute()
      • getDataSourceName

        public static String getDataSourceName​(String repositoryName)
        Gets the datasource to use for the given repository.
        Since:
        8.4
      • connect

        public void connect()
      • closeConnection

        public void closeConnection()