|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hardcode.gdbms.engine.strategies.OperationDataSource
com.hardcode.gdbms.engine.strategies.FilteredDataSource
public class FilteredDataSource
Representa una fuente de datos que contiene una cláusula where mediante la cual se filtran los campos
| Field Summary |
|---|
| Fields inherited from interface com.hardcode.gdbms.engine.data.DataSource |
|---|
COHERENT_ROW_ORDER, DIRECT_MODE, DISPATCH, IGNORE, STORE |
| Constructor Summary | |
|---|---|
FilteredDataSource(DataSource source,
Expression whereExpression)
Creates a new FilteredDataSource object. |
|
| Method Summary | |
|---|---|
Value[] |
aggregatedFilter(Expression[] fields)
|
void |
filtrar()
Método que construye el array de índices de las posiciones que las filas filtradas ocupan en el DataSource origen |
Metadata |
getDataSourceMetadata()
Gets the meta data about the source of this DataSource |
int |
getFieldIndexByName(java.lang.String fieldName)
Obtiene el indice de un campo a partir de su nombre o -1 si no existe un campo con ese nombre |
Value |
getFieldValue(long rowIndex,
int fieldId)
Obtiene el valor que se encuentra en la fila y columna indicada |
Memento |
getMemento()
Gets a memento object with the current status of the DataSource |
long |
getRowCount()
Obtiene el número de registros del DataSource |
long[] |
getWhereFilter()
DOCUMENT ME! |
void |
start()
Opens the DataSource to access the data it contains. |
void |
stop()
Closes the DataSource. |
| Methods inherited from class com.hardcode.gdbms.engine.strategies.OperationDataSource |
|---|
addEditionListener, addField, addField, addMetadataEditionListener, addSelectionListener, beginTrans, canRedo, canUndo, check, commitTrans, deleteRow, getAlias, getAsString, getDataSourceFactory, getDispatchingMode, getDriver, getDriverMetadata, getFieldNames, getName, getRow, getSelectedRows, getSQL, insertEmptyRow, insertEmptyRowAt, insertFilledRow, insertFilledRowAt, isModified, redo, remove, removeEditionListener, removeField, removeMetadataEditionListener, removeSelectionListener, rollBackTrans, saveData, setAlias, setDataSourceFactory, setDispatchingMode, setFieldName, setFieldValue, setName, setSelectedRows, setSQL, undo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FilteredDataSource(DataSource source,
Expression whereExpression)
source - DataSource que se va a filtrarwhereExpression - Expresión de la cláusula where| Method Detail |
|---|
public Value[] aggregatedFilter(Expression[] fields)
throws IncompatibleTypesException,
DriverException,
EvaluationException,
java.io.IOException
IncompatibleTypesException
DriverException
EvaluationException
java.io.IOException
public void filtrar()
throws DriverException,
java.io.IOException,
SemanticException,
EvaluationException
DriverException - Si se produce un fallo en el driver al acceder a
los datos
java.io.IOException - Si se produce un error usando las estructuras de
datos internas
SemanticException - Si se produce algún error semántico al evaluar
la expresión
IncompatibleTypesException - Si la expresión where no evalua a
booleano
EvaluationException - If the expression evaluation fails
public void start()
throws DriverException
DataSource
DriverException - if the operation failscom.hardcode.gdbms.engine.data.DataSource#open()
public void stop()
throws DriverException
DataSource
DriverException - If the operation failscom.hardcode.gdbms.engine.data.DataSource#close()
public int getFieldIndexByName(java.lang.String fieldName)
throws DriverException
DataSource
getFieldIndexByName in interface DataSourcegetFieldIndexByName in class OperationDataSourcefieldName - Nombre del campo
DriverException - Si se produce un error accediendo a los datoscom.hardcode.gdbms.engine.data.FieldNameAccess#getFieldIndexByName(java.lang.String)
public Value getFieldValue(long rowIndex,
int fieldId)
throws DriverException
ReadAccess
rowIndex - filafieldId - columna
DriverException - Si se produce un error accediendo al DataSourceReadAccess.getFieldValue(long,
int)
public long getRowCount()
throws DriverException
ReadAccess
DriverException - Si se produce algún error accediendo al
DataSourceReadAccess.getRowCount()
public long[] getWhereFilter()
throws java.io.IOException
getWhereFilter in interface DataSourcegetWhereFilter in class OperationDataSourcejava.io.IOExceptionDataSource.getWhereFilter()
public Memento getMemento()
throws MementoException
DataSource
getMemento in interface DataSourcegetMemento in class OperationDataSourceMementoException - If the state cannot be obtainedDataSource.getMemento()
public Metadata getDataSourceMetadata()
throws DriverException
DataSource
DriverException - If cannot get the DataSource metadata
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||