org.pentaho.platform.dataaccess.datasource.wizard.service.agile
Class StagingTransformGenerator

java.lang.Object
  extended by org.pentaho.platform.engine.core.system.PentahoBase
      extended by org.pentaho.platform.dataaccess.datasource.wizard.service.agile.StagingTransformGenerator
All Implemented Interfaces:
Serializable, ILogger
Direct Known Subclasses:
CsvTransformGenerator, TableInputTransformGenerator

public abstract class StagingTransformGenerator
extends PentahoBase

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.pentaho.platform.engine.core.system.PentahoBase
EMPTYLOGID, LOGID_MASK1, LOGID_MASK2, LOGID_SEPARATOR
 
Fields inherited from interface org.pentaho.platform.api.engine.ILogger
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN
 
Constructor Summary
StagingTransformGenerator()
          Default constructor that uses the JNDI datasource configured in the plugin.xml file.
StagingTransformGenerator(org.pentaho.di.core.database.DatabaseMeta databaseMeta)
          Use this contructor if you want to specify a different datasource than the one configured in plugin.xml.
 
Method Summary
 void cancelLoad(IPentahoSession session)
           
 int createIndices(IPentahoSession session)
           
 void createOrModifyTable(IPentahoSession session)
           
 void dropTable(String tableName)
           
 void execSqlStatement(String sqlScript, org.pentaho.di.core.database.DatabaseMeta ci, StringBuilder message)
           
 org.apache.commons.logging.Log getLogger()
           
 String getTableName()
           
 FileTransformStats getTransformStats()
           
 void loadTable(boolean truncate, IPentahoSession session, boolean async)
          Stages the data from a CSV file into a database table.
 void preview(IPentahoSession session)
           
 void setTableName(String tableName)
           
 void setTransformStats(FileTransformStats transformStats)
           
 
Methods inherited from class org.pentaho.platform.engine.core.system.PentahoBase
debug, debug, error, error, fatal, fatal, genLogIdFromInfo, genLogIdFromInfo, genLogIdFromSession, getLoggingLevel, getLogId, getObjectName, info, info, setLoggingLevel, setLogId, trace, trace, warn, warn
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StagingTransformGenerator

public StagingTransformGenerator()
Default constructor that uses the JNDI datasource configured in the plugin.xml file.


StagingTransformGenerator

public StagingTransformGenerator(org.pentaho.di.core.database.DatabaseMeta databaseMeta)
Use this contructor if you want to specify a different datasource than the one configured in plugin.xml. Typically used for unit testing.

Parameters:
databaseMeta -
Method Detail

preview

public void preview(IPentahoSession session)
             throws CsvTransformGeneratorException
Throws:
CsvTransformGeneratorException

dropTable

public void dropTable(String tableName)
               throws CsvTransformGeneratorException
Throws:
CsvTransformGeneratorException

createOrModifyTable

public void createOrModifyTable(IPentahoSession session)
                         throws CsvTransformGeneratorException,
                                IllegalArgumentException
Throws:
CsvTransformGeneratorException
IllegalArgumentException

loadTable

public void loadTable(boolean truncate,
                      IPentahoSession session,
                      boolean async)
               throws CsvTransformGeneratorException
Stages the data from a CSV file into a database table. As the table is loading, a TransformStats monitors the progress. This is placed in the supplied IPentahoSession to allow interrogation under the attribute key FileTransformStats_fileName

Parameters:
info -
truncate -
session -
Throws:
CsvTransformGeneratorException

createIndices

public int createIndices(IPentahoSession session)

cancelLoad

public void cancelLoad(IPentahoSession session)

execSqlStatement

public void execSqlStatement(String sqlScript,
                             org.pentaho.di.core.database.DatabaseMeta ci,
                             StringBuilder message)
                      throws IllegalArgumentException,
                             CsvTransformGeneratorException
Throws:
IllegalArgumentException
CsvTransformGeneratorException

getLogger

public org.apache.commons.logging.Log getLogger()
Specified by:
getLogger in class PentahoBase

getTransformStats

public FileTransformStats getTransformStats()

setTransformStats

public void setTransformStats(FileTransformStats transformStats)

getTableName

public String getTableName()

setTableName

public void setTableName(String tableName)