Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.db / org.gvsig.fmap.dal.db.jdbc / src / main / java / org / gvsig / fmap / dal / store / jdbc2 / JDBCConnection.java @ 46316

History | View | Annotate | Download (1.41 KB)

1
/*
2
 * To change this license header, choose License Headers in Project Properties.
3
 * To change this template file, choose Tools | Templates
4
 * and open the template in the editor.
5
 */
6
package org.gvsig.fmap.dal.store.jdbc2;
7

    
8
import java.sql.Connection;
9
import java.sql.DatabaseMetaData;
10
import java.sql.PreparedStatement;
11
import java.sql.SQLException;
12
import java.sql.Statement;
13
import org.gvsig.fmap.dal.exception.DataException;
14
import org.gvsig.fmap.dal.spi.DataTransactionServices;
15

    
16
/**
17
 *
18
 * @author jjdelcerro
19
 */
20
public interface JDBCConnection extends DataTransactionServices.ConnectionService<Connection> {
21

    
22
    public static void closeQuietly(JDBCConnection conn) {
23
        if(conn!=null ) {
24
            conn.closeQuietly();
25
        }
26
    }
27

    
28
    public Statement createStatement() throws SQLException;
29

    
30
    public void close() throws SQLException;
31
    
32
    public void closeQuietly();
33
    
34
    public boolean isInTransaction();
35
    
36
    public boolean isInDataTransaction();
37

    
38
    public void begin() throws SQLException;
39

    
40
    public void rollback() throws SQLException;
41

    
42
    public void commit() throws SQLException;
43
    
44
    @Override
45
    public Connection get();
46

    
47
    public void execute(String sql) throws SQLException; // JDBCUtils.execute(this.connection.get(), sql);
48

    
49
    public PreparedStatement prepareStatement(String insertSQL) throws SQLException;
50

    
51
    public DatabaseMetaData getMetaData() throws SQLException ;
52
    
53
}