cascading.lingual.jdbc
Class JDBCPlatformTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by cascading.CascadingTestCase
              extended by cascading.PlatformTestCase
                  extended by cascading.lingual.LingualPlatformTestCase
                      extended by cascading.lingual.jdbc.JDBCPlatformTestCase
All Implemented Interfaces:
Serializable, junit.framework.Test
Direct Known Subclasses:
SimpleSqlPlatformTest

public abstract class JDBCPlatformTestCase
extends LingualPlatformTestCase

See Also:
Serialized Form

Field Summary
static String DRIVER_CLASSNAME
           
static String TEST_ROOT
           
static String URI
           
 
Fields inherited from class cascading.lingual.LingualPlatformTestCase
DATA_PATH, EMPS_COLUMN_TYPES, EMPS_COLUMNS, SALES_DEPTS_TABLE, SALES_EMPS_TABLE, SALES_SALES_TABLE, SALES_SCHEMA, SALES_SCHEMA_NAME, SIMPLE_EMPLOYEE_TABLE, SIMPLE_SALES_FACT_TABLE, SIMPLE_SCHEMA, SIMPLE_SCHEMA_NAME
 
Fields inherited from class cascading.PlatformTestCase
name, ROOT_OUTPUT_PATH
 
Constructor Summary
JDBCPlatformTestCase()
           
 
Method Summary
protected  void addTable(String schemaName, String tableName, String identifier, Fields fields)
           
protected  void addTable(String schemaName, String tableName, String identifier, Fields fields, String protocolName, String formatName)
           
protected  void assertExecutes(String sqlQuery)
           
protected  void assertNamedTablesEqual(String expectedTableName, String resultTableName)
           
protected  void assertTablesEqual(String tableName, String sqlQuery)
           
protected  void assertTablesEqual(com.google.common.collect.Table expectedTable, String sqlQuery)
           
protected  void assertTableValuesEqual(String tableName, String sqlQuery)
           
protected  void assertTableValuesEqual(com.google.common.collect.Table expectedTable, String sqlQuery)
           
protected  void assertUpdate(int[] expectedRowCounts, String[] sqlQueries)
           
protected  void assertUpdate(int expectedRowCount, String sqlQuery)
           
protected  com.google.common.collect.Table<Integer,Comparable,Object> createTable(ResultSet resultSet)
           
protected  com.google.common.collect.Table<Integer,Comparable,Object> createTable(ResultSet resultSet, boolean useOrdinal)
          Create table.
protected  com.google.common.collect.Table<Integer,Comparable,Object> createTableWithRows(ResultSet resultSet)
           
protected  ResultSet executeSql(String sql)
           
protected  int executeUpdateSql(String sql)
           
protected  Connection getConnection()
           
 String getConnectionString()
           
protected abstract  String getDefaultSchemaPath()
           
protected  String getFlowPlanPath()
           
protected  String getPlannerDebug()
           
protected  String getResultPath()
           
protected  String getSQLPlanPath()
           
protected  TupleEntryIterator getTable(String tableName)
           
protected  net.hydromatic.optiq.impl.java.JavaTypeFactory getTypeFactory()
           
protected  void setResultsTo(String schemaName, String tableName, Fields fields)
           
 void setUp()
           
 void tearDown()
           
 
Methods inherited from class cascading.lingual.LingualPlatformTestCase
enableLogging
 
Methods inherited from class cascading.PlatformTestCase
copyFromLocal, disableDebug, getOutputPath, getPathElements, getPlatform, getPlatformName, getProperties, getRootPath, getTestCaseName, getTestName, getTestRoot, installPlatform
 
Methods inherited from class cascading.CascadingTestCase
asCollection, asCollection, asCollection, asCollection, asList, asList, asSet, asSet, getSinkAsList, getSourceAsList, invokeAggregator, invokeAggregator, invokeAggregator, invokeBuffer, invokeBuffer, invokeBuffer, invokeFilter, invokeFilter, invokeFilter, invokeFilter, invokeFunction, invokeFunction, invokeFunction, invokeFunction, validateLength, validateLength, validateLength, validateLength, validateLength, validateLength, validateLength, validateLength, validateLength, validateLength
 
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

