bindDeleteStatement(EntityImpl entityContext,
java.sql.PreparedStatement stmt)
Binds the values in the entity attribute storage with the DELETE
statement.

void

bindEffDtDateDayAddStatement(java.sql.PreparedStatement stmt,
java.lang.Object date,
int days)
Bind the statement with the values required
to compute a date that is 'x' number of days
apart from the specified date

buildDefaultViewObjectFromClause(java.lang.StringBuffer fromClause,
java.util.List eRefs,
BaseViewCriteriaManagerImpl vcManager)
This method is used to generate the "from" clause if the following
conditions are met:
The View Object definition does not have an expert mode query
The View Object definition is set to generate "from" clause during runtime,
either in metadata or by calling
ViewDefImpl.setFromClauseFlags(ViewDefImpl.CLAUSE_GENERATE_RT)

java.util.HashMap

buildDefaultViewObjectWhereClause(java.lang.StringBuffer whereClause,
java.util.List eRefs,
java.util.List forcedERefs,
EntityReference[][] newEntRefsArr,
boolean isInlineViewForFroms)
This method is used to generate the "where" clause if the following
conditions are met:
The View Object definition does not specify "where" clause
The View Object definition is set to generate "where" clause during runtime,
either in metadata or by calling
ViewDefImpl.setWhereClauseFlags(ViewDefImpl.CLAUSE_GENERATE_RT)

compareFetchedValue(EntityImpl entity,
AttributeDefImpl ad,
java.lang.Object cacheValue,
java.lang.Object fetchedValue)
Compare the cacheValue with fetchedValue and if they are equal return true
This API is used when comparing cached entity with a faulted in entity.

getConstraintsList(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema,
java.lang.String table)
Return vector with constraint details for this table
where each detail is in a String array with this structure:
0 String owner

java.lang.String

getCreateSequenceInsertTriggerSQL(java.lang.String triggerName,
java.lang.String tableName,
java.util.ArrayList sequenceNames,
java.util.ArrayList colNames)
Returns a SQL statement that creates a trigger that
updates a column with the value from a sequence
upon the creation of a new row.

java.lang.String

getCreateSequenceSQL(java.lang.String sequenceName,
int startVal)
Returns a SQL statement that creates a Sequence with
an initial value specified in the argument.

java.sql.Timestamp

getCurrentDbTime(java.sql.Connection conn)
Returns the current time from the Database.

invalidDatumFactoryUsage(java.lang.String colType,
int id,
java.lang.Class clz)
Returns false only for types where raw-bytes may be used to create the desired
attribute values while fetching data from jdbc.

buildInsertStatement

Build a INSERT SQL for the Entity Object skipping non-persistent
values. If there are attributes in the Entity Object that need to
be fetched after the INSERT succeeds, a CallableStatement
is created to fetch those values.

Note: this method is subject to change.

Parameters:

entityContext - the entity object.

cols - the columns to be included in the INSERT statement.

retrCols - the Columns whose values need to be fetched after the INSERT succeeds.

retrKeyCols - the Columns that are used as Keys to fetch post-insert values.

batchMode - a flag to indicate if the INSERT statement needs to be optimized
for batch mode.

Returns:

a StringBuffer object containing the INSERT statement.

buildUpdateStatement

Build a UPDATE SQL for the Entity Object skipping non-persistent
values. If there are attributes in the Entity Object that need to
be fetched after the UPDATE succeeds, a CallableStatement
is created to fetch those values.

Note: this method is subject to change.

Parameters:

entityContext - the entity object.

cols - the columns to be included in the UPDATE statement.

retrCols - the Columns whose values need to be fetched after the UPDATE succeeds.

retrKeyCols - the Columns that are used as Keys to fetch post-update values.

batchMode - a flag to indicate if the UPDATE statement needs to be optimized
for batch mode.

Construct a SQL SELECT statement for the Entity into the
designated Buffer.
This routine will construct a SQL SELECT statement in the
StringBuffer passed. It does this by appending the various
components of the SELECT statement into the buffer area.

Note: this method is subject to change.

Parameters:

trans - a reference to the transaction object.

buffer - the StringBuffer object to which the SELECT statement is appended.

sourceName - the database object from which the Columns are selected.

sourceAlias - the database object alias.

attrs - the attributes that are selected from the database object.

withIntoClause - a boolean that indicates if an INTO Clause needs to be generated.

bindingStyle - specifies if Oracle, Oracle named parameter or JDBC binding style
is used in generating the parameter markers for the INTO clause.

a String containing the real table name. Note that
even if the argument is a table name it may be altered to enforce
consistent naming convention. For non-Oracle databases the
name is returned unaltered.

Throws:

java.sql.SQLException

checkTableNameForQuotes

java.lang.String checkTableNameForQuotes(java.lang.String tableName)

Add quotes to any table name that may need it.

Note: this method is subject to change.

Parameters:

tableName - the name of the table.

Returns:

the quoted table name if needed otherwise returns the table name
unaltered.

doRefreshSQL

Refreshes the entity after an update on the database.
The refresh depends entirely on, the attributes which were modified. If no
UNIQUE/PRIMARY KEY attribute was set in the application, or they are
modified in a database trigger then the refresh may not be able to find
the required row. In this situation RowNotFoundException will be thrown.
If there is good reason behind not setting any of the KEY attributes,
then, in a custom SQLBuilder, this method should be overriden.

Note: this method is subject to change.

Parameters:

entityContext - the Entity row.

operation - SQL Operation

columns - Columns to be selected.

keyCols - Key columns to appear be to used to refresh, which appear in WHERE clause.

compareFetchedValue

Compare the cacheValue with fetchedValue and if they are equal return true
This API is used when comparing cached entity with a faulted in entity.
Signature modified since 9.0.5.1 to allow for Entity context to be available
during compare so that Applications could perform custom comparision logic
based on either settings in the Entity or any other context available via the
entity.

buildDefaultViewObjectFromClause

This method is used to generate the "from" clause if the following
conditions are met:

The View Object definition does not have an expert mode query

The View Object definition is set to generate "from" clause during runtime,
either in metadata or by calling
ViewDefImpl.setFromClauseFlags(ViewDefImpl.CLAUSE_GENERATE_RT)

Parameters:

fromClause - A StringBuffer object that would be appended with
the generated "from" clause.

eRefs - The EntityReference objects that should be considered
for generation of the "from" clause.

vcManager - In ANSI generation, view criteria associated with the
EntityAssociationReference are part of the FROM clause, and vcManager
is used to build the where clause fragment.
if NULL, view criteria won't be built

handleSQLException

Performs extra processing before re-throwing JboSQLException.
At minimum, BaseSQLBuilderImpl checks if the the nested
SQLException is recoverable and marks as such if true,
which may be used for special handling in database failover scenario.