|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataSource
Interfaz que define los origenes de datos para operaciones internas del motor de base de datos
Field Summary | |
---|---|
static int |
COHERENT_ROW_ORDER
|
static int |
DIRECT_MODE
|
static int |
DISPATCH
All edition events will be notified to the listeners |
static int |
IGNORE
None of the edition events will be notified to the listeners |
static int |
STORE
The edition events will be stored but not notified. |
Method Summary | |
---|---|
void |
addEditionListener(EditionListener listener)
Adds an EditionListener to the DataSource |
void |
addField(java.lang.String name,
java.lang.String driverType)
Adds a field to the DataSource |
void |
addField(java.lang.String name,
java.lang.String driverType,
java.lang.String[] paramNames,
java.lang.String[] paramValues)
Adds a field to the DataSource |
void |
addMetadataEditionListener(MetadataEditionListener listener)
Adds a listener for the Metadata edition events |
void |
addSelectionListener(SelectionListener listener)
Adds an SelectionListener to the DataSource |
void |
beginTrans()
Begins a transaction |
boolean |
canRedo()
|
boolean |
canUndo()
|
java.lang.String |
check(int fieldId,
Value value)
Checks if this value is a valid one for the specified field. |
void |
commitTrans()
Commits the changes made during the transaction. |
java.lang.String |
getAlias()
Returns the alias used in this DataSource |
java.lang.String |
getAsString()
Gets the string representation of this DataSource |
DataSourceFactory |
getDataSourceFactory()
gets a reference to the factory object that created the DataSource |
Metadata |
getDataSourceMetadata()
Gets the meta data about the source of this DataSource |
int |
getDispatchingMode()
Gets the dispatchingMode property |
GDBMSDriver |
getDriver()
Gets the driver which this DataSource is over. |
DriverMetadata |
getDriverMetadata()
Gets the driver metadata |
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 |
java.lang.String[] |
getFieldNames()
Gets the field names array |
Memento |
getMemento()
Gets a memento object with the current status of the DataSource |
java.lang.String |
getName()
Devuelve el nombre del DataSource |
Value[] |
getRow(long rowIndex)
Gets the value of all fields at the specified row |
int[] |
getSelectedRows()
Gets the row selection |
long[] |
getWhereFilter()
Devuelve el filtro que resultó de la cláusula where de la instrucción que dió como resultado este DataSource. |
void |
insertEmptyRow()
Inserts a row at the end of the dataware |
void |
insertFilledRow(Value[] values)
Inserts a row at the end of the dataware with the specified values |
boolean |
isModified()
Returns true if the DataSource has been modified since it was created. |
void |
redo()
Redoes the last undone edition action |
void |
remove()
Removes from the system the data source this DataSource instance represents. |
void |
removeEditionListener(EditionListener listener)
Removes an EditionListener from the DataSource |
void |
removeField(int index)
Removes the field at the indexth position |
void |
removeMetadataEditionListener(MetadataEditionListener listener)
Removes a listener for the Metadata edition events |
void |
removeSelectionListener(SelectionListener listener)
Removes an SelectionListener from the DataSource |
void |
rollBackTrans()
Cancels the changes made during the transaction |
void |
saveData(DataSource ds)
Saves the data in the parameter DataSource in the source of this DataSource. |
void |
setDataSourceFactory(DataSourceFactory dsf)
Sets the DataSourceFactory that created the DataSource instance |
void |
setDispatchingMode(int dispatchingMode)
Defines the behaviour of the DataSource when an edition event happens. |
void |
setFieldName(int index,
java.lang.String name)
Sets the name of the field at the indexth position |
void |
setFieldValue(long row,
int fieldId,
Value value)
Sets the value of a cell of the table. |
void |
setSelectedRows(int[] sel)
Sets the row selection |
void |
start()
Opens the DataSource to access the data it contains. |
void |
stop()
Closes the DataSource. |
void |
undo()
Undoes the last edition action |
Methods inherited from interface com.hardcode.gdbms.engine.data.driver.ReadAccess |
---|
getFieldValue, getRowCount |
Field Detail |
---|
static final int DIRECT_MODE
static final int COHERENT_ROW_ORDER
static final int DISPATCH
static final int IGNORE
static final int STORE
Method Detail |
---|
void start() throws DriverException
DriverException
- if the operation failsvoid stop() throws DriverException, AlreadyClosedException
DriverException
- If the operation fails
AlreadyClosedException
java.lang.String getName()
java.lang.String getAlias()
long[] getWhereFilter() throws java.io.IOException
java.io.IOException
- Si se produce un error accediendo a las estructuras
de datos internasDataSourceFactory getDataSourceFactory()
Memento getMemento() throws MementoException
MementoException
- If the state cannot be obtainedvoid setDataSourceFactory(DataSourceFactory dsf)
dsf
- DataSourceFactoryjava.lang.String getAsString() throws DriverException
DriverException
void remove() throws DriverException
DriverException
- if the DataSource original system could not be
cleaned properlyValue[] getRow(long rowIndex) throws DriverException
rowIndex
- index of the row to be retrieved
DriverException
- If the access failsjava.lang.String[] getFieldNames() throws DriverException
DriverException
- if the access failsint getFieldIndexByName(java.lang.String fieldName) throws DriverException
fieldName
- Nombre del campo
DriverException
- Si se produce un error accediendo a los datosvoid insertFilledRow(Value[] values) throws DriverException
values
- Values of the inserted row fields in the field order
DriverException
- if the row could not be insertedvoid insertEmptyRow() throws DriverException
DriverException
- if the row could not be insertedvoid beginTrans() throws DriverException
DriverException
- If the transaction could not be startedvoid commitTrans() throws DriverException, FreeingResourcesException
DriverException
- If the transaction could not be commited
FreeingResourcesException
- The commit was correctly done but a problem occured
while freeing resourcesvoid rollBackTrans() throws DriverException
DriverException
- If the transaction could not be cancelledvoid setFieldValue(long row, int fieldId, Value value) throws DriverException
row
- row to updatefieldId
- field to updatevalue
- Value to update
DriverException
- If the operation failedvoid saveData(DataSource ds) throws DriverException
ds
- DataSource with the data
DriverException
- if the operation failsMetadata getDataSourceMetadata() throws DriverException
DriverException
- If cannot get the DataSource metadatavoid redo() throws DriverException
DriverException
void undo() throws DriverException
DriverException
boolean canRedo()
boolean canUndo()
void addMetadataEditionListener(MetadataEditionListener listener)
listener
- void removeMetadataEditionListener(MetadataEditionListener listener)
listener
- void addEditionListener(EditionListener listener)
listener
- void removeEditionListener(EditionListener listener)
listener
- void addSelectionListener(SelectionListener listener)
listener
- void removeSelectionListener(SelectionListener listener)
listener
- void setDispatchingMode(int dispatchingMode)
dispatchingMode
- int getDispatchingMode()
void addField(java.lang.String name, java.lang.String driverType) throws DriverException
name
- name of the fielddriverType
- driver specific type name
DriverException
void addField(java.lang.String name, java.lang.String driverType, java.lang.String[] paramNames, java.lang.String[] paramValues) throws DriverException
name
- name of the fielddriverType
- driver specific type name
DriverException
void removeField(int index) throws DriverException
i
-
DriverException
void setFieldName(int index, java.lang.String name) throws DriverException
index
- name
-
DriverException
DriverMetadata getDriverMetadata() throws DriverException
DriverException
java.lang.String check(int fieldId, Value value) throws DriverException
fieldId
- value
-
DriverException
GDBMSDriver getDriver()
boolean isModified()
void setSelectedRows(int[] sel)
is
- int[] getSelectedRows()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |