com.hardcode.gdbms.engine.data.command
Class AbstractUndoableDataSource

java.lang.Object
  extended by com.hardcode.gdbms.engine.data.command.AbstractUndoableDataSource
Direct Known Subclasses:
UndoableAlphanumericDataSource, UndoableSpatialDataSource

public abstract class AbstractUndoableDataSource
extends java.lang.Object


Field Summary
protected  CommandStack cs
           
protected  EditableDataSource dataSource
           
 
Constructor Summary
AbstractUndoableDataSource(DataSource ds)
           
 
Method Summary
 void addEditionListener(EditionListener listener)
           
 void addField(java.lang.String name, java.lang.String type)
           
 void addField(java.lang.String name, java.lang.String driverType, java.lang.String[] paramNames, java.lang.String[] paramValues)
           
 void addMetadataEditionListener(MetadataEditionListener listener)
           
 void addSelectionListener(SelectionListener listener)
           
 void beginTrans()
           
 boolean canRedo()
           
 boolean canUndo()
           
 java.lang.String check(int fieldId, Value value)
           
 void commitTrans()
           
 java.lang.String getAlias()
           
 java.lang.String getAsString()
           
 DataSourceFactory getDataSourceFactory()
           
 Metadata getDataSourceMetadata()
           
 int getDispatchingMode()
           
 GDBMSDriver getDriver()
           
 DriverMetadata getDriverMetadata()
           
protected  Value[] getEmptyRow()
           
 int getFieldIndexByName(java.lang.String fieldName)
           
 java.lang.String[] getFieldNames()
           
 Value getFieldValue(long rowIndex, int fieldId)
           
 Memento getMemento()
           
 java.lang.String getName()
           
 Value[] getRow(long rowIndex)
           
 long getRowCount()
           
 int[] getSelectedRows()
           
 long[] getWhereFilter()
           
 boolean isModified()
           
 void redo()
           
 void remove()
           
 void removeEditionListener(EditionListener listener)
           
 void removeField(int index)
           
 void removeMetadataEditionListener(MetadataEditionListener listener)
           
 void removeSelectionListener(SelectionListener listener)
           
 void rollBackTrans()
           
 void saveData(DataSource ds)
           
 void setDataSourceFactory(DataSourceFactory dsf)
           
 void setDispatchingMode(int dispatchingMode)
           
 void setFieldName(int index, java.lang.String name)
           
 void setFieldValue(long row, int fieldId, Value value)
           
 void setSelectedRows(int[] sel)
           
 void start()
           
 void stop()
           
 void undo()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataSource

protected EditableDataSource dataSource

cs

protected CommandStack cs
Constructor Detail

AbstractUndoableDataSource

public AbstractUndoableDataSource(DataSource ds)
Method Detail

beginTrans

public void beginTrans()
                throws DriverException
Throws:
DriverException

commitTrans

public void commitTrans()
                 throws DriverException,
                        FreeingResourcesException
Throws:
DriverException
FreeingResourcesException

getAlias

public java.lang.String getAlias()

getAsString

public java.lang.String getAsString()
                             throws DriverException
Throws:
DriverException

getDataSourceFactory

public DataSourceFactory getDataSourceFactory()

getDataSourceMetadata

public Metadata getDataSourceMetadata()
                               throws DriverException
Throws:
DriverException

getFieldIndexByName

public int getFieldIndexByName(java.lang.String fieldName)
                        throws DriverException
Throws:
DriverException

getFieldNames

public java.lang.String[] getFieldNames()
                                 throws DriverException
Throws:
DriverException

getFieldValue

public Value getFieldValue(long rowIndex,
                           int fieldId)
                    throws DriverException
Throws:
DriverException

getMemento

public Memento getMemento()
                   throws MementoException
Throws:
MementoException

getName

public java.lang.String getName()

getRow

public Value[] getRow(long rowIndex)
               throws DriverException
Throws:
DriverException

getRowCount

public long getRowCount()
                 throws DriverException
Throws:
DriverException

getWhereFilter

public long[] getWhereFilter()
                      throws java.io.IOException
Throws:
java.io.IOException

remove

public void remove()
            throws DriverException
Throws:
DriverException

saveData

public void saveData(DataSource ds)
              throws DriverException
Throws:
DriverException

setDataSourceFactory

public void setDataSourceFactory(DataSourceFactory dsf)

start

public void start()
           throws DriverException
Throws:
DriverException

stop

public void stop()
          throws DriverException,
                 AlreadyClosedException
Throws:
DriverException
AlreadyClosedException

setFieldValue

public void setFieldValue(long row,
                          int fieldId,
                          Value value)
                   throws DriverException
Throws:
DriverException

canRedo

public boolean canRedo()

canUndo

public boolean canUndo()

redo

public void redo()
          throws DriverException
Throws:
DriverException

undo

public void undo()
          throws DriverException
Throws:
DriverException

rollBackTrans

public void rollBackTrans()
                   throws DriverException
Throws:
DriverException

getEmptyRow

protected Value[] getEmptyRow()
                       throws DriverException
Throws:
DriverException

addEditionListener

public void addEditionListener(EditionListener listener)

removeEditionListener

public void removeEditionListener(EditionListener listener)

setDispatchingMode

public void setDispatchingMode(int dispatchingMode)

getDispatchingMode

public int getDispatchingMode()

addField

public void addField(java.lang.String name,
                     java.lang.String type)
              throws DriverException
Throws:
DriverException

removeField

public void removeField(int index)
                 throws DriverException
Throws:
DriverException

setFieldName

public void setFieldName(int index,
                         java.lang.String name)
                  throws DriverException
Throws:
DriverException

addMetadataEditionListener

public void addMetadataEditionListener(MetadataEditionListener listener)

removeMetadataEditionListener

public void removeMetadataEditionListener(MetadataEditionListener listener)

getDriverMetadata

public DriverMetadata getDriverMetadata()
                                 throws DriverException
Throws:
DriverException

addField

public void addField(java.lang.String name,
                     java.lang.String driverType,
                     java.lang.String[] paramNames,
                     java.lang.String[] paramValues)
              throws DriverException
Throws:
DriverException

check

public java.lang.String check(int fieldId,
                              Value value)
                       throws DriverException
Throws:
DriverException

getDriver

public GDBMSDriver getDriver()

isModified

public boolean isModified()

getSelectedRows

public int[] getSelectedRows()

setSelectedRows

public void setSelectedRows(int[] sel)

addSelectionListener

public void addSelectionListener(SelectionListener listener)

removeSelectionListener

public void removeSelectionListener(SelectionListener listener)


Copyright © 2005-2006 . All Rights Reserved.