|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
DataItems that implement the DbAccess interface represent a database. The DbAccess interface contains methods to determine what arguments are needed to connect to the database, to connect to and disconnect from the database, to execute retrieval and non-retrieval queries, to control transactions, and to validate changes made to the database.
Method Summary | |
void |
beginTransaction()
Begin an explicit transaction. |
void |
commitTransaction()
Commit all changes made since the last beginTransaction (there may be none) Resume automatically commiting individual row changes. |
void |
connect()
Connect to the data source using current connection settings |
void |
connect(java.lang.String url,
java.util.Properties info)
connect to the specified database URL passing any required connection arguments in a Properties Object. |
void |
connect(java.lang.String url,
java.lang.String username,
java.lang.String password)
Connect to the specified database URL using the specified user ID and password |
void |
disconnect()
Disconnect from the database |
int |
executeCommand(java.lang.String command,
java.lang.String dataItemName)
executes the specified non-retrieval query and returns the count of rows affected, or -1 if this is not applicable (the query does not manipulate rows) |
java.lang.Object |
executeRetrieval(java.lang.String retrieval,
java.lang.String dataItemName,
java.lang.String options)
This method executes the specified retrieval query and returns the result as a DataItem. |
void |
flush()
Explicitly propagate all changes to the database without commiting them. |
java.sql.DriverPropertyInfo[] |
getPropertyInfo(java.lang.String url,
java.util.Properties info)
Discover what connection arguments are required. |
void |
rollbackTransaction()
Undo all changes made since the last beginTransaction (there may be none) Resume automatically commiting individual row changes. |
void |
validate()
Explicitly validate all changes to the database without committing them. |
Method Detail |
public void connect() throws java.sql.SQLException
public void connect(java.lang.String url, java.lang.String username, java.lang.String password) throws java.sql.SQLException
url
- the database URLusername
- the user IDpasswword
- the passwordpublic void connect(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
url
- the database URLinfo
- the Properties object containing any required information such as username or password.public void disconnect() throws java.sql.SQLException
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info)
url
- database URLinfo
- proposed connection arguments (may be initially empty)public java.lang.Object executeRetrieval(java.lang.String retrieval, java.lang.String dataItemName, java.lang.String options) throws java.sql.SQLException
retrieval
- the retrieval query; typically a SQL SELECT or a
stored procedure which returns a resultdataItemName
- if not null, instructs the data provider to
make the resulting RowsetAccess item available under the specified nameoptions
- space delimited list of option stringspublic int executeCommand(java.lang.String command, java.lang.String dataItemName) throws java.sql.SQLException
command
- the non-retrieval command to executedataItemName
- if not null, instructs the data provider to make
the count of affected rows available as an ImmediateAccess DataItem with
the specifed namepublic void beginTransaction()
public void commitTransaction() throws java.sql.SQLException, RowsetValidationException
public void rollbackTransaction() throws java.sql.SQLException, RowsetValidationException
public void validate() throws java.sql.SQLException, RowsetValidationException
public void flush() throws java.sql.SQLException, RowsetValidationException
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |