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

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

public class MySQLProfile
extends AbstractDBProfile

Date: Mar 29, 2007 Time: 5:03:42 PM Author: Sergey Churikov


Constructor Summary
MySQLProfile()
           
 
Method Summary
 SQLCommandProducer<Record> createDeleteSQLProducer()
           
 SQLCommandProducer<Record> createInsertSQLProducer()
           
 SQLCommandProducer<UpdateRecord> createUpdateSQLProducer()
           
 boolean isExceptionCanBeIgnored(java.sql.SQLException ex)
          This this method it is possible to handle some cases when SQL operation can be continue even database error occured (say in case of Oracle we ignore ORA-00942 error: table or view does not exist).
 java.lang.String toString()
           
 java.lang.String typeName(int sqlType, int len, java.lang.Integer precision)
          Comparison method, i.e.
 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

MySQLProfile

public MySQLProfile()
Method Detail

typeName

public java.lang.String typeName(int sqlType,
                                 int len,
                                 java.lang.Integer precision)
Description copied from interface: DBProfile
Comparison method, i.e. method which is used for prepare SQL scripts while exported XMLs are compared.

Converts field description into ANSI SQL. If sqlType is not supported by DBProfile implementation IllegalArgumentException exception is thrown.

Parameters:
sqlType - java.sql.Types value
len - field len value
Returns:
ANSI SQL part

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:
name of catalog where views are described in the given DB

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:
name of field in the table/view which is returned by viewsCatalog method and where DDL defition of a view is stored in the given DB

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:
name of field in the table/view which is returned by viewsCatalog method and where name of view's name is stored in the given DB

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:
name of field in the table/view which is returned by viewsCatalog method and where name of view's owner name is stored in the given DB

isExceptionCanBeIgnored

public boolean isExceptionCanBeIgnored(java.sql.SQLException ex)
Description copied from interface: DBProfile
This this method it is possible to handle some cases when SQL operation can be continue even database error occured (say in case of Oracle we ignore ORA-00942 error: table or view does not exist).

Parameters:
ex - database error
Returns:
true if given exception can be ignored or false if db action must be terminated

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