Klasse OracleAdapter

java.lang.Object
org.apache.torque.adapter.AbstractAdapter
org.apache.torque.adapter.OracleAdapter
Alle implementierten Schnittstellen:
Serializable, Adapter

public class OracleAdapter extends AbstractAdapter
This code should be used for an Oracle database pool.
Version:
$Id: OracleAdapter.java 1917245 2024-04-21 14:06:23Z tv $
Autor:
Jon S. Stevens, Brett McLaughlin, Bill Schneider, Daniel Rall
Siehe auch:
  • Konstruktordetails

    • OracleAdapter

      protected OracleAdapter()
      Empty constructor.
  • Methodendetails

    • toUpperCase

      public String toUpperCase(String in)
      This method is used to ignore case.
      Angegeben von:
      toUpperCase in Schnittstelle Adapter
      Angegeben von:
      toUpperCase in Klasse AbstractAdapter
      Parameter:
      in - The string to transform to upper case.
      Gibt zurück:
      The upper case string.
    • ignoreCase

      public String ignoreCase(String in)
      This method is used to ignore case.
      Angegeben von:
      ignoreCase in Schnittstelle Adapter
      Angegeben von:
      ignoreCase in Klasse AbstractAdapter
      Parameter:
      in - The string whose case to ignore.
      Gibt zurück:
      The string in a case that can be ignored.
    • getIDMethodType

      public IDMethod getIDMethodType()
      Beschreibung aus Klasse kopiert: AbstractAdapter
      Returns the constant from the IDMethod interface denoting which type of primary key generation method this type of RDBMS uses.
      Angegeben von:
      getIDMethodType in Schnittstelle Adapter
      Angegeben von:
      getIDMethodType in Klasse AbstractAdapter
      Gibt zurück:
      IDMethod constant
      Siehe auch:
    • getIDMethodSQL

      public String getIDMethodSQL(Object sequenceName)
      Beschreibung aus Klasse kopiert: AbstractAdapter
      Returns SQL used to get the most recently inserted primary key. Databases which have no support for this return null.
      Angegeben von:
      getIDMethodSQL in Schnittstelle Adapter
      Angegeben von:
      getIDMethodSQL in Klasse AbstractAdapter
      Parameter:
      sequenceName - The name of the sequence (should be of type String).
      Gibt zurück:
      SQL to retrieve the next database key.
      Siehe auch:
    • lockTable

      public void lockTable(Connection con, String table) throws SQLException
      Locks the specified table.
      Angegeben von:
      lockTable in Schnittstelle Adapter
      Angegeben von:
      lockTable in Klasse AbstractAdapter
      Parameter:
      con - The JDBC connection to use.
      table - The name of the table to lock.
      Löst aus:
      SQLException - No Statement could be created or executed.
    • unlockTable

      public void unlockTable(Connection con, String table) throws SQLException
      Unlocks the specified table.
      Angegeben von:
      unlockTable in Schnittstelle Adapter
      Angegeben von:
      unlockTable in Klasse AbstractAdapter
      Parameter:
      con - The JDBC connection to use.
      table - The name of the table to unlock.
      Löst aus:
      SQLException - No Statement could be created or executed.
    • generateLimits

      public void generateLimits(Query query, long offset, int limit)
      Build Oracle-style query with limit or offset. If the original SQL is in variable: query then the requlting SQL looks like this:
       SELECT B.* FROM (
                SELECT A.*, rownum as TORQUE$ROWNUM FROM (
                        query
                ) A
           ) B WHERE B.TORQUE$ROWNUM > offset AND B.TORQUE$ROWNUM
           <= offset + limit
       
      Angegeben von:
      generateLimits in Schnittstelle Adapter
      Setzt außer Kraft:
      generateLimits in Klasse AbstractAdapter
      Parameter:
      query - The query to modify
      offset - the offset Value
      limit - the limit Value
    • escapeText

      public boolean escapeText()
      This method is for the SqlExpression.quoteAndEscape rules. The rule is, any string in a SqlExpression with a BACKSLASH will either be changed to "\\" or left as "\". SapDB does not need the escape character.
      Angegeben von:
      escapeText in Schnittstelle Adapter
      Setzt außer Kraft:
      escapeText in Klasse AbstractAdapter
      Gibt zurück:
      false.
    • useEscapeClauseForLike

      public boolean useEscapeClauseForLike()
      Whether an escape clause in like should be used. Example : select * from AUTHOR where AUTHOR.NAME like '\_%' ESCAPE '\'; Oracle needs this, so this implementation always returns true.
      Angegeben von:
      useEscapeClauseForLike in Schnittstelle Adapter
      Setzt außer Kraft:
      useEscapeClauseForLike in Klasse AbstractAdapter
      Gibt zurück:
      whether the escape clause should be appended or not.
    • useMinusForExcept

      public boolean useMinusForExcept()
      Whether to use the MINUS operator instead of the EXCEPT operator. Oracle needs this, so this implementation always returns true.
      Angegeben von:
      useMinusForExcept in Schnittstelle Adapter
      Setzt außer Kraft:
      useMinusForExcept in Klasse AbstractAdapter
      Gibt zurück:
      whether to use the MINUS operator instead of the EXCEPT operator.