Revision 889
trunk/libraries/libGDBMS/src/com/hardcode/gdbms/engine/FilteredDataSource.java | ||
---|---|---|
1 | 1 |
package com.hardcode.gdbms.engine; |
2 | 2 |
|
3 | 3 |
import java.io.IOException; |
4 |
import java.util.BitSet; |
|
4 | 5 |
|
5 | 6 |
import com.hardcode.gdbms.engine.data.DataSource; |
6 | 7 |
import com.hardcode.gdbms.engine.data.DriverException; |
... | ... | |
44 | 45 |
* |
45 | 46 |
* @throws DriverException Si se produce un fallo en el driver al acceder a |
46 | 47 |
* los datos |
47 |
* @throws IOException Si se produce un error accediendo al DataSource |
|
48 |
* subyacente |
|
48 |
* @throws IOException Si se produce un error usando las estructuras de datos internas |
|
49 | 49 |
* @throws SemanticException Si se produce alg?n error sem?ntico al evaluar |
50 | 50 |
* la expresi?n |
51 | 51 |
* @throws IncompatibleTypesException Si la expresi?n where no evalua a |
... | ... | |
151 | 151 |
public ReadDriver getDriver() { |
152 | 152 |
return null; |
153 | 153 |
} |
154 |
|
|
155 |
/** |
|
156 |
* @throws IOException |
|
157 |
* @see com.hardcode.gdbms.engine.data.DataSource#getWhereFilter() |
|
158 |
*/ |
|
159 |
public long[] getWhereFilter() throws IOException { |
|
160 |
return indexes.getIndexes(); |
|
161 |
} |
|
154 | 162 |
} |
trunk/libraries/libGDBMS/src/com/hardcode/gdbms/engine/data/DataSource.java | ||
---|---|---|
1 | 1 |
package com.hardcode.gdbms.engine.data; |
2 | 2 |
|
3 |
import java.io.IOException; |
|
4 |
import java.util.BitSet; |
|
3 | 5 |
|
6 |
|
|
4 | 7 |
/** |
5 | 8 |
* Interfaz que define los origenes de datos para operaciones internas del |
6 | 9 |
* motor de base de datos |
... | ... | |
8 | 11 |
* @author Fernando Gonz?lez Cort?s |
9 | 12 |
*/ |
10 | 13 |
public interface DataSource extends FieldNameAccess, ReadDriver { |
11 |
/**
|
|
12 |
* Avisa al driver de que van a realizarse operaciones sobre ?l. El driver
|
|
13 |
* deber? de abrir el fichero, conectar a la base de datos
|
|
14 |
*
|
|
15 |
* @throws DriverException Si se produce alg?n error abriendo el DataSource
|
|
16 |
*/
|
|
17 |
void start() throws DriverException;
|
|
14 |
/**
|
|
15 |
* Avisa al driver de que van a realizarse operaciones sobre ?l. El driver
|
|
16 |
* deber? de abrir el fichero, conectar a la base de datos
|
|
17 |
*
|
|
18 |
* @throws DriverException Si se produce alg?n error abriendo el DataSource
|
|
19 |
*/
|
|
20 |
void start() throws DriverException;
|
|
18 | 21 |
|
19 |
/**
|
|
20 |
* Cierra el DataSource. Todo acceso que no se sit?e temporalmente entre un
|
|
21 |
* start y un stop tendr? un comportamiento indeterminado
|
|
22 |
*
|
|
23 |
* @throws DriverException Si se produce un error cerrando la fuente de
|
|
24 |
* datos
|
|
25 |
*/
|
|
26 |
void stop() throws DriverException;
|
|
22 |
/**
|
|
23 |
* Cierra el DataSource. Todo acceso que no se sit?e temporalmente entre un
|
|
24 |
* start y un stop tendr? un comportamiento indeterminado
|
|
25 |
*
|
|
26 |
* @throws DriverException Si se produce un error cerrando la fuente de
|
|
27 |
* datos
|
|
28 |
*/
|
|
29 |
void stop() throws DriverException;
|
|
27 | 30 |
|
28 |
/**
|
|
29 |
* Devuelve el nombre del DataSource
|
|
30 |
*
|
|
31 |
* @return nombre de la tabla
|
|
32 |
*/
|
|
33 |
String getName();
|
|
31 |
/**
|
|
32 |
* Devuelve el nombre del DataSource
|
|
33 |
*
|
|
34 |
* @return nombre de la tabla
|
|
35 |
*/
|
|
36 |
String getName();
|
|
34 | 37 |
|
35 |
/**
|
|
36 |
* Devuelve el dbms de DataSource, o null si no tiene uno solo
|
|
37 |
*
|
|
38 |
* @return nombre del dbms
|
|
39 |
*/
|
|
40 |
String getDBMS();
|
|
38 |
/**
|
|
39 |
* Devuelve el dbms de DataSource, o null si no tiene uno solo
|
|
40 |
*
|
|
41 |
* @return nombre del dbms
|
|
42 |
*/
|
|
43 |
String getDBMS();
|
|
41 | 44 |
|
42 |
/** |
|
43 |
* Devuelve true si el driver que hay por debajo permite ejecutar |
|
44 |
* instrucciones SQL (si implementa la interfaz Delegable |
|
45 |
* |
|
46 |
* @return boolean |
|
47 |
*/ |
|
48 |
ReadDriver getDriver(); |
|
45 |
/** |
|
46 |
* Devuelve true si el driver que hay por debajo permite ejecutar |
|
47 |
* instrucciones SQL (si implementa la interfaz Delegable |
|
48 |
* |
|
49 |
* @return boolean |
|
50 |
*/ |
|
51 |
ReadDriver getDriver(); |
|
52 |
|
|
53 |
/** |
|
54 |
* Devuelve el filtro que result? de la cl?usula where |
|
55 |
* de la instrucci?n que di? como resultado este DataSource. |
|
56 |
* |
|
57 |
* @return Filtro de la cl?usula where o null si el DataSource no es |
|
58 |
* resultado de una instrucci?n con cl?usula where |
|
59 |
* @throws IOException Si se produce un error accediendo a las estructuras de datos internas |
|
60 |
*/ |
|
61 |
long[] getWhereFilter() throws IOException; |
|
49 | 62 |
} |
trunk/libraries/libGDBMS/src/com/hardcode/gdbms/engine/data/DefaultDataSource.java | ||
---|---|---|
1 | 1 |
/* Generated by Together */ |
2 | 2 |
package com.hardcode.gdbms.engine.data; |
3 | 3 |
|
4 |
import java.util.BitSet; |
|
5 |
|
|
4 | 6 |
import com.hardcode.gdbms.engine.data.indexes.FixedIndexSet; |
5 | 7 |
/** |
6 | 8 |
* Implementaci?n del tipo de datos DataSource. Decorator sobre el driver |
... | ... | |
54 | 56 |
public String getDBMS() { |
55 | 57 |
return dbms; |
56 | 58 |
} |
59 |
|
|
60 |
public long[] getWhereFilter() { |
|
61 |
return null; |
|
62 |
} |
|
57 | 63 |
} |
trunk/libraries/libGDBMS/src/com/hardcode/gdbms/engine/data/indexes/IndexSetImpl.java | ||
---|---|---|
120 | 120 |
public void close() throws IOException { |
121 | 121 |
set.close(); |
122 | 122 |
} |
123 |
|
|
124 |
/** |
|
125 |
* @throws IOException |
|
126 |
* @see com.hardcode.gdbms.engine.data.indexes.VariableIndexSet#getIndexes() |
|
127 |
*/ |
|
128 |
public long[] getIndexes() throws IOException { |
|
129 |
return set.getIndexes(); |
|
130 |
} |
|
123 | 131 |
} |
trunk/libraries/libGDBMS/src/com/hardcode/gdbms/engine/PDataSource.java | ||
---|---|---|
1 | 1 |
package com.hardcode.gdbms.engine; |
2 | 2 |
|
3 |
import java.io.IOException; |
|
4 |
|
|
3 | 5 |
import com.hardcode.gdbms.engine.data.DataSource; |
4 | 6 |
import com.hardcode.gdbms.engine.data.DriverException; |
5 | 7 |
import com.hardcode.gdbms.engine.data.FieldNameAccessSupport; |
... | ... | |
203 | 205 |
public ReadDriver getDriver() { |
204 | 206 |
return null; |
205 | 207 |
} |
208 |
|
|
209 |
/** |
|
210 |
* @see com.hardcode.gdbms.engine.data.DataSource#getWhereFilter() |
|
211 |
*/ |
|
212 |
public long[] getWhereFilter() throws IOException { |
|
213 |
return null; |
|
214 |
} |
|
206 | 215 |
} |
trunk/libraries/libGDBMS/src/com/hardcode/gdbms/engine/UnionDataSource.java | ||
---|---|---|
1 | 1 |
package com.hardcode.gdbms.engine; |
2 | 2 |
|
3 |
import java.io.IOException; |
|
4 |
|
|
3 | 5 |
import com.hardcode.gdbms.engine.data.DataSource; |
4 | 6 |
import com.hardcode.gdbms.engine.data.DriverException; |
5 | 7 |
import com.hardcode.gdbms.engine.data.ReadDriver; |
... | ... | |
116 | 118 |
public ReadDriver getDriver() { |
117 | 119 |
return null; |
118 | 120 |
} |
121 |
|
|
122 |
/** |
|
123 |
* @see com.hardcode.gdbms.engine.data.DataSource#getWhereFilter() |
|
124 |
*/ |
|
125 |
public long[] getWhereFilter() throws IOException { |
|
126 |
return null; |
|
127 |
} |
|
119 | 128 |
} |
trunk/libraries/libGDBMS/src/com/hardcode/gdbms/engine/ProjectionDataSource.java | ||
---|---|---|
1 | 1 |
package com.hardcode.gdbms.engine; |
2 | 2 |
|
3 |
import java.io.IOException; |
|
4 |
|
|
3 | 5 |
import com.hardcode.gdbms.engine.data.DataSource; |
4 | 6 |
import com.hardcode.gdbms.engine.data.DriverException; |
5 | 7 |
import com.hardcode.gdbms.engine.data.ReadDriver; |
... | ... | |
142 | 144 |
public ReadDriver getDriver() { |
143 | 145 |
return null; |
144 | 146 |
} |
147 |
|
|
148 |
/** |
|
149 |
* @see com.hardcode.gdbms.engine.data.DataSource#getWhereFilter() |
|
150 |
*/ |
|
151 |
public long[] getWhereFilter() throws IOException { |
|
152 |
return null; |
|
153 |
} |
|
145 | 154 |
} |
Also available in: Unified diff