org.apache.ojb.broker.platforms
Class PlatformMySQLImpl

java.lang.Object
  extended by org.apache.ojb.broker.platforms.PlatformDefaultImpl
      extended by org.apache.ojb.broker.platforms.PlatformMySQLImpl
All Implemented Interfaces:
JoinSyntaxTypes, Platform

public class PlatformMySQLImpl
extends PlatformDefaultImpl

Version:
1.0, $Id: PlatformMySQLImpl.java 365232 2005-12-21 22:36:07Z tomdz $
Author:
jakob bräuchi

Field Summary
 
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(java.lang.StringBuffer anSqlString)
          Add the LIMIT or equivalent to the SQL SQL-Paging is not yet supported
 java.lang.String concatenate(java.lang.String[] theColumns)
          Concatenate the columns
ie: col1 || col2 || col3 (ANSI)
ie: col1 + col2 + col3 (MS SQL-Server)
ie: concat(col1, col2, col3) (MySql)
 java.lang.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
 java.lang.String getLastInsertIdentityQuery(java.lang.String tableName)
          If database supports native key generation via identity column, this method should return the sql-query to obtain the last generated id.
 void setObjectForStatement(java.sql.PreparedStatement ps, int index, java.lang.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, createSequenceQuery, createSequenceQuery, dropSequenceQuery, executeBatch, initializeJdbcConnection, nextSequenceQuery, prepareNextValProcedureStatement, registerOutResultSet, setNullForStatement, supportsBatchOperations, supportsMultiColumnCountDistinct, useCountForResultsetSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlatformMySQLImpl

public PlatformMySQLImpl()
Method Detail

setObjectForStatement

public void setObjectForStatement(java.sql.PreparedStatement ps,
                                  int index,
                                  java.lang.Object value,
                                  int sqlType)
                           throws java.sql.SQLException
Description copied from interface: Platform
Called to let the Platform implementation perform any JDBC type-specific operations needed by the driver when binding positional parameters for a PreparedStatement.

Specified by:
setObjectForStatement in interface Platform
Overrides:
setObjectForStatement in class PlatformDefaultImpl
Throws:
java.sql.SQLException

getJoinSyntaxType

public byte getJoinSyntaxType()
Get join syntax type for this RDBMS - one on of the constants from JoinSyntaxType interface

Specified by:
getJoinSyntaxType in interface Platform
Overrides:
getJoinSyntaxType in class PlatformDefaultImpl
See Also:
Platform.getJoinSyntaxType()

getLastInsertIdentityQuery

public java.lang.String getLastInsertIdentityQuery(java.lang.String tableName)
Description copied from interface: Platform
If database supports native key generation via identity column, this method should return the sql-query to obtain the last generated id.

Specified by:
getLastInsertIdentityQuery in interface Platform
Overrides:
getLastInsertIdentityQuery in class PlatformDefaultImpl

addPagingSql

public void addPagingSql(java.lang.StringBuffer anSqlString)
Description copied from interface: Platform
Add the LIMIT or equivalent to the SQL SQL-Paging is not yet supported

Specified by:
addPagingSql in interface Platform
Overrides:
addPagingSql in class PlatformDefaultImpl
See Also:
Platform.addPagingSql(java.lang.StringBuffer)

supportsPaging

public boolean supportsPaging()
Description copied from interface: Platform
Answer true if LIMIT or equivalent is supported SQL-Paging is not yet supported

Specified by:
supportsPaging in interface Platform
Overrides:
supportsPaging in class PlatformDefaultImpl
See Also:
Platform.supportsPaging()

concatenate

public java.lang.String concatenate(java.lang.String[] theColumns)
Description copied from interface: Platform
Concatenate the columns
ie: col1 || col2 || col3 (ANSI)
ie: col1 + col2 + col3 (MS SQL-Server)
ie: concat(col1, col2, col3) (MySql)

Specified by:
concatenate in interface Platform
Overrides:
concatenate in class PlatformDefaultImpl
Returns:
the concatenated String
See Also:
Platform.concatenate(java.lang.String[])

getEscapeClause

public java.lang.String getEscapeClause(LikeCriteria aCriteria)
Description copied from interface: Platform
Answer the Clause used Escape wildcards in LIKE

Specified by:
getEscapeClause in interface Platform
Overrides:
getEscapeClause in class PlatformDefaultImpl
See Also:
Platform.getEscapeClause(org.apache.ojb.broker.query.LikeCriteria)


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30