Class SQLSource

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.gorpipe.gor.driver.DataSource, org.gorpipe.gor.driver.providers.stream.sources.StreamSource

    public class SQLSource
    extends java.lang.Object
    implements org.gorpipe.gor.driver.providers.stream.sources.StreamSource
    Represents an table in SQL database Created by villi on 22/08/15.
    • Constructor Summary

      Constructors 
      Constructor Description
      SQLSource​(org.gorpipe.gor.driver.meta.SourceReference sourceReference)
      Create source
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      boolean exists()  
      org.gorpipe.gor.driver.meta.DataType getDataType()  
      java.lang.String getName()  
      java.io.OutputStream getOutputStream​(boolean append)  
      org.gorpipe.gor.driver.providers.stream.sources.StreamSourceMetadata getSourceMetadata()  
      org.gorpipe.gor.driver.meta.SourceReference getSourceReference()  
      org.gorpipe.gor.driver.meta.SourceType getSourceType()  
      java.io.InputStream open()  
      java.io.InputStream open​(long start)  
      java.io.InputStream open​(long start, long minLength)  
      boolean supportsLinks()  
      boolean supportsWriting()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.gorpipe.gor.driver.DataSource

        createDirectories, createDirectory, delete, getFullPath, isDirectory, list
      • Methods inherited from interface org.gorpipe.gor.driver.providers.stream.sources.StreamSource

        getOutputStream, getOutputStream, openClosable
    • Constructor Detail

      • SQLSource

        public SQLSource​(org.gorpipe.gor.driver.meta.SourceReference sourceReference)
        Create source
        Parameters:
        sourceReference - contains sql url of the form sql://table
    • Method Detail

      • open

        public java.io.InputStream open()
        Specified by:
        open in interface org.gorpipe.gor.driver.providers.stream.sources.StreamSource
      • open

        public java.io.InputStream open​(long start)
        Specified by:
        open in interface org.gorpipe.gor.driver.providers.stream.sources.StreamSource
      • open

        public java.io.InputStream open​(long start,
                                        long minLength)
        Specified by:
        open in interface org.gorpipe.gor.driver.providers.stream.sources.StreamSource
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.gorpipe.gor.driver.DataSource
      • getSourceMetadata

        public org.gorpipe.gor.driver.providers.stream.sources.StreamSourceMetadata getSourceMetadata()
        Specified by:
        getSourceMetadata in interface org.gorpipe.gor.driver.DataSource
        Specified by:
        getSourceMetadata in interface org.gorpipe.gor.driver.providers.stream.sources.StreamSource
      • getOutputStream

        public java.io.OutputStream getOutputStream​(boolean append)
        Specified by:
        getOutputStream in interface org.gorpipe.gor.driver.providers.stream.sources.StreamSource
      • supportsWriting

        public boolean supportsWriting()
        Specified by:
        supportsWriting in interface org.gorpipe.gor.driver.DataSource
      • supportsLinks

        public boolean supportsLinks()
        Specified by:
        supportsLinks in interface org.gorpipe.gor.driver.DataSource
      • getSourceReference

        public org.gorpipe.gor.driver.meta.SourceReference getSourceReference()
        Specified by:
        getSourceReference in interface org.gorpipe.gor.driver.DataSource
      • getDataType

        public org.gorpipe.gor.driver.meta.DataType getDataType()
        Specified by:
        getDataType in interface org.gorpipe.gor.driver.DataSource
      • exists

        public boolean exists()
        Specified by:
        exists in interface org.gorpipe.gor.driver.DataSource
      • getSourceType

        public org.gorpipe.gor.driver.meta.SourceType getSourceType()
        Specified by:
        getSourceType in interface org.gorpipe.gor.driver.DataSource
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface org.gorpipe.gor.driver.DataSource
        Throws:
        java.io.IOException