org.apache.ws.jaxme.sqls.db2
Class DB2SQLFactoryImpl

java.lang.Object
  extended by org.apache.ws.jaxme.sqls.impl.SQLFactoryImpl
      extended by org.apache.ws.jaxme.sqls.db2.DB2SQLFactoryImpl
All Implemented Interfaces:
DB2SQLFactory, SQLFactory

public class DB2SQLFactoryImpl
extends SQLFactoryImpl
implements DB2SQLFactory

Default implementation of an SQL factory for DB2 databases. This factory ensures that the created implementations of Schema, Table, Column, and SQLGenerator may be casted to DB2Schema, DB2Table, DB2Column, DB2SQLGenerator, respectively.

Author:
Jochen Wiedmann

Nested Class Summary
 class DB2SQLFactoryImpl.PredefinedTableSpace
          An immutable, predefined TableSpace.
 
Nested classes/interfaces inherited from class org.apache.ws.jaxme.sqls.impl.SQLFactoryImpl
SQLFactoryImpl.IdentImpl
 
Nested classes/interfaces inherited from interface org.apache.ws.jaxme.sqls.SQLFactory
SQLFactory.Ident
 
Field Summary
 TableSpace SYSCATSPACE
          The predefined table space SYSCATSPACE.
 TableSpace TEMPSPACE1
          The predefined table space TEMPSPACE1.
 TableSpace USERSPACE1
          The predefined table space USERSPACE1.
 
Constructor Summary
DB2SQLFactoryImpl()
           
 
Method Summary
 TableSpace getTableSpace(java.lang.String pName)
          Returns the tablespace with the given name or null, if no such tablespace exists.
 TableSpace getTableSpace(TableSpace.Name pName)
          Returns the tablespace with the given name or null, if no such tablespace exists.
 java.util.Iterator getTableSpaces()
          Returns a list of all tablespaces.
 Column newColumn(Table pTable, Column.Name pName, Column.Type pType)
           
 Schema newSchemaImpl(Schema.Name pName)
           
 SQLGenerator newSQLGenerator()
          Creates a new SQLGenerator.
 Table newTableImpl(Schema pSchema, Table.Name pName)
           
 TableSpace newTableSpace(java.lang.String pName, TableSpace.Type pType)
          Creates a new TableSpace with the given name.
 TableSpace newTableSpace(TableSpace.Name pName, TableSpace.Type pType)
          Creates a new TableSpace with the given name.
protected  TableSpace newTableSpaceImpl(TableSpace.Name pName, TableSpace.Type pType)
           
 
Methods inherited from class org.apache.ws.jaxme.sqls.impl.SQLFactoryImpl
getDefaultSchema, getMaxColumnNameLength, getMaxSchemaNameLength, getMaxTableNameLength, getObjectFactory, getSchema, getSchema, getSchema, getSchema, getSchemas, getTable, getTable, isColumnNameCaseSensitive, isSchemaNameCaseSensitive, isTableNameCaseSensitive, makeSchema, newColumnImpl, newDeleteStatement, newIdent, newInsertStatement, newObjectFactory, newSchema, newSchema, newSelectStatement, newUpdateStatement, readColumn, readForeignKeys, readPrimaryKey, readTable, readTables, setColumnNameCaseSensitive, setMaxColumnNameLength, setMaxSchemaNameLength, setMaxTableNameLength, setObjectFactory, setSchemaNameCaseSensitive, setTableNameCaseSensitive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.ws.jaxme.sqls.SQLFactory
getDefaultSchema, getMaxColumnNameLength, getMaxSchemaNameLength, getMaxTableNameLength, getObjectFactory, getSchema, getSchema, getSchema, getSchema, getSchemas, getTable, getTable, isColumnNameCaseSensitive, isSchemaNameCaseSensitive, isTableNameCaseSensitive, newDeleteStatement, newInsertStatement, newSchema, newSchema, newSelectStatement, newUpdateStatement
 

Field Detail

SYSCATSPACE

public final TableSpace SYSCATSPACE

The predefined table space SYSCATSPACE.


TEMPSPACE1

public final TableSpace TEMPSPACE1

The predefined table space TEMPSPACE1.


USERSPACE1

public final TableSpace USERSPACE1

The predefined table space USERSPACE1.

Constructor Detail

DB2SQLFactoryImpl

public DB2SQLFactoryImpl()
Method Detail

newSchemaImpl

public Schema newSchemaImpl(Schema.Name pName)
Overrides:
newSchemaImpl in class SQLFactoryImpl

newTableImpl

public Table newTableImpl(Schema pSchema,
                          Table.Name pName)
Overrides:
newTableImpl in class SQLFactoryImpl

newColumn

public Column newColumn(Table pTable,
                        Column.Name pName,
                        Column.Type pType)

newSQLGenerator

public SQLGenerator newSQLGenerator()
Description copied from interface: SQLFactory

Creates a new SQLGenerator.

Specified by:
newSQLGenerator in interface SQLFactory
Overrides:
newSQLGenerator in class SQLFactoryImpl

newTableSpace

public TableSpace newTableSpace(java.lang.String pName,
                                TableSpace.Type pType)
Description copied from interface: DB2SQLFactory

Creates a new TableSpace with the given name.

Specified by:
newTableSpace in interface DB2SQLFactory

newTableSpace

public TableSpace newTableSpace(TableSpace.Name pName,
                                TableSpace.Type pType)
Description copied from interface: DB2SQLFactory

Creates a new TableSpace with the given name.

Specified by:
newTableSpace in interface DB2SQLFactory

newTableSpaceImpl

protected TableSpace newTableSpaceImpl(TableSpace.Name pName,
                                       TableSpace.Type pType)

getTableSpace

public TableSpace getTableSpace(TableSpace.Name pName)
Description copied from interface: DB2SQLFactory

Returns the tablespace with the given name or null, if no such tablespace exists.

Specified by:
getTableSpace in interface DB2SQLFactory

getTableSpace

public TableSpace getTableSpace(java.lang.String pName)
Description copied from interface: DB2SQLFactory

Returns the tablespace with the given name or null, if no such tablespace exists.

Specified by:
getTableSpace in interface DB2SQLFactory

getTableSpaces

public java.util.Iterator getTableSpaces()
Description copied from interface: DB2SQLFactory

Returns a list of all tablespaces. This Iterator does not include the predefined table spaces SYSCATSPACE, TEMPSPACE1, or USERSPACE1. These table spaces are accessible via DB2SQLFactory.getTableSpace(TableSpace.Name) only.

Specified by:
getTableSpaces in interface DB2SQLFactory