Class DBConverter


  • public abstract class DBConverter
    extends DataConverter
    A DataConverter that reads from a Database and writes to a ItemWriter
    Author:
    Kim Rutherford
    • Constructor Detail

      • DBConverter

        public DBConverter​(Database database,
                           Model tgtModel,
                           ItemWriter writer)
        Constructor
        Parameters:
        writer - an ItemWriter used to handle the resultant Items
        tgtModel - the Model used by the object store we will write to with the ItemWriter
        database - the database to read from
    • Method Detail

      • process

        public abstract void process()
                              throws java.lang.Exception
        Query from database and write items to the writer.
        Throws:
        java.lang.Exception - if there is a problem while processing
      • getDatabase

        public Database getDatabase()
        Get the Database that was passed to the constructor.
        Returns:
        the Database