Package org.apache.torque.adapter
Klasse OracleAdapter
java.lang.Object
org.apache.torque.adapter.AbstractAdapter
org.apache.torque.adapter.OracleAdapter
- Alle implementierten Schnittstellen:
Serializable
,Adapter
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:
-
Feldübersicht
Von Schnittstelle geerbte Felder org.apache.torque.adapter.Adapter
ADAPTER_KEY, AUTODETECT_ADAPTER, DRIVER_KEY
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
This method is for the SqlExpression.quoteAndEscape rules.void
generateLimits
(Query query, long offset, int limit) Build Oracle-style query with limit or offset.getIDMethodSQL
(Object sequenceName) Returns SQL used to get the most recently inserted primary key.Returns the constant from theIDMethod
interface denoting which type of primary key generation method this type of RDBMS uses.ignoreCase
(String in) This method is used to ignore case.void
lockTable
(Connection con, String table) Locks the specified table.toUpperCase
(String in) This method is used to ignore case.void
unlockTable
(Connection con, String table) Unlocks the specified table.boolean
Whether an escape clause in like should be used.boolean
Whether to use the MINUS operator instead of the EXCEPT operator.Von Klasse geerbte Methoden org.apache.torque.adapter.AbstractAdapter
getStringDelimiter, getUpdateLockClause, ignoreCaseInOrderBy, setCapabilities, supportsNativeLimit, supportsNativeOffset, useGetGeneratedKeys, useIlike
-
Konstruktordetails
-
OracleAdapter
protected OracleAdapter()Empty constructor.
-
-
Methodendetails
-
toUpperCase
This method is used to ignore case.- Angegeben von:
toUpperCase
in SchnittstelleAdapter
- Angegeben von:
toUpperCase
in KlasseAbstractAdapter
- Parameter:
in
- The string to transform to upper case.- Gibt zurück:
- The upper case string.
-
ignoreCase
This method is used to ignore case.- Angegeben von:
ignoreCase
in SchnittstelleAdapter
- Angegeben von:
ignoreCase
in KlasseAbstractAdapter
- Parameter:
in
- The string whose case to ignore.- Gibt zurück:
- The string in a case that can be ignored.
-
getIDMethodType
Beschreibung aus Klasse kopiert:AbstractAdapter
Returns the constant from theIDMethod
interface denoting which type of primary key generation method this type of RDBMS uses.- Angegeben von:
getIDMethodType
in SchnittstelleAdapter
- Angegeben von:
getIDMethodType
in KlasseAbstractAdapter
- Gibt zurück:
- IDMethod constant
- Siehe auch:
-
getIDMethodSQL
Beschreibung aus Klasse kopiert:AbstractAdapter
Returns SQL used to get the most recently inserted primary key. Databases which have no support for this returnnull
.- Angegeben von:
getIDMethodSQL
in SchnittstelleAdapter
- Angegeben von:
getIDMethodSQL
in KlasseAbstractAdapter
- Parameter:
sequenceName
- The name of the sequence (should be of typeString
).- Gibt zurück:
- SQL to retrieve the next database key.
- Siehe auch:
-
lockTable
Locks the specified table.- Angegeben von:
lockTable
in SchnittstelleAdapter
- Angegeben von:
lockTable
in KlasseAbstractAdapter
- 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
Unlocks the specified table.- Angegeben von:
unlockTable
in SchnittstelleAdapter
- Angegeben von:
unlockTable
in KlasseAbstractAdapter
- 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
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 SchnittstelleAdapter
- Setzt außer Kraft:
generateLimits
in KlasseAbstractAdapter
- Parameter:
query
- The query to modifyoffset
- the offset Valuelimit
- 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 SchnittstelleAdapter
- Setzt außer Kraft:
escapeText
in KlasseAbstractAdapter
- 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 returnstrue
.- Angegeben von:
useEscapeClauseForLike
in SchnittstelleAdapter
- Setzt außer Kraft:
useEscapeClauseForLike
in KlasseAbstractAdapter
- 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 returnstrue
.- Angegeben von:
useMinusForExcept
in SchnittstelleAdapter
- Setzt außer Kraft:
useMinusForExcept
in KlasseAbstractAdapter
- Gibt zurück:
- whether to use the MINUS operator instead of the EXCEPT operator.
-