URI

public static final String URI
See Also:
Constant Field Values

DRIVER_CLASSNAME

public static final String DRIVER_CLASSNAME

TEST_ROOT

public static final String TEST_ROOT
Constructor Detail

JDBCPlatformTestCase

public JDBCPlatformTestCase()
Method Detail

setUp

public void setUp()
           throws Exception
Overrides:
setUp in class PlatformTestCase
Throws:
Exception

getPlannerDebug

protected String getPlannerDebug()

getResultPath

protected String getResultPath()

getDefaultSchemaPath

protected abstract String getDefaultSchemaPath()

getFlowPlanPath

protected String getFlowPlanPath()

getSQLPlanPath

protected String getSQLPlanPath()

getConnectionString

public String getConnectionString()

getConnection

protected Connection getConnection()
                            throws Exception
Throws:
Exception

getTypeFactory

protected net.hydromatic.optiq.impl.java.JavaTypeFactory getTypeFactory()

tearDown

public void tearDown()
              throws Exception
Overrides:
tearDown in class PlatformTestCase
Throws:
Exception

setResultsTo

protected void setResultsTo(String schemaName,
                            String tableName,
                            Fields fields)
                     throws Exception
Throws:
Exception

getTable

protected TupleEntryIterator getTable(String tableName)
                               throws IOException
Throws:
IOException

addTable

protected void addTable(String schemaName,
                        String tableName,
                        String identifier,
                        Fields fields)
                 throws Exception
Throws:
Exception

addTable

protected void addTable(String schemaName,
                        String tableName,
                        String identifier,
                        Fields fields,
                        String protocolName,
                        String formatName)
                 throws Exception
Throws:
Exception

executeSql

protected ResultSet executeSql(String sql)
                        throws Exception
Throws:
Exception

executeUpdateSql

protected int executeUpdateSql(String sql)
                        throws Exception
Throws:
Exception

assertTableValuesEqual

protected void assertTableValuesEqual(String tableName,
                                      String sqlQuery)
                               throws Exception
Throws:
Exception

assertTablesEqual

protected void assertTablesEqual(String tableName,
                                 String sqlQuery)
                          throws Exception
Throws:
Exception

assertExecutes

protected void assertExecutes(String sqlQuery)
                       throws Exception
Throws:
Exception

assertTableValuesEqual

protected void assertTableValuesEqual(com.google.common.collect.Table expectedTable,
                                      String sqlQuery)
                               throws Exception
Throws:
Exception

assertTablesEqual

protected void assertTablesEqual(com.google.common.collect.Table expectedTable,
                                 String sqlQuery)
                          throws Exception
Throws:
Exception

assertNamedTablesEqual

protected void assertNamedTablesEqual(String expectedTableName,
                                      String resultTableName)
                               throws Exception
Throws:
Exception

assertUpdate

protected void assertUpdate(int[] expectedRowCounts,
                            String[] sqlQueries)
                     throws Exception
Throws:
Exception

assertUpdate

protected void assertUpdate(int expectedRowCount,
                            String sqlQuery)
                     throws Exception
Throws:
Exception

createTable

protected com.google.common.collect.Table<Integer,Comparable,Object> createTable(ResultSet resultSet)
                                                                          throws SQLException
Throws:
SQLException

createTable

protected com.google.common.collect.Table<Integer,Comparable,Object> createTable(ResultSet resultSet,
                                                                                 boolean useOrdinal)
                                                                          throws SQLException
Create table.

Parameters:
resultSet - the result set
useOrdinal - the use ordinal
Returns:
the table
Throws:
SQLException - the sQL exception

createTableWithRows

protected com.google.common.collect.Table<Integer,Comparable,Object> createTableWithRows(ResultSet resultSet)
                                                                                  throws SQLException
Throws:
SQLException


Copyright © 2007-2013 Concurrent, Inc. All Rights Reserved.