org.kuali.rice.core.framework.persistence.platform
Class OracleDatabasePlatform

java.lang.Object
  extended by org.kuali.rice.core.framework.persistence.platform.ANSISqlDatabasePlatform
      extended by org.kuali.rice.core.framework.persistence.platform.OracleDatabasePlatform
All Implemented Interfaces:
DatabasePlatform
Direct Known Subclasses:
Oracle9iDatabasePlatform, OraclePlatform

public class OracleDatabasePlatform
extends ANSISqlDatabasePlatform

DatabasePlatform implementation that generates Oracle-compliant SQL

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
static long WAIT_FOREVER
           
 
Constructor Summary
OracleDatabasePlatform()
           
 
Method Summary
 void applyLimit(Integer limit, org.apache.ojb.broker.query.Criteria criteria)
           
 String escapeString(String sqlString)
          Performs Oracle-specific escaping of String parameters.
 String getCurTimeFunction()
           
 String getDateFormatString(String dateFormatString)
           
 String getDateSQL(String date, String time)
          Converts date-only values into JDBC d{...} date literals, but converts date-and-time values into timestamp strings that are then converted into date values via the strToDateFunction.
 String getLockRouteHeaderQuerySQL(String documentId, boolean wait)
          Generates the query used to select route header rows for update
 Long getNextValSQL(String sequenceName, javax.persistence.EntityManager entityManager)
           
 Long getNextValSQL(String sequenceName, org.apache.ojb.broker.PersistenceBroker persistenceBroker)
          Supplies a parameterized sequence incrementation query
 String getSelectForUpdateSuffix(long waitMillis)
          Returns the suffix to append to a SQL query in order to perform a "select for update" lock on the table
 String getStrToDateFunction()
           
protected  long getTimeoutSeconds()
           
 String toString()
           
 
Methods inherited from class org.kuali.rice.core.framework.persistence.platform.ANSISqlDatabasePlatform
getCreateTableFromTableSql, getDropTableSql, getInsertDataFromTableSql, getIsNullFunction, getTruncateTableSql, getUpperCaseFunction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WAIT_FOREVER

public static final long WAIT_FOREVER
See Also:
Constant Field Values
Constructor Detail

OracleDatabasePlatform

public OracleDatabasePlatform()
Method Detail

applyLimit

public void applyLimit(Integer limit,
                       org.apache.ojb.broker.query.Criteria criteria)

getStrToDateFunction

public String getStrToDateFunction()

getCurTimeFunction

public String getCurTimeFunction()

getDateFormatString

public String getDateFormatString(String dateFormatString)

getNextValSQL

public Long getNextValSQL(String sequenceName,
                          javax.persistence.EntityManager entityManager)

getNextValSQL

public Long getNextValSQL(String sequenceName,
                          org.apache.ojb.broker.PersistenceBroker persistenceBroker)
Description copied from interface: DatabasePlatform
Supplies a parameterized sequence incrementation query

Parameters:
sequenceName - name of the sequence to be incremented
Returns:
parameterized sequence incrementation query

getLockRouteHeaderQuerySQL

public String getLockRouteHeaderQuerySQL(String documentId,
                                         boolean wait)
Description copied from interface: DatabasePlatform
Generates the query used to select route header rows for update

Parameters:
documentId - id of the routeHeader to select for update
wait - whether to block until lock is released
Returns:
the query used to select route header rows for update

toString

public String toString()
Overrides:
toString in class ANSISqlDatabasePlatform

getTimeoutSeconds

protected long getTimeoutSeconds()

getSelectForUpdateSuffix

public String getSelectForUpdateSuffix(long waitMillis)
Description copied from interface: DatabasePlatform
Returns the suffix to append to a SQL query in order to perform a "select for update" lock on the table

Parameters:
waitMillis - the milliseconds to wait, -1 forever, 0 if no wait
Returns:
the suffix to append to a SQL query in order to perform a "select for update" lock on the table
See Also:
org.kuali.rice.ken.DatabasePlatform.Platform#getSelectForUpdateSuffix(long)

escapeString

public String escapeString(String sqlString)
Performs Oracle-specific escaping of String parameters.

Parameters:
sqlString - The String to escape.
Returns:
The String from sqlString, but with all of its DB-specific special characters escaped.
See Also:
DatabasePlatform.escapeString(java.lang.String)

getDateSQL

public String getDateSQL(String date,
                         String time)
Converts date-only values into JDBC d{...} date literals, but converts date-and-time values into timestamp strings that are then converted into date values via the strToDateFunction.

Specified by:
getDateSQL in interface DatabasePlatform
Overrides:
getDateSQL in class ANSISqlDatabasePlatform
Parameters:
date - in YYYY/MM/DD format
time - in hh:mm:ss format
Returns:
the sql for a given date string that will satisfy a where clause
See Also:
ANSISqlDatabasePlatform.getDateSQL(java.lang.String, java.lang.String)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.