Changes between Version 3 and Version 4 of SERVER_DATABASE_PERSISTENCE


Ignore:
Timestamp:
02/17/10 16:26:25 (15 years ago)
Author:
meddle
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SERVER_DATABASE_PERSISTENCE

    v3 v4  
    8181     * commit() and rollback() methods for user made transactions that can be commited or rollbacked by the user, the use the ConnectionManager. 
    8282    * As you can see there are plenty of public methods some of which should be protected or private (the batch methods, the query and execute methods), They are public because the user may not be able to change the template but  wants to write qa query different from just insert/update one query or selllect one object or one list of objects, if you have oppinion on which of these methods should be private/protected, please write it in the review. 
     83   * Interface : SQLCallback<T> -> Represents a callback to the database using sql query. 
     84     * Public methods: 
     85      * {{{public T doSQL() throws SQLException}}} -> Executes a SQL query using the JDBC API, which can throw SQLException...  
     86     * Its implementations are used to manage the connection from the connection manager and use a ConnectionCallback. 
     87   * Interface : ConnectionCallback<T>  -> Represents a callback to the database with managed JDBC connection. 
     88    * Public methods: 
     89     * {{{public T doInConnection(Connection conn) throws SQLException}}} -> Executes a SQL query using the provided connection. 
     90    * The SQLCallbacks retrieve and manage connections, and their doSQL method instantiates ConnectionCallbacks that use that connections. The execute methods of the JDBCTemplate deal with the SQLExceptions and if it is needed throw our JdbcException. 
     91   * class : JDBCException -> The exception thrown when something is wrong with the JDBCTemplate queries. It is unchecked and in general represents unchecked SQLException. 
     92   * class : ConnectionManager -> Manages the connections to the database, provides thread safe connections and provides methods for strating transactions and rollback of transactions. 
     93    * The manager is constructed by a DataSource (From the JDBC API, the data source can provide a connections from a pool, for reusing...) 
     94    * Public methods: 
     95     * {{{public Connection getCurrentConnection()}}} -> Retrieves the current connection, if there is no such connection, gets one form the DataSource. 
     96     * {{{public void releaseCurrentConnection() throws SQLException}}} -> Releases the current connection if it is not used by a transaction. 
     97     * {{{public void commitCurrentTransation() throws SQLException}}} -> Commits the current transaction. 
     98     * {{{public void rollbackCurrentTransation() throws SQLException}}} -> Rollbacks the current tansaction. 
     99     * {{{public DataSource getDataSource()}}} -> Getter of the data source of the manager. 
     100 == The API Used by the Facade and the Web Interface == 
    83101 
    84102= Implementation =