|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 Platform
setObjectForStatement
in class PlatformDefaultImpl
SQLException
public byte getJoinSyntaxType()
getJoinSyntaxType
in interface Platform
getJoinSyntaxType
in class PlatformDefaultImpl
Platform.getJoinSyntaxType()
public String getLastInsertIdentityQuery(String tableName)
Platform
getLastInsertIdentityQuery
in interface Platform
getLastInsertIdentityQuery
in class PlatformDefaultImpl
public void addPagingSql(StringBuffer anSqlString)
Platform
addPagingSql
in interface Platform
addPagingSql
in class PlatformDefaultImpl
Platform.addPagingSql(java.lang.StringBuffer)
public String createSequenceQuery(String sequenceName)
PlatformDefaultImpl
createSequenceQuery
in interface Platform
createSequenceQuery
in class PlatformDefaultImpl
sequenceName
- The name of the sequence to create.
public String nextSequenceQuery(String sequenceName)
PlatformDefaultImpl
nextSequenceQuery
in interface Platform
nextSequenceQuery
in class PlatformDefaultImpl
public String dropSequenceQuery(String sequenceName)
PlatformDefaultImpl
dropSequenceQuery
in interface Platform
dropSequenceQuery
in class PlatformDefaultImpl
public CallableStatement prepareNextValProcedureStatement(Connection con, String procedureName, String sequenceName) throws PlatformException
Platform
SequenceManagerStoredProcedureImpl
,
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 Platform
prepareNextValProcedureStatement
in class PlatformDefaultImpl
PlatformException
public boolean supportsPaging()
Platform
supportsPaging
in interface Platform
supportsPaging
in class PlatformDefaultImpl
Platform.supportsPaging()
public String concatenate(String[] theColumns)
Platform
concatenate
in interface Platform
concatenate
in class PlatformDefaultImpl
Platform.concatenate(java.lang.String[])
public String getEscapeClause(LikeCriteria aCriteria)
Platform
getEscapeClause
in interface Platform
getEscapeClause
in class PlatformDefaultImpl
Platform.getEscapeClause(org.apache.ojb.broker.query.LikeCriteria)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |