| java.lang.Object com.salmonllc.sql.DataStoreBuffer com.salmonllc.sql.DataStore
All known Subclasses: com.salmonllc.examples.example8.ContactModel, com.salmonllc.examples.example20.SourceCodeModel, com.salmonllc.examples.example20.ExampleModel, com.salmonllc.sql.RemoteDataStore, com.salmonllc.sql.ProxyBeanDataStoreAdaptor, com.salmonllc.examples.example7.ExamplesModel, com.salmonllc.examples.example20.ExampleSourceCodeModel, com.salmonllc.examples.example17.ContactModel, com.salmonllc.examples.example5.ProductCategoryModel,
Method Summary | |
public void | addColumn(String column, int type) This method adds a column to the DataStore using the datastore's default
table. | public void | addColumn(String column, int type, boolean primaryKey, boolean updatable) This method adds a column to the DataStore using the datastore's default
table.
Parameters: column - The name of the column to add to the datastore. Parameters: type - The type of the column to add to the datastore. | public void | addColumn(String table, String column, int type) This method adds a column to the DataStore using the datastore's default
table. | public void | addColumn(String table, String column, int type, boolean primaryKey, boolean updateable) This method adds a column to the DataStore
Parameters: table - The name of the table containing the column. Parameters: column - The name of the column to add to the datastore. Parameters: type - The type of the column to add to the datastore. | public void | addColumn(String table, String column, int type, boolean primaryKey, boolean updateable, String internalName) This method adds a column to the DataStore
Parameters: table - The name of the table containing the column. Parameters: column - The name of the column to add to the datastore. Parameters: type - The type of the column to add to the datastore. | public void | addFormattedColumn(String table, String column, int type, boolean primaryKey, boolean updateable, String colFormat) This method adds a column to the DataStore and passes the format to
setFormat
Parameters: table - The name of the table containing the column. Parameters: column - The name of the column to add to the datastore. Parameters: type - The type of the column to add to the datastore. | public void | addJoin(String columnList1, String columnList2, boolean outerJoin) This method is used to set the join clause connecting two or more tables
used in the DataStore. | public void | addJoin(String columnList1, String columnList2, boolean outerJoin, int relationType) This method is used to set the join clause connecting two or more tables
used in the DataStore. | public void | addSQLPreviewListener(SQLPreviewListener p) Adds a new listerner to this page to handle custom page events events. | public void | addTableAlias(String table, String alias) This method adds a table alias to the datastore. | public boolean | allDataRetrieved() This method indicates whether all the data in the result set that is to
be returned by the last retrieve statement has in fact been retrieved. | public void | autoRetrieve() This method is called from JspController when the DataStore needs to be
automatically retrieved. | public synchronized void | buildBuffer(DBConnection conn, String sql) This method will build a datastore buffer from the columns in the sql
statement and retrieves the data. | public synchronized void | buildBuffer(String sql) This method will build a datastore buffer from the columns in the sql
statement and retrieves the data. | public static String | buildCriteriaString(AutoRetrieveCriteria crit) | public String | buildCriteriaStringForRow(int row, String table) Builds a where clause suitable for retrieving a single row from the
specified table where the primary key fields match the values in the
specified row. | public void | cancelRetrieve() If a retrieve is in progress, this method will cancel it. | public String | computeTableAndFieldName(String fieldName) This method is used for databases profiles where the DBName attribute is
specified. | public String | computeTableName(String nameIn) This method is used for databases profiles where the DBName attribute is
specified. | public static DataStoreBuffer | constructDataStore(String className, String applicationName) This method will instantiate the datastore described in the className
field. | public static DataStoreBuffer | constructDataStore(String className, String applicationName, String profileName) This method will instantiate the datastore described in the className
field. | public void | destroy() This method is not used. | public int | estimateRowsRetrieved() Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed. | public int | estimateRowsRetrieved(DBConnection conn) Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed. | public int | estimateRowsRetrieved(DBConnection conn, QBEBuilder criteria) Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed. | public int | estimateRowsRetrieved(QBEBuilder criteria) Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed. | public int | estimateRowsRetrieved(DBConnection conn, String criteria) Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed. | public int | estimateRowsRetrieved(DBConnection conn, String criteria, PreparedStatementParms psp) Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed. | public int | estimateRowsRetrieved(String criteria) Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed. | public int | estimateRowsRetrieved(String criteria, PreparedStatementParms psp) Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed. | public synchronized void | execute(DBConnection conn, String sql) Executes the supplied sql instead of the generated sql. | public synchronized void | execute(String sql) Executes the supplied sql instead of the generated sql. | public synchronized void | executePrepStmt(DBConnection conn, String stmt) Executes the prepared statement with no parameters. | public synchronized void | executePrepStmt(DBConnection conn, String stmt, PreparedStatementParms parms) Executes the prepared statement and retrieves to data. | public void | executePrepStmt(String stmt) Executes the prepared statement and retrieves to data. | public synchronized void | executePrepStmt(String stmt, PreparedStatementParms parms) Executes the prepared statement and retrieves to data. | public synchronized void | executeProc(DBConnection conn, String proc) Executes the stored procuedure with no parameters. | public synchronized void | executeProc(DBConnection conn, String proc, StoredProcedureParms parms) Executes the sql statement and retrieves to data. | public void | executeProc(String proc) Executes the procuedure and retrieves the data. | public synchronized void | executeProc(String proc, StoredProcedureParms parms) Executes the sql statement and retrieves to data. | public String | exportAsSQL(DBConnection conn, String sDBType, String separator) This method takes the SQL INSERT statements that would have been
generated to add these rows to the database, and, rather than executing
them, returns them as a string that can be written to a SQL script file. | public String | fixQuote(String data) This method will fix quotes in a string constant so it can be used in a
SQL Statement. | public String | formatDateTime(java.util.Date data) This method will format a Date value so it can be used in an SQL
Statement. | public String | getAlias(int tableNo) This method returns the name of one of the aliases used by the datastore. | public int | getAliasCount() This method returns the number of aliases used by the datastore. | public String | getAppName() | public boolean | getAutoValidate() | public boolean | getBatchInserts() | public boolean | getCheckConcurrency() Use this method to get whether or not the datastore will do a concurrency
check when rows are updated and deleted. | public String | getColumnDBColumnName(int col) This method returns the database name of the column not including the
table name. | public String | getColumnDatabaseName(int col) This method returns the database name of the column in the data store
given its index. | public String | getColumnFormat(int col) This method returns the name of the database table that the column is
for. | public String | getColumnInternalName(int col) This method returns the name of the database table that the column is
for. | public String | getColumnTableName(int col) This method returns the name of the database table that the column is
for. | public ColumnDefinition[] | getColumnsForTable(String table) Returns a list of column definitions for a particular table in the
database that the datastore is using. | public boolean | getConcurrencyCheckColumn(int col) This method is used to get whether a column should be used in the update,
delete concurrency check. | public boolean | getConcurrencyCheckColumn(String col) This method is used to get whether a column should be used in the update,
delete concurrency check. | public String | getCriteria() This method is used to get selection criteria filtering for the result
set of the datastore. | public String | getDBMS() | public String | getDbProfile() | public String | getDefaultTable() | public boolean | getDistinct() This method will return whether the distinct flag in the data store is
set. | public boolean | getEnableCancel() Use this method to get whether or not the cancel() method of a JDBC
Statement is to be called when cancelling a retrieve. | public boolean | getEnableThreads() Use this method to get whether or not the datastore does a retrieve in a
separate thread. | public AutoRetrieveCriteria | getGroupAutoRetrieveCriteria() This method will return the autoretrieve group criteria used for the
datastore. | public String | getGroupBy() This method returns the column list in the group by clause. | public String | getHaving() This method returns the having clause for the datastore. | public int | getJoinColumnCount(int joinNo) This method returns the number of columns in a particular join. | public int | getJoinCount() This method returns the number of joins in the datastore. | public String | getJoinLeftColumn(int joinNo, int colNo) This method returns a column on the left side of the join. | public boolean | getJoinOuter(int joinNo) This method returns the true if a particular join is outer. | public int | getJoinRelationType(int joinNo) This method returns the relation type of the join. | public String | getJoinRightColumn(int joinNo, int colNo) This method returns a column on the right side of the join. | public int | getMaxRows() This method will return the maximum number of rows that the datastore
will retrieve. | public String | getOrderBy() This method returns the order by clause for the datastore. | public Properties | getProperties() This method creates a properties object containing the definition of the
data store. | String | getSelectStatement(DBConnection conn) | public String | getSelectStatement(DBConnection conn, String criteria) | public String | getTable(int tableNo) This method returns the name of one of the tables used by the datastore. | public String[] | getTableList(boolean updateable) This method returns an array of all the tables referenced in the
datastore. | public boolean | getTrimStrings() | public int | getUpdateMethod() Gets the update method for the datastore. | public int | getUseBindColumn(int col) This method is used to get whether a column should use bind variables for
inserts and updates. | public int | getUseBindColumn(String col) This method is used to get whether a column should use bind variables for
inserts and updates. | public boolean | getUseBindForUpdate() Use this method to get whether or not the datastore will use bind
variables as the default for updating or inserting columns. | public boolean | isAutoIncrement(int col) | public boolean | isAutoIncrement(String col) | public boolean | isColumnPrimaryKey(int col) This method returns the name of the database table that the column is
for. | public boolean | isPrimaryKey(int col) | public boolean | isPrimaryKey(String col) | public boolean | isUpdateable(int col) | public boolean | isUpdateable(String col) | public void | loadConnectionParms() Loads connection parms from the database connection object into the
datastore. | public void | loadConnectionParms(DBConnection conn) | public static boolean | parensMatch(String s) | public boolean | ping() This method is not used. | public void | populateFromResultSet(ResultSet rs) Populates the datastore from a given resultSet. | public synchronized void | reloadRow() Reloads the specified row from the database. | public synchronized void | reloadRow(int rowNo) Reloads the specified row from the database. | public synchronized void | reloadRow(DBConnection conn, int rowNo) Reloads the specified row from the database. | public void | removeColumn(String column) This method removes a column to the DataStore. | public void | removeJoin(String left, String right) This method is used to remove a join clause connecting two or more tables
used in the DataStore. | public void | removeSQLPreviewListener(SQLPreviewListener p) This method removes a listener from the list of listeners that will be
notified when a page event is fired. | public void | removeTableAlias(String table) This method removes a table alias from the datastore. | public synchronized void | reset() This method will clear all rows in the dataStore. | public void | retrieve() Executes the sql statement and retrieves to data. | public void | retrieve(DBConnection conn) Executes the sql statement and retrieves to data. | public void | retrieve(DBConnection conn, String criteria) Executes the sql statement and retrieves to data. | public void | retrieve(DBConnection conn, String criteria, PreparedStatementParms psp) Executes the sql statement and retrieves to data. | public void | retrieve(DBConnection conn, QBEBuilder criteria) Executes the sql statement and retrieves to data. | public void | retrieve(QBEBuilder criteria) Executes the sql statement and retrieves to data. | public synchronized void | retrieve(String criteria) Executes the sql statement and retrieves to data. | public synchronized void | retrieve(String criteria, PreparedStatementParms psp) Executes the sql statement and retrieves to data. | public void | run() The run method for the thread that retrieves the data from the database.
This method should not be called directly. | public void | setAppName(String appName) | public void | setAutoIncrement(int col, boolean auto) | public void | setAutoIncrement(String col, boolean auto) | public void | setAutoValidate(boolean autoValidate) | public void | setBatchInserts(boolean batchInserts) Set to true to batch insert statements. | public void | setCheckConcurrency(boolean truefalse) Use this method to set whether or not the datastore will do a concurrency
check when rows are updated and deleted. | public void | setConcurrencyCheckColumn(int col, boolean truefalse) This method is used to indicate whether a column should be used in the
update, delete concurrency check. | public void | setConcurrencyCheckColumn(String col, boolean truefalse) This method is used to indicate whether a column should be used in the
update, delete concurrency check. | public void | setConnection(DBConnection conn) This method sets the database connection that the datastore will use for
retrieves. | public void | setCriteria(String criteria) This method is used to set selection criteria filtering for the result
set of the datastore. | public void | setDBProfile(String dbProfile) | public void | setDataSourceIn(DataSourceIn dsIn) | public void | setDataSourceOut(DataSourceOut dsOut) | public void | setDefaultTable(String table) If this DataStore will retrieve data from a single table, it isn't
necessary to pass it each time a column is added to the select statement. | public void | setDistinct(boolean distinct) This method will set the distinct flag in the data store. | public void | setEnableCancel(boolean truefalse) Use this method to set whether or not the cancel() method of a JDBC
Statement is to be called when cancelling a retrieve. | public void | setEnableThreads(boolean truefalse) | public void | setGroupAutoRetrieveCriteria(AutoRetrieveCriteria crit) This method will set the autoretrieve group criteria used for the
datastore. | public void | setGroupBy(String groupByColumns) This method is used to set a list of columns in the SQL Statement to
group together. | public void | setHaving(String havingCriteria) This method is used to set selection criteria that acts upon groups of
data in the result set rather than individual rows. | public void | setMaxRows(int max) This method will set the maximum number of rows that the datastore will
retrieve. | public void | setOrderBy(String orderBy) | public void | setPrimaryKey(int col, boolean pkey) | public void | setPrimaryKey(String col, boolean pkey) | public void | setProperties(Properties p) This method builds the datastore from the information in the properties
object. | public void | setTrimStrings(boolean trim) | public void | setUpdateMethod(int updateMethod) Sets the update method for the datastore. | public void | setUpdateable(int col, boolean updateable) | public void | setUpdateable(String col, boolean updateable) | public void | setUseBindColumn(int col, int useBind) This method is used to indicate whether a column should use bind
variables for inserts and updates. | public void | setUseBindColumn(String col, int useBind) This method is used to indicate whether a column should use bind
variables for inserts and updates. | public void | setUseBindForUpdate(boolean truefalse) Use this method to set whether or not the datastore will use bind
variables as the default for updating or inserting columns. | public int | unDeleteRow(int row) This method will take a row from the datastores deleted buffer and move
it back to the standard buffer.
Parameters: row - The number of the row to undelete. | public void | union(DataStore dataStores) Use this method to retrieve the result sets from multiple data stores
into the data buffer of this one. | public void | union(DataStore dataStore) Use this method to retrieve the result set from a second data stores into
the data buffer of this one. | public void | union(DBConnection conn, DataStore dataStores) Use this method to retrieve the result sets from multiple data stores
into the data buffer of this one. | public void | union(DBConnection conn, DataStore dataStore) Use this method to retrieve the result set from a second data stores into
the data buffer of this one. | public void | update() This method will cause the database to reflect the changes made in the
data store's buffer. | public void | update(DBConnection conn) This method will cause the database to reflect the changes made in the
data store's buffer. | public void | update(DBConnection conn, boolean handleTrans) This method will cause the database to reflect the changes made in the
data store's buffer. |
CONNECTION_PARM_CACHE_DATADICTIONARY | final public static String CONNECTION_PARM_CACHE_DATADICTIONARY(Code) | | |
CONNECTION_PARM_CHECK_CONCURRENCY | final public static String CONNECTION_PARM_CHECK_CONCURRENCY(Code) | | |
CONNECTION_PARM_REPLACE_NULL_DATES | final public static String CONNECTION_PARM_REPLACE_NULL_DATES(Code) | | |
CONNECTION_PARM_REPLACE_NULL_DATETIMES | final public static String CONNECTION_PARM_REPLACE_NULL_DATETIMES(Code) | | |
CONNECTION_PARM_REPLACE_NULL_DECIMALS | final public static String CONNECTION_PARM_REPLACE_NULL_DECIMALS(Code) | | |
CONNECTION_PARM_REPLACE_NULL_INTS | final public static String CONNECTION_PARM_REPLACE_NULL_INTS(Code) | | |
CONNECTION_PARM_REPLACE_NULL_STRINGS | final public static String CONNECTION_PARM_REPLACE_NULL_STRINGS(Code) | | |
CONNECTION_PARM_REPLACE_NULL_TIMES | final public static String CONNECTION_PARM_REPLACE_NULL_TIMES(Code) | | |
CONNECTION_PARM_TRIM_STRINGS | final public static String CONNECTION_PARM_TRIM_STRINGS(Code) | | |
CONNECTION_PARM_USE_BIND_FOR_UPDATES | final public static String CONNECTION_PARM_USE_BIND_FOR_UPDATES(Code) | | |
CONNECTION_PARM_USE_DELETE_INSERT_FOR_UPDATES | final public static String CONNECTION_PARM_USE_DELETE_INSERT_FOR_UPDATES(Code) | | |
UPDATEMETHOD_DELETEINSERTS | final public static int UPDATEMETHOD_DELETEINSERTS(Code) | | |
UPDATEMETHOD_UPDATES | final public static int UPDATEMETHOD_UPDATES(Code) | | |
DataStore | public DataStore()(Code) | | Creates a new empty DataStore object. Any method requiring a database
connection (retrieve,update and union) will have to be explicitly passed
a DBConnection created outside the datastore.
|
DataStore | public DataStore(DataSourceIn dsIn, DataSourceOut dsOut)(Code) | | Creates a new empty DataStore. Any methods requiring a database
connection (retrieve, update and union) will be able to use appName to
get connection parameters from properties files and so an externally
created DBConnection object does not need to be provided.
Parameters: dsIn - The data source used to retrieve data. Parameters: dsOut - The data source used to update data. |
DataStore | public DataStore(String appName)(Code) | | Creates a new empty DataStore. Any methods requiring a database
connection (retrieve, update and union) will be able to use appName to
get connection parameters from properties files and so an externally
created DBConnection object does not need to be provided.
Parameters: appName - The application to get the default database connection for. |
DataStore | public DataStore(String appName, String dbProfile)(Code) | | Creates a new empty DataStore. Creates a new empty DataStore. Any methods
requiring a database connection (retrieve, update and union) will be able
to use appName and dbProfile to get connection parameters from properties
files and so an externally created DBConnection object does not need to
be provided.
Parameters: appName - The application to get the database connection for. Parameters: dbProfile - The particular database profile to load. |
addColumn | public void addColumn(String column, int type)(Code) | | This method adds a column to the DataStore using the datastore's default
table. The column is not part of the primary key of the table and is not
updatable.
Parameters: column - The name of the column to add to the datastore. Parameters: type - The type of the column to add to the datastore. This must beone of the "TYPE" constants in the class. See Also: DataStore.setDefaultTable |
addColumn | public void addColumn(String column, int type, boolean primaryKey, boolean updatable)(Code) | | This method adds a column to the DataStore using the datastore's default
table.
Parameters: column - The name of the column to add to the datastore. Parameters: type - The type of the column to add to the datastore. This must beone of the "TYPE" constants in the class. Parameters: primaryKey - True if the column is part of the primary key of the table itis in. Parameters: updatable - True if this column should be updated when the update methodis called. See Also: DataStore.setDefaultTable |
addColumn | public void addColumn(String table, String column, int type)(Code) | | This method adds a column to the DataStore using the datastore's default
table. The column is not part of the primary key of the table and is not
updatable.
Parameters: table - The name of the table to add to the datastore. Parameters: column - The name of the column to add to the datastore. Parameters: type - The type of the column to add to the datastore. This must beone of the "TYPE" constants in the class. See Also: DataStore.setDefaultTable |
addColumn | public void addColumn(String table, String column, int type, boolean primaryKey, boolean updateable)(Code) | | This method adds a column to the DataStore
Parameters: table - The name of the table containing the column. Parameters: column - The name of the column to add to the datastore. Parameters: type - The type of the column to add to the datastore. This must beone of the "TYPE" constants in the class. Parameters: primaryKey - True if the column is part of the primary key of the table itis in. Parameters: updateable - True if this column should be updated when the update methodis called. |
addColumn | public void addColumn(String table, String column, int type, boolean primaryKey, boolean updateable, String internalName)(Code) | | This method adds a column to the DataStore
Parameters: table - The name of the table containing the column. Parameters: column - The name of the column to add to the datastore. Parameters: type - The type of the column to add to the datastore. This must beone of the "TYPE" constants in the class. Parameters: primaryKey - True if the column is part of the primary key of the table itis in. Parameters: updateable - True if this column should be updated when the update methodis called. Parameters: internalName - The name to use to get the value of the column later. If notused, the column can be referenced by tablename.columnname |
addFormattedColumn | public void addFormattedColumn(String table, String column, int type, boolean primaryKey, boolean updateable, String colFormat)(Code) | | This method adds a column to the DataStore and passes the format to
setFormat
Parameters: table - The name of the table containing the column. Parameters: column - The name of the column to add to the datastore. Parameters: type - The type of the column to add to the datastore. This must beone of the "TYPE" constants in the class. Parameters: primaryKey - True if the column is part of the primary key of the table itis in. Parameters: updateable - True if this column should be updated when the update methodis called. Parameters: colFormat - The format to use in parsing or formatting the value. See Also: DataStoreBuffer.setFormat |
addJoin | public void addJoin(String columnList1, String columnList2, boolean outerJoin)(Code) | | This method is used to set the join clause connecting two or more tables
used in the DataStore. This is not necessary for single table DataStores.
columnList1:A list of column names seperated by commas on the left side ofthe join columnList2:A list of column names seperated by commas on the right sideof the join outerJoin:True if this is an outer join and false for a regular join.Note: the left side of the join (columnList 1) will always bethe outer member of the join. |
addJoin | public void addJoin(String columnList1, String columnList2, boolean outerJoin, int relationType)(Code) | | This method is used to set the join clause connecting two or more tables
used in the DataStore. This is not necessary for single table DataStores.
columnList1:A list of column names seperated by commas on the left side ofthe join columnList2:A list of column names seperated by commas on the right sideof the join outerJoin:True if this is an outer join and false for a regular join.Note: the left side of the join (columnList 1) will always bethe outer member of the join. relationType:Specifies the type of relation the join represents.(RELATION_ONE_TO_ONE, RELATION_ONE_TO_MANY,RELATION_MANY_TO_ONE) |
addSQLPreviewListener | public void addSQLPreviewListener(SQLPreviewListener p)(Code) | | Adds a new listerner to this page to handle custom page events events.
|
addTableAlias | public void addTableAlias(String table, String alias)(Code) | | This method adds a table alias to the datastore. Calls to the addColumn
method can then use the alias specified to represent the table name.
Parameters: table - The name of the table to alias. Parameters: alias - The name of the alias. |
allDataRetrieved | public boolean allDataRetrieved()(Code) | | This method indicates whether all the data in the result set that is to
be returned by the last retrieve statement has in fact been retrieved.
true if all the data has been retrieved and false if the retrieveis still in progress. |
autoRetrieve | public void autoRetrieve()(Code) | | This method is called from JspController when the DataStore needs to be
automatically retrieved.
|
buildBuffer | public synchronized void buildBuffer(DBConnection conn, String sql) throws java.sql.SQLException, DataStoreException(Code) | | This method will build a datastore buffer from the columns in the sql
statement and retrieves the data. After the initial call to this method
(for subsequent retrieves), the execute method can be used and is more
efficient.
Parameters: conn - The database connection to use to perform this operation. Parameters: sql - The sql to execute. |
buildBuffer | public synchronized void buildBuffer(String sql) throws java.sql.SQLException, DataStoreException(Code) | | This method will build a datastore buffer from the columns in the sql
statement and retrieves the data. After the initial call to this method
(for subsequent retrieves), the execute method can be used and is more
efficient.
Parameters: sql - The sql to execute. |
buildCriteriaString | public static String buildCriteriaString(AutoRetrieveCriteria crit)(Code) | | This method builds a sql string from an AutoRetrieveCriteria object
|
buildCriteriaStringForRow | public String buildCriteriaStringForRow(int row, String table) throws DataStoreException(Code) | | Builds a where clause suitable for retrieving a single row from the
specified table where the primary key fields match the values in the
specified row.
|
cancelRetrieve | public void cancelRetrieve()(Code) | | If a retrieve is in progress, this method will cancel it.
|
computeTableAndFieldName | public String computeTableAndFieldName(String fieldName)(Code) | | This method is used for databases profiles where the DBName attribute is
specified. It will take a short table name, column name combination and
return the fully qualified table name + column name, including the
database name.
|
computeTableName | public String computeTableName(String nameIn)(Code) | | This method is used for databases profiles where the DBName attribute is
specified. It will take a short table name and return the fully qualified
table name, including the database name.
|
constructDataStore | public static DataStoreBuffer constructDataStore(String className, String applicationName)(Code) | | This method will instantiate the datastore described in the className
field. The datastore class must have at least one of three constructors.
One that takes two strings (application and dbprofile), One that takes
one string (application), or a no args constructor. If the app and
profile constructor is found, it will be called first, followed by the
app only constructor, followed by the no args constructor.
|
constructDataStore | public static DataStoreBuffer constructDataStore(String className, String applicationName, String profileName)(Code) | | This method will instantiate the datastore described in the className
field. The datastore class must have at least one of three constructors.
One that takes two strings (application and dbprofile), One that takes
one string (application), or a no args constructor. If the app and
profile constructor is found, it will be called first, followed by the
app only constructor, followed by the no args constructor.
|
destroy | public void destroy() throws Exception(Code) | | This method is not used.
|
estimateRowsRetrieved | public int estimateRowsRetrieved() throws DataStoreException, SQLException(Code) | | Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed.
|
estimateRowsRetrieved | public int estimateRowsRetrieved(DBConnection conn) throws SQLException(Code) | | Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed.
Parameters: conn - The database connection to use to perform this operation. |
estimateRowsRetrieved | public int estimateRowsRetrieved(DBConnection conn, QBEBuilder criteria) throws SQLException(Code) | | Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed.
Parameters: conn - The database connection to use to perform this operation. Parameters: criteria - The selection criteria to use for the select. |
estimateRowsRetrieved | public int estimateRowsRetrieved(QBEBuilder criteria) throws DataStoreException, SQLException(Code) | | Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed.
Parameters: criteria - The selection criteria to use for the select. |
estimateRowsRetrieved | public int estimateRowsRetrieved(DBConnection conn, String criteria) throws SQLException(Code) | | Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed.
Parameters: conn - The database connection to use to perform this operation. Parameters: criteria - The selection criteria to use for the select. |
estimateRowsRetrieved | public int estimateRowsRetrieved(DBConnection conn, String criteria, PreparedStatementParms psp) throws SQLException(Code) | | Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed.
Parameters: conn - The database connection to use to perform this operation. Parameters: criteria - The selection criteria to use for the select in ? format. Parameters: psp - the prepared statement parameters for the criteria. |
estimateRowsRetrieved | public int estimateRowsRetrieved(String criteria) throws DataStoreException, SQLException(Code) | | Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed.
Parameters: criteria - The selection criteria to use for the select. |
estimateRowsRetrieved | public int estimateRowsRetrieved(String criteria, PreparedStatementParms psp) throws DataStoreException, SQLException(Code) | | Use this method to get the amount of rows that will be retrieved when a
data store retrieve is executed.
Parameters: criteria - The selection criteria to use for the select in ? format. Parameters: psp - the prepared statement parameters for the criteria. |
execute | public synchronized void execute(DBConnection conn, String sql) throws java.sql.SQLException(Code) | | Executes the supplied sql instead of the generated sql. This method will
ues the SQL statement supplied and load the returned data into the
DataStore buffer. The column types and column order in the SQL supplied
must match the types and columns in the buffer.
Parameters: conn - The database connection to use to perform this operation. Parameters: sql - The sql to execute. |
execute | public synchronized void execute(String sql) throws java.sql.SQLException, DataStoreException(Code) | | Executes the supplied sql instead of the generated sql. This method will
ues the SQL statement supplied and load the returned data into the
DataStore buffer. The column types and column order in the SQL supplied
must match the types and columns in the buffer.
Parameters: sql - The sql to execute. |
executePrepStmt | public synchronized void executePrepStmt(DBConnection conn, String stmt) throws java.sql.SQLException(Code) | | Executes the prepared statement with no parameters.
Parameters: conn - The database connection to use to perform this operation. Parameters: stmt - The prepared statement to execute. |
executePrepStmt | public synchronized void executePrepStmt(DBConnection conn, String stmt, PreparedStatementParms parms) throws java.sql.SQLException(Code) | | Executes the prepared statement and retrieves to data. The datatypes and
number of columns in the result set must exactly match the columns in the
specified sql statement.
Parameters: conn - The database connection to use to perform this operation. Parameters: stmt - The prepared statement to execute. Parameters: parms - A PreparedStatementParms object containing the parameters topass to the prepared statement. |
executePrepStmt | public synchronized void executePrepStmt(String stmt, PreparedStatementParms parms) throws java.sql.SQLException, DataStoreException(Code) | | Executes the prepared statement and retrieves to data. The datatypes and
number of columns in the result set must exactly match the columns in the
specified sql statement.
Parameters: stmt - The prepared statement to execute. Parameters: parms - A PreparedStatementParms object containing the parameters topass to the proc. |
executeProc | public synchronized void executeProc(DBConnection conn, String proc) throws java.sql.SQLException(Code) | | Executes the stored procuedure with no parameters.
Parameters: conn - The database connection to use to perform this operation. Parameters: proc - The procedure statement to execute. |
executeProc | public synchronized void executeProc(DBConnection conn, String proc, StoredProcedureParms parms) throws java.sql.SQLException(Code) | | Executes the sql statement and retrieves to data. The datatypes and
number of columns in the result set must exactly match the columns in the
specified sql statement.
Parameters: conn - The database connection to use to perform this operation. Parameters: proc - The procedure to execute. Parameters: parms - A StoredProcedureParms object containing the parameters topass to the proc. |
executeProc | public void executeProc(String proc) throws java.sql.SQLException, DataStoreException(Code) | | Executes the procuedure and retrieves the data. The datatypes and number
of columns in the result set must exactly match the columns in the
specified sql statement.
Parameters: proc - The procedure to execute. |
executeProc | public synchronized void executeProc(String proc, StoredProcedureParms parms) throws java.sql.SQLException, DataStoreException(Code) | | Executes the sql statement and retrieves to data. The datatypes and
number of columns in the result set must exactly match the columns in the
specified sql statement.
Parameters: proc - The procedure to execute. Parameters: parms - A StoredProcedureParms object containing the parameters topass to the proc. |
exportAsSQL | public String exportAsSQL(DBConnection conn, String sDBType, String separator) throws Exception(Code) | | This method takes the SQL INSERT statements that would have been
generated to add these rows to the database, and, rather than executing
them, returns them as a string that can be written to a SQL script file.
|
fixQuote | public String fixQuote(String data)(Code) | | This method will fix quotes in a string constant so it can be used in a
SQL Statement. This method will automatically figure out which DBMS is in
use and make the changes accordingly. Because of this, this method can
only be called for datastores created with a constructor that takes
database profile arguments (not the no args constructor). Note: You
should only use this method with character data (DATATYPE_STRING) types.
|
formatDateTime | public String formatDateTime(java.util.Date data)(Code) | | This method will format a Date value so it can be used in an SQL
Statement. This method will automatically figure out which DBMS is in use
and make the changes accordingly. Because of this, this method can only
be called for datastores created with a constructor that takes database
profile arguments (not the no args constructor).
|
getAlias | public String getAlias(int tableNo) throws DataStoreException(Code) | | This method returns the name of one of the aliases used by the datastore.
Use the method getAliasCount() to find out how many tables or aliases are
used by the datastore.
The table name. |
getAliasCount | public int getAliasCount()(Code) | | This method returns the number of aliases used by the datastore.
|
getAppName | public String getAppName()(Code) | | This method gets the name of the application that the datastore is
running in
|
getAutoValidate | public boolean getAutoValidate()(Code) | | Returns true if the datastore will execute any defined validation rules
before an update
|
getBatchInserts | public boolean getBatchInserts()(Code) | | Returns whether or not the datastore will batch insert statements. |
getCheckConcurrency | public boolean getCheckConcurrency()(Code) | | Use this method to get whether or not the datastore will do a concurrency
check when rows are updated and deleted.
|
getColumnDBColumnName | public String getColumnDBColumnName(int col) throws DataStoreException(Code) | | This method returns the database name of the column not including the
table name.
|
getColumnDatabaseName | public String getColumnDatabaseName(int col) throws DataStoreException(Code) | | This method returns the database name of the column in the data store
given its index.
|
getColumnFormat | public String getColumnFormat(int col) throws DataStoreException(Code) | | This method returns the name of the database table that the column is
for.
|
getColumnInternalName | public String getColumnInternalName(int col) throws DataStoreException(Code) | | This method returns the name of the database table that the column is
for.
|
getColumnTableName | public String getColumnTableName(int col) throws DataStoreException(Code) | | This method returns the name of the database table that the column is
for.
|
getColumnsForTable | public ColumnDefinition[] getColumnsForTable(String table)(Code) | | Returns a list of column definitions for a particular table in the
database that the datastore is using. Note, the datastore must have an
app name for this method to work.
|
getConcurrencyCheckColumn | public boolean getConcurrencyCheckColumn(int col) throws DataStoreException(Code) | | This method is used to get whether a column should be used in the update,
delete concurrency check.
|
getConcurrencyCheckColumn | public boolean getConcurrencyCheckColumn(String col) throws DataStoreException(Code) | | This method is used to get whether a column should be used in the update,
delete concurrency check.
|
getCriteria | public String getCriteria()(Code) | | This method is used to get selection criteria filtering for the result
set of the datastore.
|
getDBMS | public String getDBMS()(Code) | | Returns the name of the database engine being used
|
getDbProfile | public String getDbProfile()(Code) | | the database profile this datastore is using |
getDefaultTable | public String getDefaultTable()(Code) | | This method returns the default table for the datastore
|
getDistinct | public boolean getDistinct()(Code) | | This method will return whether the distinct flag in the data store is
set. The flag indicates that the distinct keyword should be placed at the
beginning of a select statement.
|
getEnableCancel | public boolean getEnableCancel()(Code) | | Use this method to get whether or not the cancel() method of a JDBC
Statement is to be called when cancelling a retrieve.
|
getEnableThreads | public boolean getEnableThreads()(Code) | | Use this method to get whether or not the datastore does a retrieve in a
separate thread.
|
getGroupAutoRetrieveCriteria | public AutoRetrieveCriteria getGroupAutoRetrieveCriteria()(Code) | | This method will return the autoretrieve group criteria used for the
datastore.
|
getGroupBy | public String getGroupBy()(Code) | | This method returns the column list in the group by clause.
|
getHaving | public String getHaving()(Code) | | This method returns the having clause for the datastore.
|
getJoinColumnCount | public int getJoinColumnCount(int joinNo)(Code) | | This method returns the number of columns in a particular join.
|
getJoinCount | public int getJoinCount()(Code) | | This method returns the number of joins in the datastore.
|
getJoinLeftColumn | public String getJoinLeftColumn(int joinNo, int colNo)(Code) | | This method returns a column on the left side of the join.
|
getJoinOuter | public boolean getJoinOuter(int joinNo)(Code) | | This method returns the true if a particular join is outer.
|
getJoinRelationType | public int getJoinRelationType(int joinNo)(Code) | | This method returns the relation type of the join. (RELATION_ONE_TO_ONE,
RELATION_ONE_TO_MANY, RELATION_MANY_TO_ONE)
|
getJoinRightColumn | public String getJoinRightColumn(int joinNo, int colNo)(Code) | | This method returns a column on the right side of the join.
|
getMaxRows | public int getMaxRows()(Code) | | This method will return the maximum number of rows that the datastore
will retrieve. If the max is set to -1, the datastore will retrieve all
rows in the result set. Otherwise it will stop retrieving when the max is
reached.
|
getOrderBy | public String getOrderBy()(Code) | | This method returns the order by clause for the datastore.
|
getProperties | public Properties getProperties()(Code) | | This method creates a properties object containing the definition of the
data store.
|
getTable | public String getTable(int tableNo) throws DataStoreException(Code) | | This method returns the name of one of the tables used by the datastore.
Use the method getAliasCount() to find out how many tables or aliases are
used by the datastore.
The table name. |
getTableList | public String[] getTableList(boolean updateable)(Code) | | This method returns an array of all the tables referenced in the
datastore.
Parameters: updateable - True if the table list should only include updateable tablesand false if it should include all. |
getTrimStrings | public boolean getTrimStrings()(Code) | | Use this method to get whether the DataStore will trim (remove trailing
spaces) from columns retrieved from the database;
|
getUseBindColumn | public int getUseBindColumn(int col) throws DataStoreException(Code) | | This method is used to get whether a column should use bind variables for
inserts and updates. Valid values and BIND_TRUE, BIND_FALSE and
BIND_DEFAULT (Use default for datastore)
|
getUseBindColumn | public int getUseBindColumn(String col) throws DataStoreException(Code) | | This method is used to get whether a column should use bind variables for
inserts and updates. Valid values and BIND_TRUE, BIND_FALSE and
BIND_DEFAULT (Use default for datastore)
|
getUseBindForUpdate | public boolean getUseBindForUpdate()(Code) | | Use this method to get whether or not the datastore will use bind
variables as the default for updating or inserting columns.
|
isAutoIncrement | public boolean isAutoIncrement(int col) throws DataStoreException(Code) | | This method returns whether a column is an auto increment primary key
|
isAutoIncrement | public boolean isAutoIncrement(String col) throws DataStoreException(Code) | | This method returns whether a column is an auto increment primary key
|
isColumnPrimaryKey | public boolean isColumnPrimaryKey(int col) throws DataStoreException(Code) | | This method returns the name of the database table that the column is
for.
|
isPrimaryKey | public boolean isPrimaryKey(int col) throws DataStoreException(Code) | | This method returns whether a column is part of the primary key
|
isUpdateable | public boolean isUpdateable(int col) throws DataStoreException(Code) | | This method returns whether a column is updateable
|
loadConnectionParms | public void loadConnectionParms()(Code) | | Loads connection parms from the database connection object into the
datastore. This method can only be used with the datastore constructor
that takes and application name and/or profile name and will be called
automatically from those constructors
|
loadConnectionParms | public void loadConnectionParms(DBConnection conn)(Code) | | Loads connection parameters for this datastore from the specified
connection object
|
parensMatch | public static boolean parensMatch(String s)(Code) | | Returns true if the open and close parens on a string match
|
populateFromResultSet | public void populateFromResultSet(ResultSet rs) throws Exception(Code) | | Populates the datastore from a given resultSet.
Parameters: rs - the resultset. throws: Exception - |
reloadRow | public synchronized void reloadRow(int rowNo) throws DataStoreException, SQLException(Code) | | Reloads the specified row from the database. Any unsaved changes will be
overwritten.
Parameters: rowNo - |
reloadRow | public synchronized void reloadRow(DBConnection conn, int rowNo) throws DataStoreException, SQLException(Code) | | Reloads the specified row from the database. Any unsaved changes will be
overwritten.
Parameters: conn - The database connection to use to load the data Parameters: rowNo - |
removeColumn | public void removeColumn(String column)(Code) | | This method removes a column to the DataStore. And resets the datastore.
Parameters: column - The name of the column to remove to the datastore. |
removeJoin | public void removeJoin(String left, String right)(Code) | | This method is used to remove a join clause connecting two or more tables
used in the DataStore.
left:A list of column names seperated by commas on the left side ofthe join right:A list of column names seperated by commas on the right sideof the join |
removeSQLPreviewListener | public void removeSQLPreviewListener(SQLPreviewListener p)(Code) | | This method removes a listener from the list of listeners that will be
notified when a page event is fired.
|
removeTableAlias | public void removeTableAlias(String table)(Code) | | This method removes a table alias from the datastore.
Parameters: table - The name of the table to alias. |
reset | public synchronized void reset()(Code) | | This method will clear all rows in the dataStore.
|
retrieve | public void retrieve() throws java.sql.SQLException, DataStoreException(Code) | | Executes the sql statement and retrieves to data. The data is retrieved
in a new thread so the beginning of the result set can be accessed before
all the data has been retrieved. You do not need to pass a database
connection to this version of retrieve, but in order to use it the
DataStore must be created with a constructor that passes an application
(not the no args constructor).
|
retrieve | public void retrieve(DBConnection conn) throws java.sql.SQLException, DataStoreException(Code) | | Executes the sql statement and retrieves to data. The data is retrieved
in a new thread so the beginning of the result set can be accessed before
all the data has been retrieved.
Parameters: conn - The database connection to use to perform this operation. |
retrieve | public void retrieve(DBConnection conn, String criteria) throws SQLException(Code) | | Executes the sql statement and retrieves to data. The data is retrieved
in a new thread so the beginning of the result set can be accessed before
all the data has been retrieved. This method will replace the selection
criteria with the supplied argument before the data is retieved.
Parameters: conn - The database connection to use to perform this operation. Parameters: criteria - The selection criteria to use for the select. |
retrieve | public void retrieve(DBConnection conn, String criteria, PreparedStatementParms psp) throws SQLException(Code) | | Executes the sql statement and retrieves to data. The data is retrieved
in a new thread so the beginning of the result set can be accessed before
all the data has been retrieved. This method will replace the selection
criteria with the supplied argument before the data is retieved.
Parameters: conn - The database connection to use to perform this operation. Parameters: criteria - The selection criteria to use for the select in ? format. Parameters: psp - the prepared statement parameters for the criteria. |
retrieve | public void retrieve(DBConnection conn, QBEBuilder criteria) throws SQLException(Code) | | Executes the sql statement and retrieves to data. The data is retrieved
in a new thread so the beginning of the result set can be accessed before
all the data has been retrieved. This method will replace the selection
criteria with the supplied argument before the data is retieved.
Parameters: conn - The database connection to use to perform this operation. Parameters: criteria - The selection criteria QBEBuilder to use for the select. |
retrieve | public void retrieve(QBEBuilder criteria) throws SQLException, DataStoreException(Code) | | Executes the sql statement and retrieves to data. The data is retrieved
in a new thread so the beginning of the result set can be accessed before
all the data has been retrieved. This method will replace the selection
criteria with the supplied argument before the data is retieved.
Parameters: conn - The database connection to use to perform this operation. Parameters: criteria - The selection criteria QBEBuilder to use for the select. |
retrieve | public synchronized void retrieve(String criteria) throws java.sql.SQLException, DataStoreException(Code) | | Executes the sql statement and retrieves to data. The data is retrieved
in a new thread so the beginning of the result set can be accessed before
all the data has been retrieved. You do not need to pass a database
connection to this version of retrieve, but in order to use it the
DataStore must be created with a constructor that passes an application
(not the no args constructor).
|
retrieve | public synchronized void retrieve(String criteria, PreparedStatementParms psp) throws java.sql.SQLException, DataStoreException(Code) | | Executes the sql statement and retrieves to data. The data is retrieved
in a new thread so the beginning of the result set can be accessed before
all the data has been retrieved. You do not need to pass a database
connection to this version of retrieve, but in order to use it the
DataStore must be created with a constructor that passes an application
(not the no args constructor).
Parameters: criteria - The selection criteria to use for the select in ? format. Parameters: psp - the prepared statement parameters for the criteria. |
run | public void run()(Code) | | The run method for the thread that retrieves the data from the database.
This method should not be called directly. Instead use the retrieve
method.
|
setAppName | public void setAppName(String appName)(Code) | | This method sets the name of the application that the datastore is
running in
|
setAutoIncrement | public void setAutoIncrement(int col, boolean auto) throws DataStoreException(Code) | | This method is used to indicate whether a column is auto increment
|
setAutoIncrement | public void setAutoIncrement(String col, boolean auto) throws DataStoreException(Code) | | This method is used to indicate whether a column is auto increment
|
setAutoValidate | public void setAutoValidate(boolean autoValidate)(Code) | | Sets whether the datastore will execute any defined validation rules
before an update
|
setBatchInserts | public void setBatchInserts(boolean batchInserts)(Code) | | Set to true to batch insert statements. This can speed things up if you are doing a high volume of inserts
|
setCheckConcurrency | public void setCheckConcurrency(boolean truefalse)(Code) | | Use this method to set whether or not the datastore will do a concurrency
check when rows are updated and deleted. defaults to falses
|
setConcurrencyCheckColumn | public void setConcurrencyCheckColumn(int col, boolean truefalse) throws DataStoreException(Code) | | This method is used to indicate whether a column should be used in the
update, delete concurrency check.
|
setConcurrencyCheckColumn | public void setConcurrencyCheckColumn(String col, boolean truefalse) throws DataStoreException(Code) | | This method is used to indicate whether a column should be used in the
update, delete concurrency check.
|
setConnection | public void setConnection(DBConnection conn)(Code) | | This method sets the database connection that the datastore will use for
retrieves.
|
setCriteria | public void setCriteria(String criteria)(Code) | | This method is used to set selection criteria filtering for the result
set of the datastore.
Parameters: criteria - The SQL used in the WHERE clause to filter rows in the resultset. |
setDBProfile | public void setDBProfile(String dbProfile)(Code) | | This method sets the name of the database profile that datastore will use
|
setDataSourceIn | public void setDataSourceIn(DataSourceIn dsIn)(Code) | | This method is used to change the data source that the data store will
use to retrieve the data
|
setDataSourceOut | public void setDataSourceOut(DataSourceOut dsOut)(Code) | | This method is used to change the data source that the data store will
use update data
|
setDefaultTable | public void setDefaultTable(String table)(Code) | | If this DataStore will retrieve data from a single table, it isn't
necessary to pass it each time a column is added to the select statement.
Instead this method can be called an AddColumn method that does not
include table as a parameter.
Parameters: table - The default table for this DataStore |
setDistinct | public void setDistinct(boolean distinct)(Code) | | This method will set the distinct flag in the data store.
Parameters: distinct - if the flag is set to true the generated select statement willbegin with a select distinct. |
setEnableCancel | public void setEnableCancel(boolean truefalse)(Code) | | Use this method to set whether or not the cancel() method of a JDBC
Statement is to be called when cancelling a retrieve.
|
setEnableThreads | public void setEnableThreads(boolean truefalse)(Code) | | Use this method to set whether or not the datastore will do retrieves in
a separate thread
|
setGroupAutoRetrieveCriteria | public void setGroupAutoRetrieveCriteria(AutoRetrieveCriteria crit)(Code) | | This method will set the autoretrieve group criteria used for the
datastore.
|
setGroupBy | public void setGroupBy(String groupByColumns)(Code) | | This method is used to set a list of columns in the SQL Statement to
group together.
Parameters: groupByColumns - a list of columns seperated by commas. |
setHaving | public void setHaving(String havingCriteria)(Code) | | This method is used to set selection criteria that acts upon groups of
data in the result set rather than individual rows. It is used in
conjusction with the setGroupBy method.
Parameters: havingCriteria - Selection criteria for the group See Also: DataStore.setGroupBy |
setMaxRows | public void setMaxRows(int max)(Code) | | This method will set the maximum number of rows that the datastore will
retrieve. If the max is set to -1, the datastore will retrieve all rows
in the result set. Otherwise it will stop retrieving when the max is
reached.
|
setOrderBy | public void setOrderBy(String orderBy)(Code) | | Sets the order by clause of the DataStore's SQL Statement
Parameters: orderBy - The columns to use to sort the result set. |
setPrimaryKey | public void setPrimaryKey(int col, boolean pkey) throws DataStoreException(Code) | | This method is used to indicate whether a column is part of the primary
key
|
setPrimaryKey | public void setPrimaryKey(String col, boolean pkey) throws DataStoreException(Code) | | This method is used to indicate whether a column is part of the primary
key
|
setProperties | public void setProperties(Properties p)(Code) | | This method builds the datastore from the information in the properties
object.
|
setTrimStrings | public void setTrimStrings(boolean trim)(Code) | | Use this method to set whether the DataStore will trim (remove trailing
spaces) from columns retrieved from the database;
|
setUpdateMethod | public void setUpdateMethod(int updateMethod)(Code) | | Sets the update method for the datastore. This will effect the SQL
Generated when a row is modified and the changes is made to the database
via the update() method.
Parameters: updateMethod - Valid values are UPDATEMETHOD_UPDATES (will use updatestatements to change the values of rows in the database) orUPDATEMETHOD_DELETEINSERTS (will used delete statements andthen insert statements to modify rows in the database). |
setUpdateable | public void setUpdateable(int col, boolean updateable) throws DataStoreException(Code) | | This method is used to indicate whether a column is updateable
|
setUpdateable | public void setUpdateable(String col, boolean updateable) throws DataStoreException(Code) | | This method is used to indicate whether a column is updateable
|
setUseBindColumn | public void setUseBindColumn(int col, int useBind) throws DataStoreException(Code) | | This method is used to indicate whether a column should use bind
variables for inserts and updates. Valid values and BIND_TRUE, BIND_FALSE
and BIND_DEFAULT (Use default for datastore)
|
setUseBindColumn | public void setUseBindColumn(String col, int useBind) throws DataStoreException(Code) | | This method is used to indicate whether a column should use bind
variables for inserts and updates. Valid values and BIND_TRUE, BIND_FALSE
and BIND_DEFAULT (Use default for datastore)
|
setUseBindForUpdate | public void setUseBindForUpdate(boolean truefalse)(Code) | | Use this method to set whether or not the datastore will use bind
variables as the default for updating or inserting columns. This is the
default for every column in the datastore. The behavior for individual
columns can be set using the setUseBindColumn method.
|
unDeleteRow | public int unDeleteRow(int row)(Code) | | This method will take a row from the datastores deleted buffer and move
it back to the standard buffer.
Parameters: row - The number of the row to undelete. Note: this is the rownumber of the row in the deleted buffer not the standardbuffer. The number that the deleted row was moved to in the standardbuffer or -1 if an error occurs. |
union | public void union(DataStore dataStores) throws java.sql.SQLException, DataStoreException(Code) | | Use this method to retrieve the result sets from multiple data stores
into the data buffer of this one. The datastores must all be compatible
with this one in that the datatypes and number of columns in each much
match exactly. You do not need to pass a database connection to this
version of union, but in order to use it the DataStore must be created
with a constructor that passes an application (not the no args
constructor).
Parameters: dataStores - The array of data stores to union result sets together. |
union | public void union(DataStore dataStore) throws java.sql.SQLException, DataStoreException(Code) | | Use this method to retrieve the result set from a second data stores into
the data buffer of this one. The datastores must all be compatible with
this one in that the datatypes and number of columns in each much match
exactly. You do not need to pass a database connection to this version of
union, but in order to use it the DataStore must be created with a
constructor that passes an application (not the no args constructor).
Parameters: dataStore - The datastore to union with this one. |
union | public void union(DBConnection conn, DataStore dataStores) throws java.sql.SQLException(Code) | | Use this method to retrieve the result sets from multiple data stores
into the data buffer of this one. The datastores must all be compatible
with this one in that the datatypes and number of columns in each much
match exactly.
Parameters: conn - The database connection to use to perform this operation. Parameters: dataStores - The array of data stores to union result sets together. |
union | public void union(DBConnection conn, DataStore dataStore) throws java.sql.SQLException, DataStoreException(Code) | | Use this method to retrieve the result set from a second data stores into
the data buffer of this one. The datastores must all be compatible with
this one in that the datatypes and number of columns in each much match
exactly.
Parameters: conn - The database connection to use to perform this operation. Parameters: dataStore - The datastore to union with this one. |
update | public void update() throws DataStoreException, java.sql.SQLException(Code) | | This method will cause the database to reflect the changes made in the
data store's buffer. All transaction operations are handled within the
datastore. You do not need to pass a database connection to this version
of update, but in order to use it the DataStore must be created with a
constructor that passes an application (not the no args constructor).
exception: com.salmonllc.sql.DataStoreException - If a SQLError occurs while the datastore is updating. |
update | public void update(DBConnection conn, boolean handleTrans) throws DataStoreException, java.sql.SQLException(Code) | | This method will cause the database to reflect the changes made in the
data store's buffer.
Parameters: conn - The database connection to use to perform this operation. Parameters: handleTrans - True if the update should perform it's own transactionmanagement and false if the transaction management will behandled outside the datastore. exception: com.salmonllc.sql.DataStoreException - If a SQLError occurs while the datastore is updating. |
Methods inherited from com.salmonllc.sql.DataStoreBuffer | public void addBucket(String internalname, int type)(Code)(Java Doc) public void addBucket(String internalname, int type, String format)(Code)(Java Doc) public void addExpressionRule(String column, DataStoreExpression expression, String errorMessage, boolean executeOnServer) throws DataStoreException(Code)(Java Doc) public void addExpressionRule(String column, String expression, String errorMessage) throws DataStoreException(Code)(Java Doc) public void addExpressionRule(int column, DataStoreExpression expression, String errorMessage, boolean executeOnServer) throws DataStoreException(Code)(Java Doc) public void addExpressionRule(int column, String expression, String errorMessage) throws DataStoreException(Code)(Java Doc) public void addJavaScriptRule(String column, String javaScript, String errorMessage) throws DataStoreException(Code)(Java Doc) public void addJavaScriptRule(int column, String javaScript, String errorMessage) throws DataStoreException(Code)(Java Doc) public void addLookupRule(String column, String lookupTable, String searchExpression, String descriptionColumn, String descriptionBucket, String errorMessage) throws DataStoreException(Code)(Java Doc) public void addLookupRule(int column, String lookupTable, String searchExpression, String descriptionColumn, String descriptionBucket, String errorMessage) throws DataStoreException(Code)(Java Doc) public void addModelChangedListener(ModelChangedListener l)(Code)(Java Doc) public void addRangeRule(int column, Object minValue, Object maxValue, String errorMessage) throws DataStoreException(Code)(Java Doc) public void addRangeRule(String column, Object minValue, Object maxValue, String errorMessage) throws DataStoreException(Code)(Java Doc) public void addRequiredRule(String column, String errorMessage) throws DataStoreException(Code)(Java Doc) public void addRequiredRule(int column, String errorMessage) throws DataStoreException(Code)(Java Doc) public void addReqularExpressionRule(String column, String regExp, String errorMessage) throws DataStoreException(Code)(Java Doc) public void addReqularExpressionRule(int column, String regExp, String errorMessage) throws DataStoreException(Code)(Java Doc) public void addTypeCheckRule(String column, String errorMessage) throws DataStoreException(Code)(Java Doc) public void addTypeCheckRule(int column, String errorMessage) throws DataStoreException(Code)(Java Doc) int addValidationRule(int column, ValidationRule rule) throws DataStoreException(Code)(Java Doc) int addValidationRule(String column, ValidationRule rule) throws DataStoreException(Code)(Java Doc) public void appendRows(Vector rows)(Code)(Java Doc) protected boolean areThereModelListeners()(Code)(Java Doc) public void autoRetrieve() throws Exception(Code)(Java Doc) public void clearAllValidationRules()(Code)(Java Doc) public void clearSelectedRow()(Code)(Java Doc) public void clearTempValues(int row) throws DataStoreException(Code)(Java Doc) public void clearTempValues() throws DataStoreException(Code)(Java Doc) public void clearValidationRules(int column) throws DataStoreException(Code)(Java Doc) public void clearValidationRules(String column) throws DataStoreException(Code)(Java Doc) public int compareRows(int row1, int row2, int[] cols)(Code)(Java Doc) public int compareRows(int row1, int row2, String[] cols)(Code)(Java Doc) public Object convertValue(String val, String columnName) throws DataStoreException(Code)(Java Doc) public static Object convertValue(String val, int dataType) throws ParseException(Code)(Java Doc) void copyMasterDataValuesToRow(DataStoreBuffer.TablesRelationshipDescription dsTables, DataStoreRow fromrow, DataStoreRow torow) throws DataStoreException(Code)(Java Doc) void copyMasterDataValuesToRow(DataStoreBuffer.TablesRelationshipDescription dsTables, DataStoreRow fromrow, DataStoreRow torow, int iTableRow) throws DataStoreException(Code)(Java Doc) void copyMasterKeyValuesToRow(DataStoreBuffer.TablesRelationshipDescription dsTables, DataStoreRow fromrow, DataStoreRow torow, int iTableRow) throws DataStoreException(Code)(Java Doc) public boolean deleteRow()(Code)(Java Doc) public boolean deleteRow(int row)(Code)(Java Doc) public String export() throws com.salmonllc.sql.DataStoreException(Code)(Java Doc) public void export(int format, boolean includeHeaders, PrintWriter p)(Code)(Java Doc) public void export(PrintWriter p) throws com.salmonllc.sql.DataStoreException(Code)(Java Doc) public void filter(String filter) throws DataStoreException(Code)(Java Doc) public void filterQBE(QBEBuilder filter) throws DataStoreException(Code)(Java Doc) public synchronized int find(int start, int end) throws DataStoreException(Code)(Java Doc) public synchronized boolean findFirst() throws DataStoreException(Code)(Java Doc) public synchronized boolean findLast() throws DataStoreException(Code)(Java Doc) public synchronized boolean findNext() throws DataStoreException(Code)(Java Doc) public synchronized boolean findPrior() throws DataStoreException(Code)(Java Doc) public static String fixQuote(String data, int dataType)(Code)(Java Doc) public static String fixQuote(String data, int dataType, String connectionType)(Code)(Java Doc) protected String fixSpecialHTMLCharacters(String input)(Code)(Java Doc) public boolean getAllowMasterRowDelete()(Code)(Java Doc) public Object getAny(int column) throws DataStoreException(Code)(Java Doc) public Object getAny(int row, int column) throws DataStoreException(Code)(Java Doc) public Object getAny(int row, String column) throws DataStoreException(Code)(Java Doc) public Object getAny(String column) throws DataStoreException(Code)(Java Doc) public boolean getAutoBind()(Code)(Java Doc) public int getAutoRetrieve()(Code)(Java Doc) public AutoRetrieveCriteria getAutoRetrieveCriteria()(Code)(Java Doc) static String getBoolProperty(boolean p)(Code)(Java Doc) public boolean getBucketsModified()(Code)(Java Doc) public boolean getBucketsModified(int row)(Code)(Java Doc) public byte[] getByteArray(int column) throws DataStoreException(Code)(Java Doc) public byte[] getByteArray(int row, int column) throws DataStoreException(Code)(Java Doc) public byte[] getByteArray(int row, String column) throws DataStoreException(Code)(Java Doc) public byte[] getByteArray(String column) throws DataStoreException(Code)(Java Doc) public int getColumnCount()(Code)(Java Doc) public int getColumnDataType(int column) throws DataStoreException(Code)(Java Doc) public int getColumnDataType(String column) throws DataStoreException(Code)(Java Doc) public int getColumnIndex(String column)(Code)(Java Doc) public String[] getColumnList()(Code)(Java Doc) public String getColumnName(int col) throws DataStoreException(Code)(Java Doc) DSDataRow getDataRow(int rowNo)(Code)(Java Doc) public DataStoreRow getDataStoreRow(int rowNo, int buffer) throws DataStoreException(Code)(Java Doc) public java.sql.Date getDate(int column) throws DataStoreException(Code)(Java Doc) public java.sql.Date getDate(int row, int column) throws DataStoreException(Code)(Java Doc) public java.sql.Date getDate(int row, String column) throws DataStoreException(Code)(Java Doc) public java.sql.Date getDate(String column) throws DataStoreException(Code)(Java Doc) public Timestamp getDateTime(int column) throws DataStoreException(Code)(Java Doc) public Timestamp getDateTime(int row, int column) throws DataStoreException(Code)(Java Doc) public Timestamp getDateTime(int row, String column) throws DataStoreException(Code)(Java Doc) public java.sql.Timestamp getDateTime(String column) throws DataStoreException(Code)(Java Doc) public int getDeletedCount()(Code)(Java Doc) DSDataStoreDescriptor getDescriptor()(Code)(Java Doc) public double getDouble(int column) throws DataStoreException(Code)(Java Doc) public double getDouble(int row, int column) throws DataStoreException(Code)(Java Doc) public double getDouble(int row, String column) throws DataStoreException(Code)(Java Doc) public double getDouble(String column) throws DataStoreException(Code)(Java Doc) public int getFilteredCount()(Code)(Java Doc) public float getFloat(int column) throws DataStoreException(Code)(Java Doc) public float getFloat(int row, int column) throws DataStoreException(Code)(Java Doc) public float getFloat(int row, String column) throws DataStoreException(Code)(Java Doc) public float getFloat(String column) throws DataStoreException(Code)(Java Doc) public String getFormat(int col) throws DataStoreException(Code)(Java Doc) public String getFormat(String col) throws DataStoreException(Code)(Java Doc) public String getFormattedString(int column) throws DataStoreException(Code)(Java Doc) public String getFormattedString(int row, int column) throws DataStoreException(Code)(Java Doc) public String getFormattedString(int row, String column) throws DataStoreException(Code)(Java Doc) public String getFormattedString(String column) throws DataStoreException(Code)(Java Doc) public int getInt(int column) throws DataStoreException(Code)(Java Doc) public int getInt(int row, int column) throws DataStoreException(Code)(Java Doc) public int getInt(int row, String column) throws DataStoreException(Code)(Java Doc) public int getInt(String column) throws DataStoreException(Code)(Java Doc) static String getIntProperty(int p)(Code)(Java Doc) public LanguagePreferences getLang()(Code)(Java Doc) public long getLong(int column) throws DataStoreException(Code)(Java Doc) public long getLong(int row, int column) throws DataStoreException(Code)(Java Doc) public long getLong(int row, String column) throws DataStoreException(Code)(Java Doc) public long getLong(String column) throws DataStoreException(Code)(Java Doc) protected Vector getModelListeners()(Code)(Java Doc) public Object getNullDefault(int dataType)(Code)(Java Doc) protected int getObjectType(Object obj)(Code)(Java Doc) public Properties getProperties()(Code)(Java Doc) public int getProxyRow(int rowNo)(Code)(Java Doc) public String getRemoteID()(Code)(Java Doc) public String getRemoteUpdateReturnValue()(Code)(Java Doc) public int getRow()(Code)(Java Doc) public int getRowCount()(Code)(Java Doc) public int getRowStatus()(Code)(Java Doc) public int getRowStatus(int row)(Code)(Java Doc) public Vector getRows()(Code)(Java Doc) public short getShort(int column) throws DataStoreException(Code)(Java Doc) public short getShort(int row, int column) throws DataStoreException(Code)(Java Doc) public short getShort(int row, String column) throws DataStoreException(Code)(Java Doc) public short getShort(String column) throws DataStoreException(Code)(Java Doc) public String getString(int column) throws DataStoreException(Code)(Java Doc) public String getString(int row, int column) throws DataStoreException(Code)(Java Doc) public String getString(int row, String column) throws DataStoreException(Code)(Java Doc) public String getString(String column) throws DataStoreException(Code)(Java Doc) static String getStringProperty(String p)(Code)(Java Doc) public String[] getTableList(boolean updateable)(Code)(Java Doc) TablesRelationshipDescription getTablesRelationshipDescription(DataStoreInterface ds)(Code)(Java Doc) TablesRelationshipDescription getTablesRelationshipDescription(DataStoreInterface ds, boolean bUpdateable)(Code)(Java Doc) public String getTempValue(int row, int column) throws DataStoreException(Code)(Java Doc) public String getTempValue(int row, String column) throws DataStoreException(Code)(Java Doc) public String getTempValue(String column) throws DataStoreException(Code)(Java Doc) public String getTempValue(int column) throws DataStoreException(Code)(Java Doc) public java.sql.Time getTime(int column) throws DataStoreException(Code)(Java Doc) public java.sql.Time getTime(int row, int column) throws DataStoreException(Code)(Java Doc) public java.sql.Time getTime(int row, String column) throws DataStoreException(Code)(Java Doc) public java.sql.Time getTime(String column) throws DataStoreException(Code)(Java Doc) public static String getTypeDescription(int type)(Code)(Java Doc) public ValidationRule[] getValidationRulesForColumn(int colNo)(Code)(Java Doc) public synchronized boolean gotoFirst()(Code)(Java Doc) public synchronized boolean gotoLast()(Code)(Java Doc) public synchronized boolean gotoNext()(Code)(Java Doc) public synchronized boolean gotoPrior()(Code)(Java Doc) public synchronized boolean gotoRow(int row)(Code)(Java Doc) public boolean hasManyToOneRelationship()(Code)(Java Doc) public boolean hasTempValues(int row) throws DataStoreException(Code)(Java Doc) public void importRow(com.salmonllc.xml.Row row) throws DataStoreException(Code)(Java Doc) public int insertRow()(Code)(Java Doc) public int insertRow(int atPosition)(Code)(Java Doc) protected synchronized void interruptWaitingCancelThreads()(Code)(Java Doc) protected synchronized void interruptWaitingRetrieveThreads()(Code)(Java Doc) public boolean isColumnInOneToManyRelationship(String sColumn)(Code)(Java Doc) public boolean isColumnModified(int row, int column) throws DataStoreException(Code)(Java Doc) public boolean isColumnModified(int row, String column) throws DataStoreException(Code)(Java Doc) public boolean isFormattedStringValid(int column, String value) throws DataStoreException(Code)(Java Doc) public boolean isFormattedStringValid(String column, String value) throws DataStoreException(Code)(Java Doc) public void notifyListeners(ModelChangedEvent e)(Code)(Java Doc) protected void notifyListeners(int type)(Code)(Java Doc) public void removeModelChangedListener(ModelChangedListener l)(Code)(Java Doc) public boolean removeRow()(Code)(Java Doc) public boolean removeRow(int row)(Code)(Java Doc) public synchronized void reset()(Code)(Java Doc) public void resetStatus()(Code)(Java Doc) public void setAllowMasterRowDelete(boolean bAllow)(Code)(Java Doc) public void setAny(int row, int column, Object value) throws DataStoreException(Code)(Java Doc) public void setAny(int column, Object value) throws DataStoreException(Code)(Java Doc) public void setAny(int row, String column, Object value) throws DataStoreException(Code)(Java Doc) public void setAny(String column, Object value) throws DataStoreException(Code)(Java Doc) public void setAutoBind(boolean value)(Code)(Java Doc) public void setAutoRetrieve(int value)(Code)(Java Doc) public void setAutoRetrieveCriteria(AutoRetrieveCriteria crit)(Code)(Java Doc) static boolean setBoolProperty(String p)(Code)(Java Doc) public void setBucketsModified(int row, boolean modified)(Code)(Java Doc) public void setBucketsModified(boolean modified)(Code)(Java Doc) public void setByteArray(int column, byte[] value) throws DataStoreException(Code)(Java Doc) public void setByteArray(int row, int column, byte[] value) throws DataStoreException(Code)(Java Doc) public void setByteArray(int row, String column, byte[] value) throws DataStoreException(Code)(Java Doc) public void setByteArray(String column, byte[] value) throws DataStoreException(Code)(Java Doc) protected void setCurrentRow(int currentRow)(Code)(Java Doc) public void setDataStoreRow(int rowNo, int buffer, DataStoreRow row) throws DataStoreException(Code)(Java Doc) public void setDate(int row, int column, java.sql.Date value) throws DataStoreException(Code)(Java Doc) public void setDate(int row, String column, java.sql.Date value) throws DataStoreException(Code)(Java Doc) public void setDate(int column, java.sql.Date value) throws DataStoreException(Code)(Java Doc) public void setDate(String column, java.sql.Date value) throws DataStoreException(Code)(Java Doc) public void setDateTime(int row, int column, java.sql.Timestamp value) throws DataStoreException(Code)(Java Doc) public void setDateTime(int row, String column, java.sql.Timestamp value) throws DataStoreException(Code)(Java Doc) public void setDateTime(int column, java.sql.Timestamp value) throws DataStoreException(Code)(Java Doc) public void setDateTime(String column, java.sql.Timestamp value) throws DataStoreException(Code)(Java Doc) public void setDistinct(boolean distinct)(Code)(Java Doc) public void setDouble(int column, double value) throws DataStoreException(Code)(Java Doc) public void setDouble(int row, int column, double value) throws DataStoreException(Code)(Java Doc) public void setDouble(int row, String column, double value) throws DataStoreException(Code)(Java Doc) public void setDouble(String column, double value) throws DataStoreException(Code)(Java Doc) public void setFindExpression(String exp) throws DataStoreException(Code)(Java Doc) public void setFloat(int column, float value) throws DataStoreException(Code)(Java Doc) public void setFloat(int row, int column, float value) throws DataStoreException(Code)(Java Doc) public void setFloat(int row, String column, float value) throws DataStoreException(Code)(Java Doc) public void setFloat(String column, float value) throws DataStoreException(Code)(Java Doc) public void setFormat(int col, String format) throws DataStoreException(Code)(Java Doc) public void setFormat(String col, String format) throws DataStoreException(Code)(Java Doc) public void setFormattedString(int row, int column, String value) throws DataStoreException(Code)(Java Doc) public void setFormattedString(int column, String value) throws DataStoreException(Code)(Java Doc) public void setFormattedString(int row, String column, String value) throws DataStoreException(Code)(Java Doc) public void setFormattedString(String column, String value) throws DataStoreException(Code)(Java Doc) public void setInt(int row, int column, int value) throws DataStoreException(Code)(Java Doc) public void setInt(int row, String column, int value) throws DataStoreException(Code)(Java Doc) public void setInt(String column, int value) throws DataStoreException(Code)(Java Doc) static int setIntProperty(String p)(Code)(Java Doc) public void setLang(LanguagePreferences preferences)(Code)(Java Doc) public void setLong(int row, int column, long value) throws DataStoreException(Code)(Java Doc) public void setLong(int column, long value) throws DataStoreException(Code)(Java Doc) public void setLong(int row, String column, long value) throws DataStoreException(Code)(Java Doc) public void setLong(String column, long value) throws DataStoreException(Code)(Java Doc) public void setNullDefault(int dataType, Object defaultValue)(Code)(Java Doc) public void setOrderBy(String orderBy)(Code)(Java Doc) public void setPrimaryKey(int col, boolean pkey) throws DataStoreException(Code)(Java Doc) public void setPrimaryKey(String col, boolean pkey) throws DataStoreException(Code)(Java Doc) public void setProperties(Properties p)(Code)(Java Doc) public void setRemoteID(String remoteID)(Code)(Java Doc) public void setRemoteUpdateReturnValue(String update)(Code)(Java Doc) public boolean setRowStatus(int status)(Code)(Java Doc) public boolean setRowStatus(int row, int status)(Code)(Java Doc) public void setRows(Vector rows)(Code)(Java Doc) public void setShort(int row, int column, short value) throws DataStoreException(Code)(Java Doc) public void setShort(int row, String column, short value) throws DataStoreException(Code)(Java Doc) public void setShort(int column, short value) throws DataStoreException(Code)(Java Doc) public void setShort(String column, short value) throws DataStoreException(Code)(Java Doc) public void setString(int row, int column, String value) throws DataStoreException(Code)(Java Doc) public void setString(int column, String value) throws DataStoreException(Code)(Java Doc) public void setString(int row, String column, String value) throws DataStoreException(Code)(Java Doc) public void setString(String column, String value) throws DataStoreException(Code)(Java Doc) static String setStringProperty(String p)(Code)(Java Doc) public void setTempValue(int row, int col, String value) throws DataStoreException(Code)(Java Doc) public void setTempValue(int col, String value) throws DataStoreException(Code)(Java Doc) public void setTempValue(String col, String value) throws DataStoreException(Code)(Java Doc) public void setTime(int row, int column, java.sql.Time value) throws DataStoreException(Code)(Java Doc) public void setTime(int row, String column, java.sql.Time value) throws DataStoreException(Code)(Java Doc) public void setTime(int column, java.sql.Time value) throws DataStoreException(Code)(Java Doc) public void setTime(String column, java.sql.Time value) throws DataStoreException(Code)(Java Doc) public void sort(int[] col, int dir) throws DataStoreException(Code)(Java Doc) public void sort(int[] col, int dir, boolean bUseQSAlgoritm) throws DataStoreException(Code)(Java Doc) public void sort(Object[] obj, int dir) throws DataStoreException(Code)(Java Doc) public void sort(String col, int dir) throws DataStoreException(Code)(Java Doc) public void sort(int col, int dir) throws DataStoreException(Code)(Java Doc) public void sort(DataStoreEvaluator eval, int dir) throws DataStoreException(Code)(Java Doc) public void sort(String col, int dir) throws DataStoreException(Code)(Java Doc) public int unDeleteRow(int row)(Code)(Java Doc) public void undoChanges(int row)(Code)(Java Doc) public DataStoreException[] validateColumn(int rowNo, String colName, DBConnection conn)(Code)(Java Doc) public DataStoreException[] validateColumn(int rowNo, int colNo, DBConnection conn)(Code)(Java Doc) protected void validateColumn(int rowNo, int colNo, Vector v, DBConnection conn)(Code)(Java Doc) public DataStoreException[] validateRow(int rowNo, DBConnection conn)(Code)(Java Doc) public DataStoreException[] validateRowsToUpdate(DBConnection conn, boolean stopAtFirstError)(Code)(Java Doc) public boolean valueEqual(int row, int col, Object value) throws DataStoreException(Code)(Java Doc) public boolean valueGreater(int row, int col, Object value) throws DataStoreException(Code)(Java Doc) public boolean valueLess(int row, int col, Object value) throws DataStoreException(Code)(Java Doc) public void waitForCancel()(Code)(Java Doc) public void waitForRetrieve()(Code)(Java Doc) public void waitForRetrieve(int iSeconds)(Code)(Java Doc) protected void waitForRow(int row)(Code)(Java Doc)
|
|
|