|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.torque.adapter.AbstractAdapter
org.apache.torque.adapter.MssqlAdapter
public class MssqlAdapter
This is used to connect to a MSSQL database. This is tested with the jtds driver from sourceforge.
| Field Summary |
|---|
| Fields inherited from interface org.apache.torque.adapter.Adapter |
|---|
ADAPTER_KEY, AUTODETECT_ADAPTER, DRIVER_KEY |
| Constructor Summary | |
|---|---|
protected |
MssqlAdapter()
Empty constructor. |
| Method Summary | |
|---|---|
boolean |
escapeText()
Determines whether backslashes (\) should be escaped in explicit SQL strings. |
void |
generateLimits(Query query,
long offset,
int limit)
Modify a query to add limit and offset values for Sybase. |
String |
getIDMethodSQL(Object unused)
Returns the last value from an identity column (available on a per-session basis from the global variable @@identity). |
IDMethod |
getIDMethodType()
Returns the constant from the IDMethod interface denoting which
type of primary key generation method this type of RDBMS uses. |
String |
getUpdateLockClause()
Returns the clause which acquires a write lock on a row when doing a select. |
String |
ignoreCase(String in)
This method is used to ignore case. |
void |
lockTable(Connection con,
String table)
Locks the specified table. |
boolean |
supportsNativeLimit()
Return true for Sybase |
String |
toUpperCase(String in)
This method is used to ignore case. |
void |
unlockTable(Connection con,
String table)
Tries to unlock the specified table. |
boolean |
useEscapeClauseForLike()
Whether an escape clause in like should be used. |
| Methods inherited from class org.apache.torque.adapter.AbstractAdapter |
|---|
getStringDelimiter, ignoreCaseInOrderBy, supportsNativeOffset, useIlike |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected MssqlAdapter()
| Method Detail |
|---|
public String toUpperCase(String in)
toUpperCase in interface AdaptertoUpperCase in class AbstractAdapterin - The string to transform to upper case.
public String ignoreCase(String in)
ignoreCase in interface AdapterignoreCase in class AbstractAdapterin - The string whose case to ignore.
public IDMethod getIDMethodType()
AbstractAdapterIDMethod interface denoting which
type of primary key generation method this type of RDBMS uses.
getIDMethodType in interface AdaptergetIDMethodType in class AbstractAdapterAdapter.getIDMethodType()public String getIDMethodSQL(Object unused)
@@identity).
getIDMethodSQL in interface AdaptergetIDMethodSQL in class AbstractAdapterunused - Information used for key generation.
Adapter.getIDMethodSQL(Object obj)public String getUpdateLockClause()
getUpdateLockClause in interface AdaptergetUpdateLockClause in class AbstractAdapter
public void lockTable(Connection con,
String table)
throws SQLException
lockTable in interface AdapterlockTable in class AbstractAdaptercon - The JDBC connection to use.table - The name of the table to lock.
SQLException - No Statement could be created or executed.
public void unlockTable(Connection con,
String table)
throws SQLException
unlockTable in interface AdapterunlockTable in class AbstractAdaptercon - The JDBC connection to use.table - The name of the table to unlock.
SQLException - No Statement could be created or executed.public boolean supportsNativeLimit()
supportsNativeLimit in interface AdaptersupportsNativeLimit in class AbstractAdapterAbstractAdapter.supportsNativeLimit()
public void generateLimits(Query query,
long offset,
int limit)
throws TorqueException
generateLimits in interface AdaptergenerateLimits in class AbstractAdapterquery - The query to modifyoffset - the offset Valuelimit - the limit Value
TorqueException - if any error occurs when building the querypublic boolean escapeText()
escapeText in interface AdapterescapeText in class AbstractAdapterAdapter.escapeText()public boolean useEscapeClauseForLike()
true.
useEscapeClauseForLike in interface AdapteruseEscapeClauseForLike in class AbstractAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||