org.apache.torque.engine.platform
Class PlatformMysqlImpl

java.lang.Object
  extended by org.apache.torque.engine.platform.PlatformDefaultImpl
      extended by org.apache.torque.engine.platform.PlatformMysqlImpl
All Implemented Interfaces:
Platform

public class PlatformMysqlImpl
extends PlatformDefaultImpl

MySql Platform implementation.

Version:
$Id: PlatformMysqlImpl.java,v 1.1.6.1 2008-04-18 17:04:37 jkeller Exp $
Author:
Martin Poeschl

Field Summary
 
Fields inherited from interface org.apache.torque.engine.platform.Platform
IDENTITY, SEQUENCE
 
Constructor Summary
PlatformMysqlImpl()
          Default constructor.
 
Method Summary
 String filterInvalidDefaultValues(String defaultValue)
           
 String getAutoIncrement()
           
protected  String getBaseUrl(String url)
           
protected  String getOptions(String url)
           
 String getSchemaName(String artifactId)
          Given an artifact id, return a string a schema name based on the artifact id that is allowed by the db vendor
 Long getSequenceNextVal(Connection con, String schema, String sequenceName)
           
 String getServerUrl(String url)
          jdbc:mysql://[host:port],[host:port]/[database][?property1][=value1][&property2][=value2]
 String getViewDefinition(Connection con, String schema, String viewName)
           
 boolean hasSize(String sqlType)
          Returns if the RDBMS-specific SQL type has a size attribute.
 
Methods inherited from class org.apache.torque.engine.platform.PlatformDefaultImpl
createNotNullBeforeAutoincrement, getDomainForSchemaType, getMaxColumnNameLength, getNativeIdMethod, getNullString, getPrimaryKeys, getTableNames, hasScale, isSpecialDefault, setSchemaDomainMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlatformMysqlImpl

public PlatformMysqlImpl()
Default constructor.

Method Detail

getAutoIncrement

public String getAutoIncrement()
Specified by:
getAutoIncrement in interface Platform
Overrides:
getAutoIncrement in class PlatformDefaultImpl
Returns:
The RDBMS-specific SQL fragment for autoincrement.
See Also:
Platform.getAutoIncrement()

hasSize

public boolean hasSize(String sqlType)
Description copied from interface: Platform
Returns if the RDBMS-specific SQL type has a size attribute.

Specified by:
hasSize in interface Platform
Overrides:
hasSize in class PlatformDefaultImpl
Parameters:
sqlType - the SQL type
Returns:
true if the type has a size attribute
See Also:
Platform.hasSize(String)

getBaseUrl

protected String getBaseUrl(String url)

getOptions

protected String getOptions(String url)

getServerUrl

public String getServerUrl(String url)
jdbc:mysql://[host:port],[host:port]/[database][?property1][=value1][&property2][=value2]

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

getSchemaName

public String getSchemaName(String artifactId)
Description copied from interface: Platform
Given an artifact id, return a string a schema name based on the artifact id that is allowed by the db vendor

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

filterInvalidDefaultValues

public String filterInvalidDefaultValues(String defaultValue)
Specified by:
filterInvalidDefaultValues in interface Platform
Overrides:
filterInvalidDefaultValues in class PlatformDefaultImpl

getSequenceNextVal

public Long getSequenceNextVal(Connection con,
                               String schema,
                               String sequenceName)
Specified by:
getSequenceNextVal in interface Platform
Overrides:
getSequenceNextVal in class PlatformDefaultImpl

getViewDefinition

public String getViewDefinition(Connection con,
                                String schema,
                                String viewName)
Specified by:
getViewDefinition in interface Platform
Overrides:
getViewDefinition in class PlatformDefaultImpl


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.