|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.jbo.common.CommonCriteriaAdapter
oracle.jbo.server.CriteriaAdapterImpl
oracle.jbo.server.BaseSQLBuilderImpl
oracle.jbo.server.OLiteSQLBuilderImpl
public class OLiteSQLBuilderImpl
OracleLite specific implementation of the SQLBuilder interface.
Field Summary | |
---|---|
static int |
ERROR_OLITE_RESOURCE_BUSY_AND_NOWAIT_SPECIFIED
OLite specific error code for resource busy exception. |
protected static java.lang.String |
ORACLE_ROWID_COLUMN
Oracle specific column name for ROWID. |
Fields inherited from class oracle.jbo.server.BaseSQLBuilderImpl |
---|
LOGGER_NAME |
Fields inherited from interface oracle.jbo.server.SQLBuilder |
---|
BINDING_STYLE_JDBC, BINDING_STYLE_ORACLE, BINDING_STYLE_ORACLE_NAME, BINDING_STYLE_UNKNOWN, DML_DELETE, DML_INSERT, DML_UPDATE, MAX_COLUMN_IDENTIFIER_LEN, RANGE_PAGE_BIND_HIGH_ROWNUM, RANGE_PAGE_BIND_LOW_ROWNUM |
Constructor Summary | |
---|---|
protected |
OLiteSQLBuilderImpl()
This is a singleton class. |
Method Summary | |
---|---|
protected static java.lang.String |
addSqlTypeText(java.lang.String sqlText,
java.lang.String inputType)
A helper method for getTables. |
protected int |
bindWhereAttrValue(EntityImpl entityContext,
DBTransactionImpl trans,
java.sql.PreparedStatement stmt,
AttributeDefImpl attrDef,
int bindIndex,
boolean skipNull)
Binds an attribute value to the Statement's WHERE clause parameter index dealing with Null values appropriately. |
java.lang.String |
buildEffDtDateDayAddStatement()
Returns a statement that returns a date that is 'x' number of days apart from the specified date. |
protected boolean |
capabilityCanReuseLockStatements()
Cannot reuse lock statements for OLite database . |
java.lang.Object |
doLoadFromResultSet(java.lang.Object theTypeFactory,
java.lang.Object theElemFactory,
java.lang.Class theJavaType,
byte attrLoad,
java.sql.ResultSet rs,
int index,
DBTransactionImpl trans)
Loads an object from a result set. |
java.lang.String |
getBaseTable(java.sql.Connection conn,
java.lang.String schema,
java.lang.String name)
Unroll any synonyms that may be present, and get the real objectname. |
java.lang.String |
getClauseForDateLiteral(java.util.Date date)
Creates a database platform specific clause for converting a date string literal to date datatype. |
java.lang.String |
getCreateSequenceInsertTriggerSQL(java.lang.String triggerName,
java.lang.String tableName,
java.util.ArrayList sequenceNames,
java.util.ArrayList colNames)
This method is not implemented for OLite SQLBuilder. |
java.lang.String |
getCreateSequenceSQL(java.lang.String sequenceName,
int startVal)
This method is not implemented for OLite SQLBuilder. |
java.util.ArrayList |
getDBOperationList(java.sql.Connection connection,
java.lang.String userName,
java.lang.String packageFilter,
java.lang.String operationFilter)
Return a list of packages visible in this connection. |
java.util.ArrayList |
getDBPackageList(java.sql.Connection connection,
java.lang.String userName,
java.lang.String packageFilter)
Return a list of packages visible in this connection. |
java.lang.String |
getDbTimeQuery()
Returns a SQL statement to obtain the current time from the database. |
java.lang.String |
getDbType()
Returns a string uniquely identifying this type of SQLBuilder. |
int |
getDefaultBindingStyle()
Default binding style for this SQLBuilder is JDBC. |
java.lang.String |
getDropSequenceSQL(java.lang.String sequenceName)
This method is not implemented for OLite SQLBuilder. |
java.lang.String |
getDropTableSQL(java.lang.String dbObjectName)
Returns a SQL statement that drops a specified table. |
static SQLBuilder |
getInterface()
Gets the singleton instance of this class. |
protected java.lang.String |
getJDBCDriverClassName(java.lang.String url)
Concrete implementations of SQLBuilder must elect a default driver name. |
java.lang.String |
getPersistManagerClassName()
Returns the name of default PersistManager class name. |
protected java.lang.String |
getSqlVariantLockTrailer()
This defines the string that will be post-fixed to SQL statements to have the rows locked - if the DB is incapable of this then it should return null. |
protected static java.lang.String |
getTableListSqlStatement(java.lang.String _defaultUserName,
java.lang.String userName,
boolean bTable,
boolean bAlias,
boolean bView,
boolean _bSnap,
boolean bCount)
A helper method for getTableListSqlStatement. |
protected static java.lang.String |
getTableListSqlStatement(java.lang.String _defaultUserName,
java.lang.String userName,
java.lang.String nameFilter,
boolean bTable,
boolean bAlias,
boolean bView,
boolean _bSnap,
boolean bCount)
A helper method for getTableListSqlStatement. |
java.util.ArrayList |
getTables(java.sql.Connection conn,
java.lang.String defaultUserName,
java.lang.String userName,
boolean bTable,
boolean bAlias,
boolean bView,
boolean bSnap)
Return a list of tables visible in this connection. |
java.util.ArrayList |
getTables(java.sql.Connection conn,
java.lang.String defaultUserName,
java.lang.String userName,
java.lang.String nameFilter,
boolean bTable,
boolean bAlias,
boolean bView,
boolean bSnap)
Return a list of tables visible in this connection. |
java.lang.String |
getTypeMapName()
The default type map for a OLite database is OLITE. |
java.lang.String |
getVersion()
Gets a string describing the version of this implentation of this interface. |
boolean |
isDisplayBindValueUI()
For Oracle database the test SQL wizards provide additional functionality to bind the parameters with test values. |
Methods inherited from class oracle.jbo.server.CriteriaAdapterImpl |
---|
formatAttributeValue, getBindValsForSqlGen, getFormattedLHSCompareFragment, getFormattedRHSCompareFragment, getRowSetForSqlGen, getViewCriteriaClause, getWhereFragmentFromVO, isCriteriaItemOuterJoined, isLHSFragmentOptional, setupBindVarExtendedData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.jbo.server.SQLBuilder |
---|
isCharType, isNumericType |
Field Detail |
---|
public static final int ERROR_OLITE_RESOURCE_BUSY_AND_NOWAIT_SPECIFIED
protected static final java.lang.String ORACLE_ROWID_COLUMN
Constructor Detail |
---|
protected OLiteSQLBuilderImpl()
Method Detail |
---|
public static SQLBuilder getInterface()
protected java.lang.String getJDBCDriverClassName(java.lang.String url)
BaseSQLBuilderImpl
getJDBCDriverClassName
in class BaseSQLBuilderImpl
url
- JDBC Connection url.
public java.lang.String getVersion()
SQLBuilder
getVersion
in interface SQLBuilder
getVersion
in class BaseSQLBuilderImpl
public java.lang.String getDbType()
SQLBuilder
getDbType
in interface SQLBuilder
getDbType
in class BaseSQLBuilderImpl
public java.lang.String getTypeMapName()
getTypeMapName
in interface SQLBuilder
getTypeMapName
in class BaseSQLBuilderImpl
public java.lang.String getPersistManagerClassName()
SQLBuilder
getPersistManagerClassName
in interface SQLBuilder
getPersistManagerClassName
in class BaseSQLBuilderImpl
public int getDefaultBindingStyle()
getDefaultBindingStyle
in interface SQLBuilder
getDefaultBindingStyle
in class BaseSQLBuilderImpl
public java.util.ArrayList getTables(java.sql.Connection conn, java.lang.String defaultUserName, java.lang.String userName, boolean bTable, boolean bAlias, boolean bView, boolean bSnap) throws java.lang.Exception
SQLBuilder
getTables(Connection, String, String, String, boolean, boolean, boolean, boolean)
with
no filter on the table name.
Note: this method is subject to change.
getTables
in interface SQLBuilder
getTables
in class BaseSQLBuilderImpl
conn
- the connection object.defaultUserName
- the user name of the connection. This is will also
be treated as the schema name for non-oracle databases.userName
- the user name for which the tables need to be listed.bTable
- flag to include Table objects in the list.bAlias
- flag to include Synonyms in the list - Oracle database only.bView
- flag to include View objects in the list.bSnap
- flag to include Materialized View objects in the list.
java.lang.Exception
public java.util.ArrayList getTables(java.sql.Connection conn, java.lang.String defaultUserName, java.lang.String userName, java.lang.String nameFilter, boolean bTable, boolean bAlias, boolean bView, boolean bSnap) throws java.lang.Exception
SQLBuilder
Note: this method is subject to change.
getTables
in interface SQLBuilder
getTables
in class BaseSQLBuilderImpl
conn
- the connection object.defaultUserName
- the user name of the connection. This is will also
be treated as the schema name for non-oracle databases.userName
- the user name for which the tables need to be listed.nameFilter
- the filter for the name of the table to be listed.bTable
- flag to include Table objects in the list.bAlias
- flag to include Synonyms in the list - Oracle database only.bView
- flag to include View objects in the list.bSnap
- flag to include Materialized View objects in the list.
java.lang.Exception
protected static java.lang.String getTableListSqlStatement(java.lang.String _defaultUserName, java.lang.String userName, boolean bTable, boolean bAlias, boolean bView, boolean _bSnap, boolean bCount)
_defaultUserName
- the user name of the connection. This is will also
be treated as the schema name for non-oracle databases.userName
- the user name for which the tables need to be listed.bTable
- flag to include Table objects in the list.bAlias
- flag to include Synonyms in the list - Oracle database only.bView
- flag to include View objects in the list._bSnap
- flag to include Snapshot objects in the list.bCount
- flag to retrieve the number of objects that will be fetched based
on the object type flags.
protected static java.lang.String getTableListSqlStatement(java.lang.String _defaultUserName, java.lang.String userName, java.lang.String nameFilter, boolean bTable, boolean bAlias, boolean bView, boolean _bSnap, boolean bCount)
_defaultUserName
- the user name of the connection. This is will also
be treated as the schema name for non-oracle databases.userName
- the user name for which the tables need to be listed.nameFilter
- the filter for the name for which the tables need to be listed.bTable
- flag to include Table objects in the list.bAlias
- flag to include Synonyms in the list - Oracle database only.bView
- flag to include View objects in the list._bSnap
- flag to include Snapshot objects in the list.bCount
- flag to retrieve the number of objects that will be fetched based
on the object type flags.
public java.util.ArrayList getDBPackageList(java.sql.Connection connection, java.lang.String userName, java.lang.String packageFilter) throws java.lang.Exception
SQLBuilder
getDBPackageList(Connection conn, String userName)
.
Note: this method is subject to change.
getDBPackageList
in interface SQLBuilder
getDBPackageList
in class BaseSQLBuilderImpl
connection
- the connection object.userName
- the user name for which database packages need to be listed.packageFilter
- the filter the database packages need to be listed.
java.lang.Exception
public java.util.ArrayList getDBOperationList(java.sql.Connection connection, java.lang.String userName, java.lang.String packageFilter, java.lang.String operationFilter) throws java.lang.Exception
SQLBuilder
Note: this method is subject to change.
getDBOperationList
in interface SQLBuilder
getDBOperationList
in class BaseSQLBuilderImpl
connection
- the connection object.userName
- the user name for which the database functions and procedures need to be listed.packageFilter
- the filter the database packages in which the functions and procedures need to be listed.operationFilter
- the filter the database functions and procedures need to be listed.
java.lang.Exception
protected static java.lang.String addSqlTypeText(java.lang.String sqlText, java.lang.String inputType)
sqlText
- a String containing a list of object types included so far.inputType
- a new object type to be added to the list.
public java.lang.String getBaseTable(java.sql.Connection conn, java.lang.String schema, java.lang.String name) throws java.sql.SQLException
SQLBuilder
Note: this method is subject to change.
getBaseTable
in interface SQLBuilder
getBaseTable
in class BaseSQLBuilderImpl
conn
- the connection object.schema
- the database schema.name
- the name of the potential synonym.
java.sql.SQLException
protected int bindWhereAttrValue(EntityImpl entityContext, DBTransactionImpl trans, java.sql.PreparedStatement stmt, AttributeDefImpl attrDef, int bindIndex, boolean skipNull) throws java.sql.SQLException
BaseSQLBuilderImpl
bindWhereAttrValue
in class BaseSQLBuilderImpl
entityContext
- the entity object.trans
- the transaction object.stmt
- the Statement object carrying out the SQL.attrDef
- the defintion of the attribute to which the value belongs.bindIndex
- the parameter index in the PreparedStatement.skipNull
- indicates if the null values need to be bound or skipped.
java.sql.SQLException
protected boolean capabilityCanReuseLockStatements()
capabilityCanReuseLockStatements
in class BaseSQLBuilderImpl
public java.lang.Object doLoadFromResultSet(java.lang.Object theTypeFactory, java.lang.Object theElemFactory, java.lang.Class theJavaType, byte attrLoad, java.sql.ResultSet rs, int index, DBTransactionImpl trans)
SQLBuilder
Note: this method is subject to change.
doLoadFromResultSet
in interface SQLBuilder
doLoadFromResultSet
in class BaseSQLBuilderImpl
theTypeFactory
- a custom factory to be used for constructing new instances.theElemFactory
- currently unused.theJavaType
- the Java datatype of the Object to be created.attrLoad
- specifies if the load type is
ATTR_LOAD_EACH
,
ATTR_LOAD_BULK
or
ATTR_LOAD_SKIP
rs
- the resultset.index
- the index of the object to be loaded.trans
- the reference to the transaction object used to fetch the resultset.
protected java.lang.String getSqlVariantLockTrailer()
BaseSQLBuilderImpl
getSqlVariantLockTrailer
in class BaseSQLBuilderImpl
public java.lang.String getDbTimeQuery()
BaseSQLBuilderImpl
getDbTimeQuery
in class BaseSQLBuilderImpl
public java.lang.String getDropTableSQL(java.lang.String dbObjectName)
SQLBuilder
Note: this method is subject to change.
getDropTableSQL
in interface SQLBuilder
getDropTableSQL
in class BaseSQLBuilderImpl
dbObjectName
- name of the Table.
public boolean isDisplayBindValueUI()
SQLBuilder
isDisplayBindValueUI
in interface SQLBuilder
isDisplayBindValueUI
in class BaseSQLBuilderImpl
public java.lang.String getCreateSequenceInsertTriggerSQL(java.lang.String triggerName, java.lang.String tableName, java.util.ArrayList sequenceNames, java.util.ArrayList colNames)
getCreateSequenceInsertTriggerSQL
in interface SQLBuilder
getCreateSequenceInsertTriggerSQL
in class BaseSQLBuilderImpl
triggerName
- the name of the trigger.tableName
- the name of the table for which the trigger is created.sequenceNames
- the array of names of the sequence.colNames
- the arrya of names of the column to which the value of the sequence
is copied to.
public java.lang.String getCreateSequenceSQL(java.lang.String sequenceName, int startVal)
getCreateSequenceSQL
in interface SQLBuilder
getCreateSequenceSQL
in class BaseSQLBuilderImpl
sequenceName
- name of the Sequence.startVal
- the initial value of the Sequence.
public java.lang.String getDropSequenceSQL(java.lang.String sequenceName)
getDropSequenceSQL
in interface SQLBuilder
getDropSequenceSQL
in class BaseSQLBuilderImpl
sequenceName
- name of the Sequence.
public java.lang.String buildEffDtDateDayAddStatement()
SQLBuilder
buildEffDtDateDayAddStatement
in interface SQLBuilder
buildEffDtDateDayAddStatement
in class BaseSQLBuilderImpl
String
that contains the necessary SQL.public java.lang.String getClauseForDateLiteral(java.util.Date date)
SQLBuilder
date
- The date object that will be formatted and passed as a String
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |