org.apache.torque.engine.platform
Class PlatformOracleImpl

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

public class PlatformOracleImpl
extends PlatformDefaultImpl

Oracle Platform implementation.

Version:
$Id: PlatformOracleImpl.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
PlatformOracleImpl()
          Default constructor.
 
Method Summary
 String getAutoIncrement()
           
 int getMaxColumnNameLength()
          Returns the max column length supported by the db.
 String getNativeIdMethod()
          Returns the native IdMethod (sequence|identity)
 List<String> getPrimaryKeys(DatabaseMetaData dbMeta, String dbSchema, String tableName)
          Retrieves a list of the columns composing the primary key for a given table.
 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)
           
 List<String> getTableNames(DatabaseMetaData dbMeta, String databaseSchema)
          Get all the table names in the current database that are not system tables.
 String getViewDefinition(Connection con, String schema, String viewName)
           
private  void initialize()
          Initializes db specific domain mapping.
 boolean isSpecialDefault(String defaultValue)
           
 
Methods inherited from class org.apache.torque.engine.platform.PlatformDefaultImpl
createNotNullBeforeAutoincrement, filterInvalidDefaultValues, getDomainForSchemaType, getNullString, getServerUrl, hasScale, hasSize, setSchemaDomainMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlatformOracleImpl

public PlatformOracleImpl()
Default constructor.

Method Detail

initialize

private void initialize()
Initializes db specific domain mapping.


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

getMaxColumnNameLength

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

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

getNativeIdMethod

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

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

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()

getPrimaryKeys

public List<String> getPrimaryKeys(DatabaseMetaData dbMeta,
                                   String dbSchema,
                                   String tableName)
                            throws SQLException
Description copied from class: PlatformDefaultImpl
Retrieves a list of the columns composing the primary key for a given table.

Specified by:
getPrimaryKeys in interface Platform
Overrides:
getPrimaryKeys in class PlatformDefaultImpl
Parameters:
dbMeta - JDBC metadata.
tableName - Table from which to retrieve PK information.
Returns:
A list of the primary key parts for tableName.
Throws:
SQLException

getTableNames

public List<String> getTableNames(DatabaseMetaData dbMeta,
                                  String databaseSchema)
                           throws SQLException
Description copied from class: PlatformDefaultImpl
Get all the table names in the current database that are not system tables.

Specified by:
getTableNames in interface Platform
Overrides:
getTableNames in class PlatformDefaultImpl
Parameters:
dbMeta - JDBC database metadata.
Returns:
The list of all the tables in a database.
Throws:
SQLException

isSpecialDefault

public boolean isSpecialDefault(String defaultValue)
Specified by:
isSpecialDefault in interface Platform
Overrides:
isSpecialDefault 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 © 2007-2011 The Kuali Foundation. All Rights Reserved.