public class KKDB2NetAdapter
extends org.apache.torque.adapter.AbstractAdapter
Constructor and Description |
---|
KKDB2NetAdapter()
Empty constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
escapeText()
Determines whether backslashes (\) should be escaped in explicit SQL
strings.
|
void |
generateLimits(org.apache.torque.sql.Query query,
long offset,
int limit)
Modify a query to add limit and offset values for DB2.
|
java.lang.String |
getIDMethodSQL(java.lang.Object obj)
Returns the last value from an identity column (available on a
per-session basis from the global variable
@@identity ). |
org.apache.torque.adapter.IDMethod |
getIDMethodType() |
java.lang.String |
getUpdateLockClause()
Returns the clause which acquires a write lock on a row
when doing a select.
|
java.lang.String |
ignoreCase(java.lang.String in)
This method is used to ignore case.
|
void |
lockTable(java.sql.Connection con,
java.lang.String table)
Locks the specified table.
|
boolean |
supportsNativeLimit()
Return true for DB2
|
boolean |
supportsNativeOffset()
Returns whether the database natively supports returning results
starting at an offset position other than 0.
|
java.lang.String |
toUpperCase(java.lang.String in)
This method is used to ignore case.
|
void |
unlockTable(java.sql.Connection con,
java.lang.String table)
Tries to unlock the specified table.
|
boolean |
useEscapeClauseForLike()
Whether an escape clause in like should be used.
|
public java.lang.String toUpperCase(java.lang.String in)
toUpperCase
in interface org.apache.torque.adapter.Adapter
toUpperCase
in class org.apache.torque.adapter.AbstractAdapter
in
- The string to transform to upper case.public java.lang.String ignoreCase(java.lang.String in)
ignoreCase
in interface org.apache.torque.adapter.Adapter
ignoreCase
in class org.apache.torque.adapter.AbstractAdapter
in
- The string whose case to ignore.public org.apache.torque.adapter.IDMethod getIDMethodType()
getIDMethodType
in interface org.apache.torque.adapter.Adapter
getIDMethodType
in class org.apache.torque.adapter.AbstractAdapter
Adapter.getIDMethodType()
public java.lang.String getIDMethodSQL(java.lang.Object obj)
@@identity
).getIDMethodSQL
in interface org.apache.torque.adapter.Adapter
getIDMethodSQL
in class org.apache.torque.adapter.AbstractAdapter
Adapter.getIDMethodSQL(Object obj)
public java.lang.String getUpdateLockClause()
getUpdateLockClause
in interface org.apache.torque.adapter.Adapter
getUpdateLockClause
in class org.apache.torque.adapter.AbstractAdapter
public void lockTable(java.sql.Connection con, java.lang.String table) throws java.sql.SQLException
lockTable
in interface org.apache.torque.adapter.Adapter
lockTable
in class org.apache.torque.adapter.AbstractAdapter
con
- The JDBC connection to use.table
- The name of the table to lock.java.sql.SQLException
- No Statement could be created or executed.public void unlockTable(java.sql.Connection con, java.lang.String table) throws java.sql.SQLException
unlockTable
in interface org.apache.torque.adapter.Adapter
unlockTable
in class org.apache.torque.adapter.AbstractAdapter
con
- The JDBC connection to use.table
- The name of the table to unlock.java.sql.SQLException
- No Statement could be created or executed.public boolean supportsNativeOffset()
supportsNativeOffset
in interface org.apache.torque.adapter.Adapter
supportsNativeOffset
in class org.apache.torque.adapter.AbstractAdapter
public boolean supportsNativeLimit()
supportsNativeLimit
in interface org.apache.torque.adapter.Adapter
supportsNativeLimit
in class org.apache.torque.adapter.AbstractAdapter
AbstractAdapter.supportsNativeLimit()
public void generateLimits(org.apache.torque.sql.Query query, long offset, int limit) throws org.apache.torque.TorqueException
generateLimits
in interface org.apache.torque.adapter.Adapter
generateLimits
in class org.apache.torque.adapter.AbstractAdapter
query
- The query to modifyoffset
- the offset Valuelimit
- the limit Valueorg.apache.torque.TorqueException
- if any error occurs when building the querypublic boolean escapeText()
escapeText
in interface org.apache.torque.adapter.Adapter
escapeText
in class org.apache.torque.adapter.AbstractAdapter
Adapter.escapeText()
public boolean useEscapeClauseForLike()
true
.useEscapeClauseForLike
in interface org.apache.torque.adapter.Adapter
useEscapeClauseForLike
in class org.apache.torque.adapter.AbstractAdapter
Copyright © 2018 DS Data Systems UK Ltd.