org.chur.ant.db.profiles.impl
Class DB2Profile

java.lang.Object
  extended by org.chur.ant.db.profiles.AbstractDBProfile
      extended by org.chur.ant.db.profiles.impl.DB2Profile
All Implemented Interfaces:
DBProfile

public class DB2Profile
extends AbstractDBProfile

IBM BD2 profile

Date: Oct 10, 2006 Time: 5:38:25 PM Author: Sergey Churikov


Constructor Summary
DB2Profile()
           
 
Method Summary
 SQLCommandProducer<Record> createDeleteSQLProducer()
           
 SQLCommandProducer<Record> createInsertSQLProducer()
           
 SQLCommandProducer<UpdateRecord> createUpdateSQLProducer()
           
 boolean isExceptionCanBeIgnored(java.sql.SQLException ex)
          All types of SQLException are applied (not ignored)
 java.lang.String toString()
           
 java.lang.String typeName(int sqlType, int len, java.lang.Integer precision)
          Convert field description into ANSI SQL.
 java.lang.String viewNameColumn()
          This method is used only in ViewStructTask to retrieve information about a view.
 java.lang.String viewOwnerColumn()
          This method is used only in ViewStructTask to retrieve information about a view.
 java.lang.String viewsCatalog()
          This method is used only in ViewStructTask to retrieve information about a view.
 java.lang.String viewSqlColumn()
          This method is used only in ViewStructTask to retrieve information about a view.
 
Methods inherited from class org.chur.ant.db.profiles.AbstractDBProfile
convert
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DB2Profile

public DB2Profile()
Method Detail

typeName

public java.lang.String typeName(int sqlType,
                                 int len,
                                 java.lang.Integer precision)
Convert field description into ANSI SQL. The following types supported:

Parameters:
sqlType - java.sql.Type value
len - field length according to metadata
precision - precision value if exist
Returns:
The SQL type description to include this string in SQL script
Throws:
java.lang.IllegalArgumentException - if sqlType is not supported (the support type see above)

viewsCatalog

public java.lang.String viewsCatalog()
Description copied from interface: DBProfile
This method is used only in ViewStructTask to retrieve information about a view.

Returns:
SYSCAT.VIEWS value

viewSqlColumn

public java.lang.String viewSqlColumn()
Description copied from interface: DBProfile
This method is used only in ViewStructTask to retrieve information about a view.

Returns:
TEXT value

viewNameColumn

public java.lang.String viewNameColumn()
Description copied from interface: DBProfile
This method is used only in ViewStructTask to retrieve information about a view.

Returns:
VIEWNAME value

viewOwnerColumn

public java.lang.String viewOwnerColumn()
Description copied from interface: DBProfile
This method is used only in ViewStructTask to retrieve information about a view.

Returns:
DEFINER value

isExceptionCanBeIgnored

public boolean isExceptionCanBeIgnored(java.sql.SQLException ex)
All types of SQLException are applied (not ignored)

Parameters:
ex -
Returns:
false

createUpdateSQLProducer

public SQLCommandProducer<UpdateRecord> createUpdateSQLProducer()

createInsertSQLProducer

public SQLCommandProducer<Record> createInsertSQLProducer()

createDeleteSQLProducer

public SQLCommandProducer<Record> createDeleteSQLProducer()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object