com.hardcode.gdbms.engine.data.db
Class DBDataSourceSupport

java.lang.Object
  extended by com.hardcode.gdbms.engine.data.db.DBDataSourceSupport
Direct Known Subclasses:
SpatialDBDataSourceSupport

public class DBDataSourceSupport
extends java.lang.Object


Field Summary
protected  java.sql.Connection con
           
protected  DBSource def
           
protected  DBDriver driver
           
protected  DataSource ds
           
protected  OpenCloseCounter ocCounter
           
 
Constructor Summary
DBDataSourceSupport(DataSource ds, DBSource def, DBDriver driver)
           
 
Method Summary
 java.lang.String check(Field field, Value value)
           
 void execute(java.lang.String sql)
           
 java.sql.Connection getConnection()
          Get's a connection to the driver
 Metadata getDataSourceMetadata()
           
 DBDriver getDriver()
           
 DriverMetadata getDriverMetadata()
           
 Value getOriginalFieldValue(long rowIndex, int fieldId)
           
 long getOriginalRowCount()
           
 int getPKCardinality()
           
 java.lang.String getPKName(int fieldId)
           
 java.lang.String[] getPKNames()
           
 ValueCollection getPKValue(long rowIndex)
          Gets the value of the primary key just before the beginTrans call
 int[] getPrimaryKeys()
           
 void saveData(DataSource dataSource)
           
 boolean start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ocCounter

protected OpenCloseCounter ocCounter

driver

protected DBDriver driver

con

protected java.sql.Connection con

def

protected DBSource def

ds

protected DataSource ds
Constructor Detail

DBDataSourceSupport

public DBDataSourceSupport(DataSource ds,
                           DBSource def,
                           DBDriver driver)
Method Detail

start

public boolean start()
              throws DriverException
Throws:
DriverException

stop

public void stop()
          throws DriverException
Throws:
DriverException

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Get's a connection to the driver

Returns:
Connection
Throws:
java.sql.SQLException - if the connection cannot be established

getOriginalFieldValue

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

getOriginalRowCount

public long getOriginalRowCount()
                         throws DriverException
Throws:
DriverException

execute

public void execute(java.lang.String sql)
             throws java.sql.SQLException
Throws:
java.sql.SQLException

getPKValue

public ValueCollection getPKValue(long rowIndex)
                           throws DriverException
Gets the value of the primary key just before the beginTrans call

Parameters:
rowIndex - Index of the row
Returns:
Throws:
DriverException

getPrimaryKeys

public int[] getPrimaryKeys()
                     throws DriverException
Throws:
DriverException
See Also:
com.hardcode.gdbms.engine.data.DataSource#getPrimaryKeys()

getPKName

public java.lang.String getPKName(int fieldId)
                           throws DriverException
Throws:
DriverException

getPKCardinality

public int getPKCardinality()
                     throws DriverException
Throws:
DriverException

getPKNames

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

getDataSourceMetadata

public Metadata getDataSourceMetadata()
                               throws DriverException
Throws:
DriverException

saveData

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

getDriverMetadata

public DriverMetadata getDriverMetadata()
                                 throws DriverException
Throws:
DriverException

check

public java.lang.String check(Field field,
                              Value value)
                       throws DriverException
Throws:
DriverException

getDriver

public DBDriver getDriver()


Copyright © 2005-2006 . All Rights Reserved.