com.openexchange.admin.tools.database
Class DataFetcherMysql

java.lang.Object
  extended by com.openexchange.admin.tools.database.DataFetcherMysql
All Implemented Interfaces:
DataFetcher

public class DataFetcherMysql
extends java.lang.Object
implements DataFetcher

Author:
cutmasta

Constructor Summary
DataFetcherMysql()
           
 
Method Summary
 java.util.Vector<TableObject> fetchTableObjects()
          Returns an unsorted list of tables with their data.
Perhaps tables must be sorted cause of contraints etc.
 java.lang.String getCatalogName()
           
 java.lang.Object getColumnMatchObject()
           
 int getColumnMatchType()
           
 TableObject getDataForTable(TableObject to)
           
 java.sql.Connection getDbConnection()
           
 java.lang.String getMatchingColumn()
           
 void setColumnMatchObject(java.lang.Object match_obj, int match_type)
          Sets the criteria match object and its correspoding type.
For example to match an integer:
setCriteriaMatchObject(1337,java.sql.Types.INTEGER)
 void setDbConnection(java.sql.Connection dbConnection, java.lang.String catalog_name)
           
 void setMatchingColumn(java.lang.String column_name)
          Set the column which should be matched
 java.util.Vector<TableObject> sortTableObjects()
          Returns an sorted list of tables with their data.
Needed for contraints and primarys etc.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataFetcherMysql

public DataFetcherMysql()
Method Detail

getCatalogName

public java.lang.String getCatalogName()
Specified by:
getCatalogName in interface DataFetcher

getDbConnection

public java.sql.Connection getDbConnection()
Specified by:
getDbConnection in interface DataFetcher

setDbConnection

public void setDbConnection(java.sql.Connection dbConnection,
                            java.lang.String catalog_name)
                     throws java.sql.SQLException
Specified by:
setDbConnection in interface DataFetcher
Throws:
java.sql.SQLException

getMatchingColumn

public java.lang.String getMatchingColumn()
Specified by:
getMatchingColumn in interface DataFetcher

setMatchingColumn

public void setMatchingColumn(java.lang.String column_name)
Description copied from interface: DataFetcher
Set the column which should be matched

Specified by:
setMatchingColumn in interface DataFetcher

getColumnMatchType

public int getColumnMatchType()
Specified by:
getColumnMatchType in interface DataFetcher

getColumnMatchObject

public java.lang.Object getColumnMatchObject()
Specified by:
getColumnMatchObject in interface DataFetcher

setColumnMatchObject

public void setColumnMatchObject(java.lang.Object match_obj,
                                 int match_type)
Description copied from interface: DataFetcher
Sets the criteria match object and its correspoding type.
For example to match an integer:
setCriteriaMatchObject(1337,java.sql.Types.INTEGER)

Specified by:
setColumnMatchObject in interface DataFetcher

getDataForTable

public TableObject getDataForTable(TableObject to)
                            throws java.sql.SQLException
Specified by:
getDataForTable in interface DataFetcher
Throws:
java.sql.SQLException

fetchTableObjects

public java.util.Vector<TableObject> fetchTableObjects()
                                                throws java.sql.SQLException
Description copied from interface: DataFetcher
Returns an unsorted list of tables with their data.
Perhaps tables must be sorted cause of contraints etc.

Specified by:
fetchTableObjects in interface DataFetcher
Throws:
java.sql.SQLException

sortTableObjects

public java.util.Vector<TableObject> sortTableObjects()
                                               throws java.sql.SQLException
Description copied from interface: DataFetcher
Returns an sorted list of tables with their data.
Needed for contraints and primarys etc.

Specified by:
sortTableObjects in interface DataFetcher
Throws:
java.sql.SQLException