Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.api / src / main / java / org / gvsig / fmap / dal / store / jdbc2 / JDBCConnection.java @ 46542

History | View | Annotate | Download (1.36 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.spi.DataTransactionServices;
14

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

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

    
27
    public Statement createStatement() throws SQLException;
28

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

    
37
    public void begin() throws SQLException;
38

    
39
    public void rollback() throws SQLException;
40

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

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

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

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