org.apache.torque.engine.platform
Interface Platform

All Known Implementing Classes:
PlatformAxionImpl, PlatformCloudscapeImpl, PlatformDb2400Impl, PlatformDb2Impl, PlatformDefaultImpl, PlatformDerbyImpl, PlatformHypersonicImpl, PlatformInterbaseImpl, PlatformMsaccessImpl, PlatformMssqlImpl, PlatformMysqlImpl, PlatformOracleImpl, PlatformPostgresqlImpl, PlatformSapdbImpl, PlatformSybaseImpl

public interface Platform

Interface for RDBMS platform specific behaviour.

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

Field Summary
static java.lang.String IDENTITY
          constant for native id method
static java.lang.String SEQUENCE
          constant for native id method
 
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.
 

Field Detail

IDENTITY

static final java.lang.String IDENTITY
constant for native id method

See Also:
Constant Field Values

SEQUENCE

static final java.lang.String SEQUENCE
constant for native id method

See Also:
Constant Field Values
Method Detail

getNativeIdMethod

java.lang.String getNativeIdMethod()
Returns the native IdMethod (sequence|identity)

Returns:
the native IdMethod

getMaxColumnNameLength

int getMaxColumnNameLength()
Returns the max column length supported by the db.

Returns:
the max column length

getDomainForSchemaType

Domain getDomainForSchemaType(SchemaType jdbcType)
Returns the db specific domain for a jdbcType.

Parameters:
jdbcType - the jdbcType name
Returns:
the db specific domain

getNullString

java.lang.String getNullString(boolean notNull)
Returns:
The RDBMS-specific SQL fragment for NULL or NOT NULL.

getAutoIncrement

java.lang.String getAutoIncrement()
Returns:
The RDBMS-specific SQL fragment for autoincrement.

hasSize

boolean hasSize(java.lang.String sqlType)
Returns if the RDBMS-specific SQL type has a size attribute.

Parameters:
sqlType - the SQL type
Returns:
true if the type has a size attribute

hasScale

boolean hasScale(java.lang.String sqlType)
Returns if the RDBMS-specific SQL type has a scale attribute.

Parameters:
sqlType - the SQL type
Returns:
true if the type has a scale attribute

createNotNullBeforeAutoincrement

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.

Returns:
true if the "not null part" should be first, false if the "autoincrement part" should be first in a "create table" statement.


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