Interface BaseDAO


  • public interface BaseDAO
    Dao which contain common request to DB
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.sql.Connection getBareConnection()
      Gets the bare connection from the data source.
      javax.sql.DataSource getDefaultDataSource()
      Gets the default configured datasource.
      org.springframework.jdbc.core.JdbcOperations getJdbcOperations()
      Gets JdbcOperations instance.
      org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations getNamedParameterJdbcOperations()
      Gets NamedParameterJdbcOperations instance.
      void lock​(long value)
      Locks an arbirtary long number via advisory TX lock.
      void lock​(java.lang.String name)
      Locks a table or other DB object, having an OID with the given name via advisory TX lock.
    • Method Detail

      • getDefaultDataSource

        javax.sql.DataSource getDefaultDataSource()
        Gets the default configured datasource.
        Returns:
        data source
      • getBareConnection

        java.sql.Connection getBareConnection()
        Gets the bare connection from the data source.
        Returns:
        connection
      • getJdbcOperations

        org.springframework.jdbc.core.JdbcOperations getJdbcOperations()
        Gets JdbcOperations instance.
        Returns:
        JdbcOperations instance
      • getNamedParameterJdbcOperations

        org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations getNamedParameterJdbcOperations()
        Gets NamedParameterJdbcOperations instance.
        Returns:
        NamedParameterJdbcOperations instance
      • lock

        void lock​(java.lang.String name)
        Locks a table or other DB object, having an OID with the given name via advisory TX lock. Lock is released with the end of transaction.
        Parameters:
        name - the table/object name
      • lock

        void lock​(long value)
        Locks an arbirtary long number via advisory TX lock. Lock is released with the end of transaction.
        Parameters:
        value - the table/object name