gate.db
Class OracleDataStore
java.lang.Object
|
+--gate.util.AbstractFeatureBearer
|
+--gate.persist.SerialDataStore
|
+--gate.db.Database
|
+--gate.db.OracleDataStore
- All Implemented Interfaces:
- DataStore, FeatureBearer
- public class OracleDataStore
- extends Database
Provides connection to an Oracle Database.
Methods inherited from class gate.db.Database |
deleteFeaturesOf, getCatalog, getConnection, getFeatures, getSchema, isConnected, readFeaturesOf, release, setFeatures, takeBackConnection, writeFeaturesOf |
Methods inherited from class gate.persist.SerialDataStore |
addDatastoreListener, adopt, close, create, delete, delete, equals, getLr, getLrIds, getLrName, getLrNames, getLrTypes, getStorageDir, getStorageUrl, hashCode, isAutoSaving, open, removeDatastoreListener, setAutoSaving, setStorageDir, setStorageUrl, sync, toString |
OracleDataStore
public OracleDataStore(Driver driver,
String url,
String user,
String password,
String catalog,
String schema)
- Constructs a OracleDataStore
- Parameters:
driver
- the driver used to connect to the database.
We didn't choose to default this value to any specific Oracle Jdbc
drivers because this option should belong to the user.url
- The URL of the database.user
- the usernamepassword
- the passwordcatalog
- the catalog in which the Gate2 table reside.schema
- The schema in which the Gate2 table reside.
readObjectBlob
public Object readObjectBlob(ResultSet rs,
Connection con,
String columnName)
throws SQLException
- Reads a Object from a BLOB on the current row in a result set.
Note that the Blob must contain a java Object saved using serialisation.
- Overrides:
readObjectBlob
in class Database
- Parameters:
rs
- a result set positioned on the row from which the BLOB is to
be readcolumnName
- the name of the column containing the BLOB on the
current row.- Returns:
- an object containing the blob.
putObject
public void putObject(PreparedStatement ps,
int place,
Object value)
throws SQLException
- Acts as a setBlob for the provided prepared statement on the position
indicated by place.
- Overrides:
putObject
in class Database
- Parameters:
ps
- A prepared statement where the blob will be set.place
- The position on the prepared statement where the blob
will be set.value
- The object that will be serialised and converted into a blob.
getDictionary
public Map getDictionary()
- Overrides:
getDictionary
in class Database