svn-gvsig-desktop / trunk / libraries / libGDBMS / src / com / hardcode / gdbms / engine / data / ReadDriver.java @ 466
History | View | Annotate | Download (1.76 KB)
1 |
package com.hardcode.gdbms.engine.data; |
---|---|
2 |
|
3 |
import com.hardcode.gdbms.engine.values.Value; |
4 |
|
5 |
|
6 |
/**
|
7 |
* Interfaz que define los m?todos de acceso de lectura
|
8 |
*
|
9 |
* @author Fernando Gonz?lez Cort?s
|
10 |
*/
|
11 |
public interface ReadDriver { |
12 |
public final static int FIELD_TYPE_BOOLEAN = 0; |
13 |
public final static int FIELD_TYPE_STRING = 5; |
14 |
public final static int FIELD_TYPE_DOUBLE = 4; |
15 |
public final static int FIELD_TYPE_FLOAT = 3; |
16 |
public final static int FIELD_TYPE_LONGINT = 2; |
17 |
public final static int FIELD_TYPE_INT = 1; |
18 |
|
19 |
/**
|
20 |
* Obtiene el valor que se encuentra en la fila y columna indicada
|
21 |
*
|
22 |
* @param rowIndex fila
|
23 |
* @param fieldId columna
|
24 |
*
|
25 |
* @return subclase de Value con el valor del origen de datos
|
26 |
*
|
27 |
* @throws DriverException Si se produce un error accediendo al DataSource
|
28 |
*/
|
29 |
public abstract Value getFieldValue(long rowIndex, int fieldId) |
30 |
throws DriverException;
|
31 |
|
32 |
/**
|
33 |
* Obtiene el n?mero de campos del DataSource
|
34 |
*
|
35 |
* @return
|
36 |
*
|
37 |
* @throws DriverException Si se produce alg?n error accediendo al
|
38 |
* DataSource
|
39 |
*/
|
40 |
public abstract int getFieldCount() throws DriverException; |
41 |
|
42 |
/**
|
43 |
* Devuelve el nombre del campo fieldId-?simo
|
44 |
*
|
45 |
* @param fieldId ?ndice del campo cuyo nombre se quiere obtener
|
46 |
*
|
47 |
* @return
|
48 |
*
|
49 |
* @throws DriverException Si se produce alg?n error accediendo al
|
50 |
* DataSource
|
51 |
*/
|
52 |
public abstract String getFieldName(int fieldId) throws DriverException; |
53 |
|
54 |
/**
|
55 |
* Obtiene el n?mero de registros del DataSource
|
56 |
*
|
57 |
* @return
|
58 |
*
|
59 |
* @throws DriverException Si se produce alg?n error accediendo al
|
60 |
* DataSource
|
61 |
*/
|
62 |
public abstract long getRowCount() throws DriverException; |
63 |
} |