Class LargeObjectDbReader

  • All Implemented Interfaces:
    AdditionalInformationHandler, ArrayProvider, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, DatabaseConnectionUser, VariableChangeListener, Actor, ArrayProvider, ErrorHandler, OutputProducer, Serializable, Comparable

    public class LargeObjectDbReader
    extends AbstractDbArrayProvider
    Allows reading of large objects from a SQL database.

    Input/output:
    - generates:
       adams.flow.core.Unknown


    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: LargeObjectDbReader
     
    -annotation <adams.core.base.BaseAnnotation> (property: annotations)
        The annotations to attach to this actor.
        default:
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow execution at this level gets stopped in case this
        actor encounters an error; the error gets propagated; useful for critical
        actors.
        default: false
     
    -silent <boolean> (property: silent)
        If enabled, then no errors are output in the console; Note: the enclosing
        actor handler must have this enabled as well.
        default: false
     
    -output-array <boolean> (property: outputArray)
        If enabled, the large objects get output as array rather than one-by-one
        default: false
     
    -query <adams.db.SQLStatement> (property: query)
        The query to execute for retrieving the large objects; only the first column
        of the returned result set will be retrieved.
        default:
     
    -type <BLOB|CLOB> (property: type)
        The type of large object to retrieve.
        default: BLOB
     
    -blob-conversion <adams.data.conversion.Conversion> (property: blobConversion)
        The conversion to apply to BLOB byte arrays.
        default: adams.data.conversion.UnknownToUnknown
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Query

        protected SQLStatement m_Query
        the SQL statement to execute.
      • m_BlobConversion

        protected Conversion m_BlobConversion
        the conversion to use blobs.
    • Constructor Detail

      • LargeObjectDbReader

        public LargeObjectDbReader()
    • Method Detail

      • setQuery

        public void setQuery​(SQLStatement value)
        Sets the query to use.
        Parameters:
        value - the query
      • getQuery

        public SQLStatement getQuery()
        Returns the query to use.
        Returns:
        the query
      • queryTipText

        public String queryTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setType

        public void setType​(LargeObjectType value)
        Sets the type to use.
        Parameters:
        value - the type
      • getType

        public LargeObjectType getType()
        Returns the type to use.
        Returns:
        the type
      • typeTipText

        public String typeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setBlobConversion

        public void setBlobConversion​(Conversion value)
        Sets the conversion to apply to BLOB byte arrays.
        Parameters:
        value - the conversion
      • getBlobConversion

        public Conversion getBlobConversion()
        Returns the conversion to apply to BLOB byte arrays.
        Returns:
        the conversion
      • blobConversionTipText

        public String blobConversionTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • queryDatabase

        protected String queryDatabase()
        Performs the actual database query.
        Specified by:
        queryDatabase in class AbstractDbArrayProvider
        Returns:
        null if everything is fine, otherwise error message