Class JDBCConnection

java.lang.Object
org.nuxeo.ecm.core.storage.sql.jdbc.JDBCConnection
Direct Known Subclasses:
JDBCRowMapper

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

    • 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
    • logger

      public final JDBCLogger logger
    • setClientInfo

      protected boolean setClientInfo
  • Constructor Details

    • 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 Details

    • getRepositoryName

      public String getRepositoryName()
    • getIdentification

      public Mapper.Identification getIdentification()
    • 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()
    • checkConcurrentUpdate

      protected void checkConcurrentUpdate(Throwable e) throws ConcurrentUpdateException
      Checks the SQL error we got and determine if a concurrent update happened. Throws if that's the case.
      Parameters:
      e - the exception
      Throws:
      ConcurrentUpdateException
      Since:
      5.8