|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.broker.platforms.PlatformDefaultImpl
org.apache.ojb.broker.platforms.PlatformMySQLImpl
public class PlatformMySQLImpl
| Field Summary |
|---|
| Fields inherited from class org.apache.ojb.broker.platforms.PlatformDefaultImpl |
|---|
log, m_batchUpdatesChecked, m_supportsBatchUpdates |
| Fields inherited from interface org.apache.ojb.broker.accesslayer.JoinSyntaxTypes |
|---|
ORACLE_JOIN_SYNTAX, SQL92_JOIN_SYNTAX, SQL92_NOPAREN_JOIN_SYNTAX, SYBASE_JOIN_SYNTAX |
| Constructor Summary | |
|---|---|
PlatformMySQLImpl()
|
|
| Method Summary | |
|---|---|
void |
addPagingSql(StringBuffer anSqlString)
Add the LIMIT or equivalent to the SQL SQL-Paging is not yet supported |
String |
concatenate(String[] theColumns)
Concatenate the columns ie: col1 || col2 || col3 (ANSI) ie: col1 + col2 + col3 (MS SQL-Server) ie: concat(col1, col2, col3) (MySql) |
String |
createSequenceQuery(String sequenceName)
Override this method to enable database based sequence generation |
String |
dropSequenceQuery(String sequenceName)
Override this method to enable database based sequence generation |
String |
getEscapeClause(LikeCriteria aCriteria)
Answer the Clause used Escape wildcards in LIKE |
byte |
getJoinSyntaxType()
Get join syntax type for this RDBMS - one on of the constants from JoinSyntaxType interface |
String |
getLastInsertIdentityQuery(String tableName)
If database supports native key generation via identity column, this method should return the sql-query to obtain the last generated id. |
String |
nextSequenceQuery(String sequenceName)
Override this method to enable database based sequence generation |
CallableStatement |
prepareNextValProcedureStatement(Connection con,
String procedureName,
String sequenceName)
Create stored procedure call for a special sequence manager implementation SequenceManagerStoredProcedureImpl,
because it seems that jdbc-driver differ in handling of CallableStatement. |
void |
setObjectForStatement(PreparedStatement ps,
int index,
Object value,
int sqlType)
Called to let the Platform implementation perform any JDBC type-specific operations needed by the driver when binding positional parameters for a PreparedStatement. |
boolean |
supportsPaging()
Answer true if LIMIT or equivalent is supported SQL-Paging is not yet supported |
| Methods inherited from class org.apache.ojb.broker.platforms.PlatformDefaultImpl |
|---|
addBatch, afterStatementClose, afterStatementCreate, beforeBatch, beforeStatementClose, bindPagingParameters, bindPagingParametersFirst, changeAutoCommitState, checkForBatchSupport, createSequenceQuery, executeBatch, getConcatenationCharacter, initializeJdbcConnection, registerOutResultSet, setNullForStatement, supportsBatchOperations, supportsMultiColumnCountDistinct, useCountForResultsetSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlatformMySQLImpl()
| Method Detail |
|---|
public void setObjectForStatement(PreparedStatement ps,
int index,
Object value,
int sqlType)
throws SQLException
Platform
setObjectForStatement in interface PlatformsetObjectForStatement in class PlatformDefaultImplSQLExceptionpublic byte getJoinSyntaxType()
getJoinSyntaxType in interface PlatformgetJoinSyntaxType in class PlatformDefaultImplPlatform.getJoinSyntaxType()public String getLastInsertIdentityQuery(String tableName)
Platform
getLastInsertIdentityQuery in interface PlatformgetLastInsertIdentityQuery in class PlatformDefaultImplpublic void addPagingSql(StringBuffer anSqlString)
Platform
addPagingSql in interface PlatformaddPagingSql in class PlatformDefaultImplPlatform.addPagingSql(java.lang.StringBuffer)public String createSequenceQuery(String sequenceName)
PlatformDefaultImpl
createSequenceQuery in interface PlatformcreateSequenceQuery in class PlatformDefaultImplsequenceName - The name of the sequence to create.
public String nextSequenceQuery(String sequenceName)
PlatformDefaultImpl
nextSequenceQuery in interface PlatformnextSequenceQuery in class PlatformDefaultImplpublic String dropSequenceQuery(String sequenceName)
PlatformDefaultImpl
dropSequenceQuery in interface PlatformdropSequenceQuery in class PlatformDefaultImpl
public CallableStatement prepareNextValProcedureStatement(Connection con,
String procedureName,
String sequenceName)
throws PlatformException
PlatformSequenceManagerStoredProcedureImpl,
because it seems that jdbc-driver differ in handling of CallableStatement.
Connection con = broker.serviceConnectionManager().getConnection(); cs = getPlatform().prepareNextValProcedureStatement(con, PROCEDURE_NAME, sequenceName); cs.executeUpdate(); return cs.getLong(1);
prepareNextValProcedureStatement in interface PlatformprepareNextValProcedureStatement in class PlatformDefaultImplPlatformExceptionpublic boolean supportsPaging()
Platform
supportsPaging in interface PlatformsupportsPaging in class PlatformDefaultImplPlatform.supportsPaging()public String concatenate(String[] theColumns)
Platform
concatenate in interface Platformconcatenate in class PlatformDefaultImplPlatform.concatenate(java.lang.String[])public String getEscapeClause(LikeCriteria aCriteria)
Platform
getEscapeClause in interface PlatformgetEscapeClause in class PlatformDefaultImplPlatform.getEscapeClause(org.apache.ojb.broker.query.LikeCriteria)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||