com.hardcode.gdbms.engine.data
Class AbstractDataSource

java.lang.Object
  extended by com.hardcode.gdbms.engine.data.AbstractDataSource
All Implemented Interfaces:
DataSource, ReadAccess

public abstract class AbstractDataSource
extends java.lang.Object
implements DataSource


Field Summary
 
Fields inherited from interface com.hardcode.gdbms.engine.data.DataSource
COHERENT_ROW_ORDER, DIRECT_MODE, DISPATCH, IGNORE, STORE
 
Constructor Summary
AbstractDataSource(java.lang.String name, java.lang.String alias)
           
 
Method Summary
 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
 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
 long[] getWhereFilter()
          Devuelve el filtro que resultó de la cláusula where de la instrucción que dió como resultado este DataSource.
 void remove()
          Removes from the system the data source this DataSource instance represents.
 void setAlias(java.lang.String alias)
           
 void setDataSourceFactory(DataSourceFactory dsf)
          Sets the DataSourceFactory that created the DataSource instance
 void setName(java.lang.String name)
           
 
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
addEditionListener, addField, addField, addMetadataEditionListener, addSelectionListener, beginTrans, canRedo, canUndo, check, commitTrans, getDataSourceMetadata, getDispatchingMode, getDriver, getDriverMetadata, getFieldIndexByName, getSelectedRows, insertEmptyRow, insertFilledRow, isModified, redo, removeEditionListener, removeField, removeMetadataEditionListener, removeSelectionListener, rollBackTrans, saveData, setDispatchingMode, setFieldName, setFieldValue, setSelectedRows, start, stop, undo
 
Methods inherited from interface com.hardcode.gdbms.engine.data.driver.ReadAccess
getFieldValue, getRowCount
 

Constructor Detail

AbstractDataSource

public AbstractDataSource(java.lang.String name,
                          java.lang.String alias)
Method Detail

setName

public void setName(java.lang.String name)

getAlias

public java.lang.String getAlias()
Description copied from interface: DataSource
Returns the alias used in this DataSource

Specified by:
getAlias in interface DataSource
Returns:
String

getAsString

public java.lang.String getAsString()
                             throws DriverException
Description copied from interface: DataSource
Gets the string representation of this DataSource

Specified by:
getAsString in interface DataSource
Returns:
String
Throws:
DriverException

getDataSourceFactory

public DataSourceFactory getDataSourceFactory()
Description copied from interface: DataSource
gets a reference to the factory object that created the DataSource

Specified by:
getDataSourceFactory in interface DataSource
Returns:
DataSourceFactory

getFieldNames

public java.lang.String[] getFieldNames()
                                 throws DriverException
Description copied from interface: DataSource
Gets the field names array

Specified by:
getFieldNames in interface DataSource
Returns:
String[]
Throws:
DriverException - if the access fails

getMemento

public Memento getMemento()
                   throws MementoException
Description copied from interface: DataSource
Gets a memento object with the current status of the DataSource

Specified by:
getMemento in interface DataSource
Returns:
DataSourceMemento
Throws:
MementoException - If the state cannot be obtained

getName

public java.lang.String getName()
Description copied from interface: DataSource
Devuelve el nombre del DataSource

Specified by:
getName in interface DataSource
Returns:
nombre de la tabla

getRow

public Value[] getRow(long rowIndex)
               throws DriverException
Description copied from interface: DataSource
Gets the value of all fields at the specified row

Specified by:
getRow in interface DataSource
Parameters:
rowIndex - index of the row to be retrieved
Returns:
Value[]
Throws:
DriverException - If the access fails

getWhereFilter

public long[] getWhereFilter()
                      throws java.io.IOException
Description copied from interface: DataSource
Devuelve el filtro que resultó de la cláusula where de la instrucción que dió como resultado este DataSource.

Specified by:
getWhereFilter in interface DataSource
Returns:
Filtro de la cláusula where o null si el DataSource no es resultado de una instrucción con cláusula where
Throws:
java.io.IOException - Si se produce un error accediendo a las estructuras de datos internas

remove

public void remove()
            throws DriverException
Description copied from interface: DataSource
Removes from the system the data source this DataSource instance represents. No method can be called and no DataSource instance can be obtained from the system after calling this method.

Specified by:
remove in interface DataSource
Throws:
DriverException - if the DataSource original system could not be cleaned properly

setAlias

public void setAlias(java.lang.String alias)

setDataSourceFactory

public void setDataSourceFactory(DataSourceFactory dsf)
Description copied from interface: DataSource
Sets the DataSourceFactory that created the DataSource instance

Specified by:
setDataSourceFactory in interface DataSource
Parameters:
dsf - DataSourceFactory


Copyright © 2005-2006 . All Rights Reserved.