Class DirectDataLoaderTask

  • Direct Known Subclasses:
    FileDirectDataLoaderTask

    public abstract class DirectDataLoaderTask
    extends DynamicAttributeTask
    This task uses a DirectDataLoader to create objects and store them directly into an ObjectStore using an IntegrationWriter.
    Author:
    Kim Rutherford
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String sourceName  
      • Fields inherited from class org.apache.tools.ant.Task

        description, location, target, taskName, taskType, wrapper
      • Fields inherited from class org.apache.tools.ant.ProjectComponent

        project
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()  
      DirectDataLoader getDirectDataLoader()
      Return the DirectDataLoader for this Task.
      protected IntegrationWriter getIntegrationWriter()
      Return the IntegrationWriter for this task.
      abstract void process()
      Called by execute() to process the data.
      void setIgnoreDuplicates​(boolean ignoreDuplicates)
      Set the value of ignoreDuplicates for the IntegrationWriter
      void setIntegrationWriterAlias​(java.lang.String integrationWriterAlias)
      Set the IntegrationWriter.
      void setSourceName​(java.lang.String sourceName)
      Set the source name, as used by primary key priority config.
      void setSourceType​(java.lang.String sourceType)
      Set the source type, as used by primary key priority config.
      • Methods inherited from class org.apache.tools.ant.Task

        getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
      • Methods inherited from class org.apache.tools.ant.ProjectComponent

        getProject, setProject
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • sourceName

        protected java.lang.String sourceName
    • Constructor Detail

      • DirectDataLoaderTask

        public DirectDataLoaderTask()
    • Method Detail

      • setIntegrationWriterAlias

        public void setIntegrationWriterAlias​(java.lang.String integrationWriterAlias)
        Set the IntegrationWriter.
        Parameters:
        integrationWriterAlias - the name of the IntegrationWriter
      • setSourceName

        public void setSourceName​(java.lang.String sourceName)
        Set the source name, as used by primary key priority config.
        Parameters:
        sourceName - the name of the data source
      • setSourceType

        public void setSourceType​(java.lang.String sourceType)
        Set the source type, as used by primary key priority config.
        Parameters:
        sourceType - the type of the data source
      • setIgnoreDuplicates

        public void setIgnoreDuplicates​(boolean ignoreDuplicates)
        Set the value of ignoreDuplicates for the IntegrationWriter
        Parameters:
        ignoreDuplicates - the value of ignoreDuplicates
      • getDirectDataLoader

        public DirectDataLoader getDirectDataLoader()
                                             throws ObjectStoreException
        Return the DirectDataLoader for this Task. Must be called only after execute() has been called.
        Returns:
        the DirectDataLoader
        Throws:
        ObjectStoreException - if there is an ObjectStore problem when creating the DirectDataLoader
      • process

        public abstract void process()
        Called by execute() to process the data. This implementation should call DirectDataLoader.createObject() and then DirectDataLoader.store() while processing.
      • execute

        public void execute()
        Overrides:
        execute in class org.apache.tools.ant.Task
        Throws:
        org.apache.tools.ant.BuildException - if an ObjectStore method fails