root / trunk / libraries / libGDBMS / src / main / java / com / hardcode / gdbms / engine / data / db / DBDataSource.java @ 5568
History | View | Annotate | Download (1.09 KB)
1 |
package com.hardcode.gdbms.engine.data.db; |
---|---|
2 |
|
3 |
import com.hardcode.driverManager.Driver; |
4 |
import com.hardcode.gdbms.engine.data.DataSource; |
5 |
import com.hardcode.gdbms.engine.data.driver.DBDriver; |
6 |
import com.hardcode.gdbms.engine.data.driver.DriverException; |
7 |
|
8 |
|
9 |
/**
|
10 |
* Interface for database DataSources, allowing query delegation on the
|
11 |
* original server
|
12 |
*/
|
13 |
public interface DBDataSource extends DataSource { |
14 |
/**
|
15 |
* Executes a query against the server where this data source is stored.
|
16 |
* It's not neccessary to call between a start and a stop call
|
17 |
*
|
18 |
* @param sql instruction to execute
|
19 |
*
|
20 |
* @throws DriverException If execution fails
|
21 |
*/
|
22 |
public void execute(String sql) throws DriverException; |
23 |
|
24 |
/**
|
25 |
* Sets the driver layer
|
26 |
*
|
27 |
* @param driver
|
28 |
*/
|
29 |
public void setDriver(DBDriver driver); |
30 |
|
31 |
/**
|
32 |
* Gets the driver of the DataSource
|
33 |
*
|
34 |
* @return DBDriver
|
35 |
*/
|
36 |
public Driver getDriver(); |
37 |
|
38 |
/**
|
39 |
* Devuelve el dbms de DataSource, o null si no tiene uno solo
|
40 |
*
|
41 |
* @return nombre del dbms
|
42 |
*/
|
43 |
String getDBMS();
|
44 |
} |