|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.datasource.jdbc.Persistor
Default mechanism for persisting (resolving) data to the originating database.
Field Summary | |
protected static int |
ONE_ROW_CHANGED
|
protected PreparedStatement |
update_statement
|
Constructor Summary | |
Persistor()
|
Method Summary | |
protected void |
buildDeleteStatement(String table,
Vector columns,
Object[] original_row,
com.klg.jclass.datasource.jdbc.MetaData metaData,
com.klg.jclass.datasource.jdbc.DataTable dataTable)
Builds the delete statement for a table. |
protected void |
buildUpdateStatement(String table,
Vector columns,
long bookmark,
com.klg.jclass.datasource.jdbc.MetaData metaData,
com.klg.jclass.datasource.jdbc.DataTable dataTable)
Default method for building update statement. |
protected void |
commit(com.klg.jclass.datasource.jdbc.MetaData metaData)
For internal use only. |
protected int |
executeUpdate(com.klg.jclass.datasource.jdbc.MetaData metaData)
Commits the update to the database. |
protected String |
getQualifiedTableName(String table,
boolean includeAlias,
com.klg.jclass.datasource.jdbc.MetaData metaData)
Return the qualified version of the table name, i.e., can be [catalog.][schema.]table [alias] |
void |
saveRow(long bookmark,
com.klg.jclass.datasource.jdbc.MetaData metaDataModel,
com.klg.jclass.datasource.DataTableModel dataTableModel)
Persist the changes to the row to the originating data base and tables. |
protected void |
setUpdateParameter(int number,
Object value,
String col_id,
com.klg.jclass.datasource.jdbc.MetaData metaData)
Sets a particular parameter in the SQL update statement. |
protected void |
setUpdateStatement(String update,
com.klg.jclass.datasource.jdbc.MetaData metaData)
Sets the SQL statement to update data. |
protected boolean |
tablesColumnsModified(long bookmark,
Vector columns,
com.klg.jclass.datasource.jdbc.MetaData metaData,
com.klg.jclass.datasource.jdbc.DataTable dataTable)
Returns true if at least one of this table's columns been modified. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int ONE_ROW_CHANGED
protected transient PreparedStatement update_statement
Constructor Detail |
public Persistor()
Method Detail |
public void saveRow(long bookmark, com.klg.jclass.datasource.jdbc.MetaData metaDataModel, com.klg.jclass.datasource.DataTableModel dataTableModel) throws DataModelException
PersistorModel
saveRow
in interface PersistorModel
DataModelException
- If any exception occurs.protected void commit(com.klg.jclass.datasource.jdbc.MetaData metaData) throws DataModelException
DataModelException
- If commit fails.protected boolean tablesColumnsModified(long bookmark, Vector columns, com.klg.jclass.datasource.jdbc.MetaData metaData, com.klg.jclass.datasource.jdbc.DataTable dataTable) throws DataModelException
bookmark
- a long which uniquely identifies a rowcolumns
- a Vector of indexes for this table's columns
DataModelException
protected void buildDeleteStatement(String table, Vector columns, Object[] original_row, com.klg.jclass.datasource.jdbc.MetaData metaData, com.klg.jclass.datasource.jdbc.DataTable dataTable) throws DataModelException
table
- a String name for the tablecolumns
- a Vector of column indexes
DataModelException
- If creation of delete statement fails.protected void buildUpdateStatement(String table, Vector columns, long bookmark, com.klg.jclass.datasource.jdbc.MetaData metaData, com.klg.jclass.datasource.jdbc.DataTable dataTable) throws DataModelException
DataModelException
- If build fails.protected String getQualifiedTableName(String table, boolean includeAlias, com.klg.jclass.datasource.jdbc.MetaData metaData)
protected void setUpdateStatement(String update, com.klg.jclass.datasource.jdbc.MetaData metaData) throws DataModelException
DataModelException
- If setUpdateStatement fails.protected void setUpdateParameter(int number, Object value, String col_id, com.klg.jclass.datasource.jdbc.MetaData metaData) throws DataModelException
number
- an int indicating the position of the parametervalue
- the Object which is to be setcol_id
- column_name the column alias or column name as it appears in the
select statement ([catalog.][schema.][table.]column)
DataModelException
- If setUpdatdParameter fails.protected int executeUpdate(com.klg.jclass.datasource.jdbc.MetaData metaData) throws DataModelException
DataModelException
- thrown if query fails
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |