org.apache.torque.engine.platform
Interface Platform

All Known Implementing Classes:
PlatformDefaultImpl

public interface Platform

Interface for RDBMS platform specific behaviour.

Version:
$Id: Platform.java 239626 2005-08-24 12:19:51Z henning $
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
 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

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

See Also:
Constant Field Values

SEQUENCE

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

See Also:
Constant Field Values
Method Detail

getNativeIdMethod

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

Returns:
the native IdMethod

getMaxColumnNameLength

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

Returns:
the max column length

getDomainForSchemaType

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

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

getNullString

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

getAutoIncrement

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

hasSize

public 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

public 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


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