org.apache.ws.jaxme.sqls.db2

Class DB2SQLGeneratorImpl

Implemented Interfaces:
DB2SQLGenerator, SQLGenerator

public class DB2SQLGeneratorImpl
extends SQLGeneratorImpl
implements DB2SQLGenerator

Default implementation of an SQL generator for DB2 schemas.
Author:
Jochen Wiedmann

Method Summary

protected String
getCreate(Column pColumn)
Collection
getCreate(BufferPool pBufferPool)
Collection
getCreate(TableSpace pTableSpace)
protected String
getCreateTableHeader(Table pTable)
Collection
getDrop(Schema pSchema)
Generates a DROP SCHEMA statement.
Collection
getDrop(BufferPool pBufferPool)
Collection
getDrop(TableSpace pTableSpace)
protected String
getTypeName(Column.Type pType)
boolean
isCreatingTableSpaceReferences()
Returns whether CREATE TABLE statements will contain table space references or not.
protected boolean
isForeignKeyPartOfCreateTable()
protected boolean
isPrimaryKeyPartOfCreateTable()
protected boolean
isUniqueIndexPartOfCreateTable()
void
setCreatingTableSpaceReferences(boolean pCreatingTableSpaceReferences)
Sets whether CREATE TABLE statements will contain table space references or not.

Methods inherited from class org.apache.ws.jaxme.sqls.impl.SQLGeneratorImpl

createForeignKeyAsPartOfCreateTable, createIndexAsPartOfCreateTable, createPrimaryKeyAsPartOfCreateTable, getBooleanConstraint, getBooleanConstraintPart, getBooleanConstraintType, getCase, getColumnAlias, getColumnAlias, getCombinedConstraint, getConstraint, getConstraint, getCreate, getCreate, getCreate, getCreate, getCreate, getCreate, getCreate, getCreateTableHeader, getDeleteQuery, getDrop, getDrop, getDrop, getDrop, getDrop, getDrop, getEscapedString, getExpression, getFunction, getIndent, getInsertQuery, getJoinAlias, getLineTerminator, getOrderColumn, getParts, getQuery, getSelectQuery, getSelectQuery, getSelectQueryConstraints, getSelectQueryFromClause, getSelectQueryOrderClause, getSelectQueryResultColumns, getStatementTerminator, getTableAlias, getTypeName, getUpdateQuery, getValue, getWhereClause, getWhereClause, isForeignKeyPartOfCreateTable, isNonUniqueIndexPartOfCreateTable, isPrimaryKeyPartOfCreateTable, isPrimaryKeyUniqueIndex, isQualifiedColumn, isTableAliasUsingAs, isUniqueIndexPartOfCreateTable, newStatement, newStatementMetaData, newStatementMetaData, newStatementMetaData, newStatementMetaData, setLineTerminator, setStatementTerminator

Method Details

getCreate

protected String getCreate(Column pColumn)
Overrides:
getCreate in interface SQLGeneratorImpl

getCreate

public Collection getCreate(BufferPool pBufferPool)
Specified by:
getCreate in interface DB2SQLGenerator

getCreate

public Collection getCreate(TableSpace pTableSpace)
Specified by:
getCreate in interface DB2SQLGenerator

getCreateTableHeader

protected String getCreateTableHeader(Table pTable)
Overrides:
getCreateTableHeader in interface SQLGeneratorImpl

getDrop

public Collection getDrop(Schema pSchema)
Generates a DROP SCHEMA statement. Doesn't create DROP TABLE or similar statements.
Specified by:
getDrop in interface SQLGenerator
Overrides:
getDrop in interface SQLGeneratorImpl

getDrop

public Collection getDrop(BufferPool pBufferPool)
Specified by:
getDrop in interface DB2SQLGenerator

getDrop

public Collection getDrop(TableSpace pTableSpace)
Specified by:
getDrop in interface DB2SQLGenerator

getTypeName

protected String getTypeName(Column.Type pType)
Overrides:
getTypeName in interface SQLGeneratorImpl

isCreatingTableSpaceReferences

public boolean isCreatingTableSpaceReferences()
Returns whether CREATE TABLE statements will contain table space references or not. The default is to create table space references.
Specified by:
isCreatingTableSpaceReferences in interface DB2SQLGenerator

isForeignKeyPartOfCreateTable

protected boolean isForeignKeyPartOfCreateTable()
Overrides:
isForeignKeyPartOfCreateTable in interface SQLGeneratorImpl

isPrimaryKeyPartOfCreateTable

protected boolean isPrimaryKeyPartOfCreateTable()
Overrides:
isPrimaryKeyPartOfCreateTable in interface SQLGeneratorImpl

isUniqueIndexPartOfCreateTable

protected boolean isUniqueIndexPartOfCreateTable()
Overrides:
isUniqueIndexPartOfCreateTable in interface SQLGeneratorImpl

setCreatingTableSpaceReferences

public void setCreatingTableSpaceReferences(boolean pCreatingTableSpaceReferences)
Sets whether CREATE TABLE statements will contain table space references or not. The default is to create table space references.
Specified by:
setCreatingTableSpaceReferences in interface DB2SQLGenerator