org.apache.torque.engine.platform
Class PlatformDefaultImpl

java.lang.Object
  extended by org.apache.torque.engine.platform.PlatformDefaultImpl
All Implemented Interfaces:
Platform
Direct Known Subclasses:
PlatformAxionImpl, PlatformCloudscapeImpl, PlatformDb2400Impl, PlatformDb2Impl, PlatformDerbyImpl, PlatformHypersonicImpl, PlatformInterbaseImpl, PlatformMsaccessImpl, PlatformMssqlImpl, PlatformMysqlImpl, PlatformOracleImpl, PlatformPostgresqlImpl, PlatformSapdbImpl, PlatformSybaseImpl

public class PlatformDefaultImpl
extends java.lang.Object
implements Platform

Default implementation for the Platform interface.

Version:
$Id: PlatformDefaultImpl.java 473814 2006-11-11 22:30:30Z tv $
Author:
Martin Poeschl

Field Summary
 
Fields inherited from interface org.apache.torque.engine.platform.Platform
IDENTITY, SEQUENCE
 
Constructor Summary
PlatformDefaultImpl()
          Default constructor.
 
Method Summary
 boolean createNotNullBeforeAutoincrement()
          Returns whether the "not null part" of the definition of a column should be generated before the "autoincrement part" in a "create table" statement.
 java.lang.String getAutoIncrement()
           
 Domain getDomainForSchemaType(SchemaType jdbcType)
          Returns the db specific domain for a jdbcType.
 int getMaxColumnNameLength()
          Returns the max column length supported by the db.
 java.lang.String getNativeIdMethod()
          Returns the native IdMethod (sequence|identity)
 java.lang.String getNullString(boolean notNull)
           
 boolean hasScale(java.lang.String sqlType)
          Returns if the RDBMS-specific SQL type has a scale attribute.
 boolean hasSize(java.lang.String sqlType)
          Returns if the RDBMS-specific SQL type has a size attribute.
protected  void setSchemaDomainMapping(Domain domain)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlatformDefaultImpl

public PlatformDefaultImpl()
Default constructor.

Method Detail

setSchemaDomainMapping

protected void setSchemaDomainMapping(Domain domain)

getMaxColumnNameLength

public int getMaxColumnNameLength()
Description copied from interface: Platform
Returns the max column length supported by the db.

Specified by:
getMaxColumnNameLength in interface Platform
Returns:
the max column length
See Also:
Platform.getMaxColumnNameLength()

getNativeIdMethod

public java.lang.String getNativeIdMethod()
Description copied from interface: Platform
Returns the native IdMethod (sequence|identity)

Specified by:
getNativeIdMethod in interface Platform
Returns:
the native IdMethod
See Also:
Platform.getNativeIdMethod()

getDomainForSchemaType

public Domain getDomainForSchemaType(SchemaType jdbcType)
Description copied from interface: Platform
Returns the db specific domain for a jdbcType.

Specified by:
getDomainForSchemaType in interface Platform
Parameters:
jdbcType - the jdbcType name
Returns:
the db specific domain
See Also:
Platform.getDomainForSchemaType(SchemaType)

getNullString

public java.lang.String getNullString(boolean notNull)
Specified by:
getNullString in interface Platform
Returns:
Only produces a SQL fragment if null values are disallowed.
See Also:
Platform.getNullString(boolean)

getAutoIncrement

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

hasScale

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

Specified by:
hasScale in interface Platform
Parameters:
sqlType - the SQL type
Returns:
true if the type has a scale attribute
See Also:
TODO collect info for all platforms

hasSize

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

Specified by:
hasSize in interface Platform
Parameters:
sqlType - the SQL type
Returns:
true if the type has a size attribute
See Also:
TODO collect info for all platforms

createNotNullBeforeAutoincrement

public boolean createNotNullBeforeAutoincrement()
Description copied from interface: Platform
Returns whether the "not null part" of the definition of a column should be generated before the "autoincrement part" in a "create table" statement.

Specified by:
createNotNullBeforeAutoincrement in interface Platform
Returns:
true if the "not null part" should be first, false if the "autoincrement part" should be first in a "create table" statement.
See Also:
Platform.createNotNullBeforeAutoincrement()


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.