All Packages Class Hierarchy This Package Previous Next Index
Interface org.xmlmiddleware.xmldbms.datahandlers.DataHandler
- public interface DataHandler
Interface for abstracting database access.
Objects that implement DataHandler should provide a no-argument constructor.
-
COMMIT_AFTERDOCUMENT
- Commit transaction after the whole document
-
COMMIT_AFTERSTATEMENT
-
Commit transaction after each statement.
-
COMMIT_NONE
- Let calling code commit transaction.
-
COMMIT_NOTRANSACTIONS
- Disable transactions all together.
-
delete(Table, Key, Object[], String, Column[], Object[])
- Delete rows from a given table.
-
delete(Table, Row, Key)
-
-
endDocument()
-
-
initialize(DataSource, String, String)
- Initialize a DataHandler object
-
insert(Table, Row)
-
-
select(Table, Key, Object[], String, Column[], Object[], OrderInfo)
- Select rows from a given table.
-
startDocument(int)
-
-
update(Table, Row, Column[])
-
-
updateOrInsert(Table, Row)
-
COMMIT_AFTERSTATEMENT
public static final int COMMIT_AFTERSTATEMENT
- Commit transaction after each statement.
COMMIT_AFTERDOCUMENT
public static final int COMMIT_AFTERDOCUMENT
- Commit transaction after the whole document
COMMIT_NONE
public static final int COMMIT_NONE
- Let calling code commit transaction. Useful when part of
a larger transaction.
COMMIT_NOTRANSACTIONS
public static final int COMMIT_NOTRANSACTIONS
- Disable transactions all together.
initialize
public abstract void initialize(DataSource dataSource,
String user,
String password) throws SQLException
- Initialize a DataHandler object
- Parameters:
- dataSource - The DataSource to get Connection's from.
- user - User to connect to the database as.
- password - Password to connect to the database with.
startDocument
public abstract void startDocument(int commitMode) throws SQLException
endDocument
public abstract void endDocument() throws SQLException
insert
public abstract void insert(Table table,
Row row) throws SQLException
update
public abstract void update(Table table,
Row row,
Column columns[]) throws SQLException
updateOrInsert
public abstract void updateOrInsert(Table table,
Row row) throws SQLException
delete
public abstract void delete(Table table,
Row row,
Key key) throws SQLException
delete
public abstract void delete(Table table,
Key key,
Object keyValue[],
String where,
Column paramColumns[],
Object paramValues[]) throws SQLException
- Delete rows from a given table.
The DELETE statement has the form:
SELECT FROM Table WHERE Key = ? AND <where>
- Parameters:
- t - The table to select from. Must not be null.
- key - The key to restrict with. May be null.
- keyValue - The value of the key.
- where - An additional where constraint. May be null.
- paramColumns - The columns corresponding to parameters in the where constraint.
Null if there are no parameters.
- paramValues - The values of parameters in the where constraint. Null if there
are no parameters.
select
public abstract ResultSet select(Table table,
Key key,
Object keyValue[],
String where,
Column paramColumns[],
Object paramValues[],
OrderInfo orderInfo) throws SQLException
- Select rows from a given table.
The SELECT statement has the form:
SELECT * FROM Table WHERE Key = ? AND <where> ORDER BY ?
- Parameters:
- t - The table to select from. Must not be null.
- key - The key to restrict with. May be null.
- keyValue - The value of the key.
- where - An additional where constraint. May be null.
- paramColumns - The columns corresponding to parameters in the where constraint.
Null if there are no parameters.
- paramValues - The values of parameters in the where constraint. Null if there
are no parameters.
- order - The sort information. May be null.
- Returns:
- The result set.
All Packages Class Hierarchy This Package Previous Next Index