|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.io.DBAccess
Field Summary | |
protected java.sql.Connection |
con
|
private DBConnectionPool |
pool
|
Constructor Summary | |
DBAccess(java.sql.Connection con)
constructor |
|
DBAccess(java.sql.Connection con,
boolean autoCommit)
constructor |
|
DBAccess(java.lang.String driver,
java.lang.String logon,
java.util.Properties properties)
|
|
DBAccess(java.lang.String driver,
java.lang.String logon,
java.util.Properties properties,
boolean autoCommit)
|
|
DBAccess(java.lang.String driver,
java.lang.String logon,
java.lang.String user,
java.lang.String password)
|
|
DBAccess(java.lang.String driver,
java.lang.String logon,
java.lang.String user,
java.lang.String password,
boolean autoCommit)
|
Method Summary | |
void |
commit()
commits the perfomerd queries, inserts and updates if autoCommit is set to false. |
protected java.lang.String |
escape(java.lang.String query)
escapes characters depending on the database vendor |
void |
executeStatement(java.lang.String sql)
Performs the given SQL-statement against the database. |
java.util.HashMap |
getColumnTypes(java.lang.String table,
java.lang.String[] columns)
returns a HashMap that maps a column to a data type. if null is submitted for columns all columns are considered. |
java.util.HashMap |
getColumnTypesAsInt(java.lang.String table,
java.lang.String[] columns)
returns a HashMap that maps a column to a data type. if null is submitted for columns all columns are considered. |
java.sql.Connection |
getConnection()
returns the SQL connection encapsulated by the object |
java.lang.String |
getDataBaseVendor()
returns the database vendor the access id made to |
void |
kill()
|
protected java.lang.String |
mapTypes(int type)
|
void |
performInsert(java.lang.String insert)
performs the insertion described by the submitted SQL-Statement |
void |
performInsert(java.lang.String[] insert)
performs the insertion described by the submitted SQL-Statement |
java.lang.Object |
performQuery(java.lang.String query)
perfomrs a general query against a database. |
java.lang.Object |
performQuery(java.lang.String query,
int startFeature,
int maxFeatures)
perfomrs a general query against a database. |
Table |
performTableQuery(java.lang.String query)
perfomrs a simple query to get a Table |
Table |
performTableQuery(java.lang.String query,
int startFeature,
int maxFeatures)
perfomrs a simple query to get a Table |
void |
performUpdate(java.lang.String update)
performs the update described by the submitted SQL-Statement |
void |
rollback()
|
void |
setAutoCommit(boolean autoCommit)
sets the auto commit status of the connection |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.sql.Connection con
private DBConnectionPool pool
Constructor Detail |
public DBAccess(java.sql.Connection con)
con
- connection to a oracle database with spatial extension.public DBAccess(java.sql.Connection con, boolean autoCommit) throws java.sql.SQLException
con
- connection to a oracle database with spatial extension.public DBAccess(java.lang.String driver, java.lang.String logon, java.lang.String user, java.lang.String password) throws java.sql.SQLException, java.lang.Exception
driver
- jdbc driver namelogon
- logon (database address, additional parameters)user
- password
-
java.sql.SQLException
java.lang.Exception
public DBAccess(java.lang.String driver, java.lang.String logon, java.util.Properties properties) throws java.sql.SQLException, java.lang.Exception
driver
- jdbc driver namelogon
- logon (database address, additional parameters)properties
- additional parameters
java.sql.SQLException
java.lang.Exception
public DBAccess(java.lang.String driver, java.lang.String logon, java.lang.String user, java.lang.String password, boolean autoCommit) throws java.sql.SQLException, java.lang.Exception
driver
- jdbc driver namelogon
- logon (database address, additional parameters)user
- password
- autoCommit
-
java.sql.SQLException
java.lang.Exception
public DBAccess(java.lang.String driver, java.lang.String logon, java.util.Properties properties, boolean autoCommit) throws java.sql.SQLException, java.lang.Exception
driver
- jdbc driver namelogon
- logon (database address, additional parameters)properties
- autoCommit
-
java.sql.SQLException
java.lang.Exception
Method Detail |
public void kill()
public void setAutoCommit(boolean autoCommit) throws java.lang.Exception
java.lang.Exception
public void rollback() throws java.lang.Exception
java.lang.Exception
public java.sql.Connection getConnection()
public java.lang.Object performQuery(java.lang.String query) throws java.sql.SQLException, java.lang.Exception
query
- the query parameter contains the query to perform.
java.sql.SQLException
- will be thrown if the submitted query
can't be parsed to a valid sql-statement.
java.lang.Exception
public java.lang.Object performQuery(java.lang.String query, int startFeature, int maxFeatures) throws java.sql.SQLException, java.lang.Exception
query
- the query parameter contains the query to perform.startFeature
- index of the feature the query startsmaxFeatures
- the maximum amount of features that should be
returned by the request. if maxFeatures is <= 0 all
features will be returned.
java.sql.SQLException
- will be thrown if the submitted query
can't be parsed to a valid sql-statement.
java.lang.Exception
protected java.lang.String mapTypes(int type)
public void commit() throws java.sql.SQLException
java.sql.SQLException
public Table performTableQuery(java.lang.String query) throws java.lang.Exception
query
- the query parameter contains the query to perform.
java.lang.Exception
public Table performTableQuery(java.lang.String query, int startFeature, int maxFeatures) throws java.lang.Exception
query
- the query parameter contains the query to perform.startFeature
- index of the feature the query startsmaxFeatures
- the maximum amount of features that should be
returned by the request. if maxFeatures is <= 0 all
features will be returned.
java.lang.Exception
public void performUpdate(java.lang.String update) throws java.lang.Exception
update
- sql-statement that should be performed
java.lang.Exception
public void executeStatement(java.lang.String sql) throws java.sql.SQLException
sql
- the SQL-statement to perform
java.sql.SQLException
- if the SQL was erroneus or a general database
error occuredpublic void performInsert(java.lang.String insert) throws java.lang.Exception
insert
- sql-statement that should be performed
java.lang.Exception
public void performInsert(java.lang.String[] insert) throws java.lang.Exception
insert
- sql-statement that should be performed
java.lang.Exception
public java.util.HashMap getColumnTypes(java.lang.String table, java.lang.String[] columns)
public java.util.HashMap getColumnTypesAsInt(java.lang.String table, java.lang.String[] columns)
public java.lang.String getDataBaseVendor()
protected java.lang.String escape(java.lang.String query)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |