|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hardcode.gdbms.engine.strategies.OperationDataSource
public abstract class OperationDataSource
operation layer DataSource base class
Field Summary |
---|
Fields inherited from interface com.hardcode.gdbms.engine.data.DataSource |
---|
COHERENT_ROW_ORDER, DIRECT_MODE, DISPATCH, IGNORE, STORE |
Constructor Summary | |
---|---|
OperationDataSource()
|
Method Summary | |
---|---|
void |
addEditionListener(EditionListener listener)
Adds an EditionListener to the DataSource |
void |
addField(java.lang.String name,
java.lang.String type)
Adds a field to the DataSource |
void |
addField(java.lang.String name,
java.lang.String type,
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. |
void |
deleteRow(long rowId)
|
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 |
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 name)
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 |
java.lang.String |
getSQL()
Gets the SQL string that created this DataSource |
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 |
insertEmptyRowAt(long index)
|
void |
insertFilledRow(Value[] values)
Inserts a row at the end of the dataware with the specified values |
void |
insertFilledRowAt(long index,
Value[] 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 |
setAlias(java.lang.String alias)
|
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 |
setName(java.lang.String name)
|
void |
setSelectedRows(int[] sel)
Sets the row selection |
void |
setSQL(java.lang.String sql)
sets the sql query of this operation DataSource. |
void |
undo()
Undoes the last edition action |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.hardcode.gdbms.engine.data.DataSource |
---|
getDataSourceMetadata, start, stop |
Methods inherited from interface com.hardcode.gdbms.engine.data.driver.ReadAccess |
---|
getFieldValue, getRowCount |
Constructor Detail |
---|
public OperationDataSource()
Method Detail |
---|
public long[] getWhereFilter() throws java.io.IOException
DataSource
getWhereFilter
in interface DataSource
java.io.IOException
- Si se produce un error accediendo a las estructuras
de datos internasDataSource.getWhereFilter()
public DataSourceFactory getDataSourceFactory()
DataSource
getDataSourceFactory
in interface DataSource
DataSource.getDataSourceFactory()
public void setDataSourceFactory(DataSourceFactory dsf)
DataSource
setDataSourceFactory
in interface DataSource
dsf
- DataSourceFactoryDataSource.setDataSourceFactory(com.hardcode.gdbms.engine.data.DataSourceFactory)
public void setSQL(java.lang.String sql)
sql
- querypublic java.lang.String getSQL()
public void remove() throws DriverException
DataSource
remove
in interface DataSource
DriverException
- if the DataSource original system could not be
cleaned properlyDataSource.remove()
public void deleteRow(long rowId) throws DriverException
DriverException
public void insertFilledRow(Value[] values) throws DriverException
DataSource
insertFilledRow
in interface DataSource
values
- Values of the inserted row fields in the field order
DriverException
- if the row could not be insertedpublic void insertEmptyRow() throws DriverException
DataSource
insertEmptyRow
in interface DataSource
DriverException
- if the row could not be insertedpublic void beginTrans() throws DriverException
DataSource
beginTrans
in interface DataSource
DriverException
- If the transaction could not be startedpublic void commitTrans() throws DriverException
DataSource
commitTrans
in interface DataSource
DriverException
- If the transaction could not be commitedpublic void rollBackTrans() throws DriverException
DataSource
rollBackTrans
in interface DataSource
DriverException
- If the transaction could not be cancelledpublic void setFieldValue(long row, int fieldId, Value value) throws DriverException
DataSource
setFieldValue
in interface DataSource
row
- row to updatefieldId
- field to updatevalue
- Value to update
DriverException
- If the operation failedpublic void insertEmptyRowAt(long index) throws DriverException
DriverException
public void insertFilledRowAt(long index, Value[] values) throws DriverException
DriverException
public void saveData(DataSource ds) throws DriverException
DataSource
saveData
in interface DataSource
ds
- DataSource with the data
DriverException
- if the operation failspublic java.lang.String getAlias()
DataSource
getAlias
in interface DataSource
DataSource.getAlias()
public java.lang.String getAsString() throws DriverException
DataSource
getAsString
in interface DataSource
DriverException
DataSource.getAsString()
public java.lang.String[] getFieldNames() throws DriverException
DataSource
getFieldNames
in interface DataSource
DriverException
- if the access failsDataSource.getFieldNames()
public int getFieldIndexByName(java.lang.String name) throws DriverException
DataSource
getFieldIndexByName
in interface DataSource
name
- Nombre del campo
DriverException
DataSource.getFieldIndexByName(java.lang.String)
public Memento getMemento() throws MementoException
DataSource
getMemento
in interface DataSource
MementoException
- If the state cannot be obtainedDataSource.getMemento()
public java.lang.String getName()
DataSource
getName
in interface DataSource
DataSource.getName()
public Value[] getRow(long rowIndex) throws DriverException
DataSource
getRow
in interface DataSource
rowIndex
- index of the row to be retrieved
DriverException
- If the access failsDataSource.getRow(long)
public void setAlias(java.lang.String alias)
alias
- public void setName(java.lang.String name)
name
- public boolean canRedo()
canRedo
in interface DataSource
public boolean canUndo()
canUndo
in interface DataSource
public void redo() throws DriverException
DataSource
redo
in interface DataSource
DriverException
public void undo() throws DriverException
DataSource
undo
in interface DataSource
DriverException
public void addEditionListener(EditionListener listener)
DataSource
addEditionListener
in interface DataSource
public void removeEditionListener(EditionListener listener)
DataSource
removeEditionListener
in interface DataSource
public void addMetadataEditionListener(MetadataEditionListener listener)
DataSource
addMetadataEditionListener
in interface DataSource
public void removeMetadataEditionListener(MetadataEditionListener listener)
DataSource
removeMetadataEditionListener
in interface DataSource
public void setDispatchingMode(int dispatchingMode)
DataSource
setDispatchingMode
in interface DataSource
public int getDispatchingMode()
DataSource
getDispatchingMode
in interface DataSource
public void addField(java.lang.String name, java.lang.String type)
DataSource
addField
in interface DataSource
name
- name of the fieldtype
- driver specific type namepublic void addField(java.lang.String name, java.lang.String type, java.lang.String[] paramNames, java.lang.String[] paramValues)
DataSource
addField
in interface DataSource
name
- name of the fieldtype
- driver specific type namepublic void removeField(int index)
DataSource
removeField
in interface DataSource
public void setFieldName(int index, java.lang.String name)
DataSource
setFieldName
in interface DataSource
public DriverMetadata getDriverMetadata()
DataSource
getDriverMetadata
in interface DataSource
public java.lang.String check(int fieldId, Value value) throws DriverException
DataSource
check
in interface DataSource
DriverException
public GDBMSDriver getDriver()
DataSource
getDriver
in interface DataSource
public boolean isModified()
DataSource
isModified
in interface DataSource
public int[] getSelectedRows()
DataSource
getSelectedRows
in interface DataSource
public void setSelectedRows(int[] sel)
DataSource
setSelectedRows
in interface DataSource
public void addSelectionListener(SelectionListener listener)
DataSource
addSelectionListener
in interface DataSource
public void removeSelectionListener(SelectionListener listener)
DataSource
removeSelectionListener
in interface DataSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |