Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


oracle.jbo.server
Class SQLServerSQLBuilderImpl

java.lang.Object
  extended by oracle.jbo.common.CommonCriteriaAdapter
      extended by oracle.jbo.server.CriteriaAdapterImpl
          extended by oracle.jbo.server.BaseSQLBuilderImpl
              extended by oracle.jbo.server.SQL92SQLBuilderImpl
                  extended by oracle.jbo.server.SQLServerSQLBuilderImpl

All Implemented Interfaces:
CriteriaAdapter, SQLBuilder, ViewCriteriaAdapter

public class SQLServerSQLBuilderImpl
extends SQL92SQLBuilderImpl

SQLServer specific implementation of the SQLBuilder interface.

Since:
JDeveloper 3.2

Field Summary

 

Fields inherited from class oracle.jbo.server.SQL92SQLBuilderImpl
ERROR_OLITE_RESOURCE_BUSY_AND_NOWAIT_SPECIFIED, mSQLBuilderInterface, ORACLE_ROWID_COLUMN

 

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
SQLServerSQLBuilderImpl()
           

 

Method Summary
 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
 java.lang.String buildEffDtDateDayAddStatement()
          Returns a statement that returns a date that is 'x' number of days apart from the specified date.
 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 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.
static SQLBuilder getInterface()
          Gets the singleton instance of this class.
protected  java.lang.String getJDBCDriverClassName(java.lang.String url)
          Defaults to the microsoft supplied JDBC driver, but you can override this with the system property.
protected  boolean getLockTrailerIsAtEnd()
          SQLServer permits the lock clause before the WHERE clause.
 java.lang.String getPersistManagerClassName()
          Returns the name of default PersistManager class name.
protected  java.lang.String getSqlVariantLockTrailer()
          Returns the lock trailer from the System properties.
 java.lang.String getStringConcatOper(boolean bIncludeSpaces)
          Returns a String concatenation operator for query clause generation.
protected  boolean getSupportsAliasInUpdateStatements()
          SQL*Server doesn't support this: eg: "update EMP Employees (set NAME='Brian') where ID=42"
 java.lang.String getVersion()
          Gets a string describing the version of this implentation of this interface.

 

Methods inherited from class oracle.jbo.server.SQL92SQLBuilderImpl
getCreateSequenceInsertTriggerSQL, getCreateSequenceSQL, getDropSequenceSQL, getDropTableSQL, getQueryHitCountSQL, getTypeMapName, isDisplayBindValueUI

 

Methods inherited from class oracle.jbo.server.BaseSQLBuilderImpl
baseBuildSelectList, bindDeleteStatement, bindInsertStatement, bindOptUpdateWhereClause, bindParametersForStmt, bindParamValue, bindRangePagingParams, bindUpdateStatement, bindWhereAttrValue, bindWhereClause, bindWhereClause, buildDefaultViewObjectFromClause, buildDefaultViewObjectFromClause, buildDefaultViewObjectWhereClause, buildDeleteStatement, buildInsertStatement, buildOptUpdateWhereClause, buildRangePagingQuery, buildSelectList, buildSelectString, buildSelectString, buildUpdateStatement, buildWhereClause, capabilityCanReuseLockStatements, checkTableNameForQuotes, compareFetchedValue, containsTableAlias, convertFlags, convertValueToStorageType, convertValueToWhereFragment, convertValueToWhereFragment, createHandleForCancellableStatements, doEntityDML, doEntitySelect, doEntitySelectForAltKey, doLoadBulkFromResultSet, doLoadFromResultSet, doLoadFromStatement, doPreparedStatementDefineColumnType, doPreparedStatementDefines, doRefreshSQL, doRegisterDefaultDriver, doStatementSetBindingStyle, doStatementSetBindingStyleDefault, doStatementSetRowPrefetch, dumpConstraint, executeBatch, findTableAliasInSQLExpr, generatePKBasedRef, generateRefAndOID, generateRowID, getANSIJoinVCs, getBaseTable, getBindingStyleValue, getCappedQueryHitCountSQL, getColumnNameWithFormatForQuery, getConstraints, getConstraintsList, getCurrentDbTime, getDBOperationList, getDBPackageList, getDefaultBindingStyle, getEscapeClause, getFormattedLHSCompareFragment, getFormattedRHSCompareFragment, getFormattedRHSCompareFragment, getMaxTableNameLength, getNestedTables, getQuotationMarkLeft, getQuotationMarkRight, getROWID, getSchemaList, getSchemas, getTableList, getTableList, getTables, getTables, getTables, getTables, getViewCriteriaAdapter, getWarningText, getWildCardEscapeVal, handleSQLException, invalidDatumFactoryUsage, isConnectionAlive, isDataSourceJTABased, isNCharType, isNewLineAllowedInSQL, isSQLRecoverableException, isStreamType, jdbcClientSideSecurity, lookupDataSource, needsQuotedTableName, populateCompOpers, populateJboTypeMapEntries, processClauseForSubQuery, processClauseReplaceTableAliases, processException, registerDatabaseChangeListener, releaseSavepoint, rollbackToSavepoint, setSavepoint, setSessionTimeZone, shouldPutJoinConstraintInFromClause, shouldSkipDML, supportsReturningClause, supportsRowNumQuery

 

Methods inherited from class oracle.jbo.server.CriteriaAdapterImpl
formatAttributeValue, getBindValsForSqlGen, getFormattedLHSCompareFragment, getFormattedRHSCompareFragment, getRowSetForSqlGen, getViewCriteriaClause, getWhereFragmentFromVO, isCriteriaItemOuterJoined, isLHSFragmentOptional, setupBindVarExtendedData

 

Methods inherited from class oracle.jbo.common.CommonCriteriaAdapter
cleanUpTemporaryBindVariables, cleanUpTemporaryBindVars, convertCriteriaItemToWhereFragment, convertOpandRHSToWhereFragment, convertValueToWhereFragment, correctOprandLiteral, createTempBindVar, createTemporaryBindVar, doConvertCriteriaItemToWhereFragment, getCriteriaClause, getCriteriaClause, getFormattedLHSCompareFragment, getOptionalItemClause, isCharType, isDateType, isNumericType, parseOperatorAndValueFromItemValue, shouldUseTempBindVariableForValue

 

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

 

Constructor Detail

SQLServerSQLBuilderImpl

public SQLServerSQLBuilderImpl()

Method Detail

getInterface

public static SQLBuilder getInterface()
Gets the singleton instance of this class.
Returns:
a SQLBuilder instance.

getVersion

public java.lang.String getVersion()
Description copied from interface: SQLBuilder
Gets a string describing the version of this implentation of this interface.
Specified by:
getVersion in interface SQLBuilder
Overrides:
getVersion in class SQL92SQLBuilderImpl
Returns:
a String containing the version.

getDbType

public java.lang.String getDbType()
Description copied from interface: SQLBuilder
Returns a string uniquely identifying this type of SQLBuilder. Examples are: "Oracle", "OLite", "SQL92".
Specified by:
getDbType in interface SQLBuilder
Overrides:
getDbType in class SQL92SQLBuilderImpl
Returns:
a String containing the Database type.

getPersistManagerClassName

public java.lang.String getPersistManagerClassName()
Description copied from interface: SQLBuilder
Returns the name of default PersistManager class name.
Specified by:
getPersistManagerClassName in interface SQLBuilder
Overrides:
getPersistManagerClassName in class SQL92SQLBuilderImpl
Returns:
a String containing the Class name.

getJDBCDriverClassName

protected java.lang.String getJDBCDriverClassName(java.lang.String url)
Defaults to the microsoft supplied JDBC driver, but you can override this with the system property.
Overrides:
getJDBCDriverClassName in class SQL92SQLBuilderImpl
Parameters:
url - the JDBC url.
Returns:
the class name from the System properties if set, or the default microsoft driver if it isn't.

getSqlVariantLockTrailer

protected java.lang.String getSqlVariantLockTrailer()
Description copied from class: SQL92SQLBuilderImpl
Returns the lock trailer from the System properties. Subclasses override this method to provide database specific trailer.
Overrides:
getSqlVariantLockTrailer in class SQL92SQLBuilderImpl
Returns:
SQL clause to lock a row in the database.

getLockTrailerIsAtEnd

protected boolean getLockTrailerIsAtEnd()
SQLServer permits the lock clause before the WHERE clause.
Overrides:
getLockTrailerIsAtEnd in class BaseSQLBuilderImpl
Returns:
false.

getDbTimeQuery

public java.lang.String getDbTimeQuery()
Description copied from class: BaseSQLBuilderImpl
Returns a SQL statement to obtain the current time from the database.
Overrides:
getDbTimeQuery in class SQL92SQLBuilderImpl
Returns:
a String containing the SQL statement.

getStringConcatOper

public java.lang.String getStringConcatOper(boolean bIncludeSpaces)
Description copied from interface: SQLBuilder
Returns a String concatenation operator for query clause generation.
Specified by:
getStringConcatOper in interface SQLBuilder
Overrides:
getStringConcatOper in class BaseSQLBuilderImpl
Parameters:
bIncludeSpaces - if the database platform allows spaces before and after the operator the returned string may include the spaces if the passed flag is true.
Returns:

getSupportsAliasInUpdateStatements

protected boolean getSupportsAliasInUpdateStatements()
SQL*Server doesn't support this: eg: "update EMP Employees (set ) where ID=42"
Overrides:
getSupportsAliasInUpdateStatements in class BaseSQLBuilderImpl
Returns:
false.
Since:
10.1.2 29Jul04

buildEffDtDateDayAddStatement

public java.lang.String buildEffDtDateDayAddStatement()
Description copied from interface: SQLBuilder
Returns a statement that returns a date that is 'x' number of days apart from the specified date.
Specified by:
buildEffDtDateDayAddStatement in interface SQLBuilder
Overrides:
buildEffDtDateDayAddStatement in class SQL92SQLBuilderImpl
Returns:
A String that contains the necessary SQL.

bindEffDtDateDayAddStatement

public void bindEffDtDateDayAddStatement(java.sql.PreparedStatement stmt,
                                         java.lang.Object date,
                                         int days)
                                  throws java.sql.SQLException
Description copied from interface: SQLBuilder
Bind the statement with the values required to compute a date that is 'x' number of days apart from the specified date
Specified by:
bindEffDtDateDayAddStatement in interface SQLBuilder
Overrides:
bindEffDtDateDayAddStatement in class BaseSQLBuilderImpl
Parameters:
stmt - The PreparedStatment object that needs to be bound with the values
date - The specified date
days - The number of days the resulting date needs to differ from the specified date. It could be a positive or a negative number
Throws:
java.sql.SQLException

getClauseForDateLiteral

public java.lang.String getClauseForDateLiteral(java.util.Date date)
Description copied from interface: SQLBuilder
Creates a database platform specific clause for converting a date string literal to date datatype. May be used in date comparisions and other manipulations.
Specified by:
getClauseForDateLiteral in interface SQLBuilder
Overrides:
getClauseForDateLiteral in class SQL92SQLBuilderImpl
Parameters:
date - The date object that will be formatted and passed as a String
Returns:
A string representing the clause to be used while building the query statement.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


Copyright © 1997, 2011, Oracle. All rights reserved.