Class JDBCSequentialFileFactoryDriver

    • Field Detail

      • deleteFile

        protected java.lang.String deleteFile
      • createFile

        protected java.lang.String createFile
      • createFileColumnNames

        protected java.lang.String[] createFileColumnNames
      • createFileAutogeneratedKeys

        protected int createFileAutogeneratedKeys
      • selectFileByFileName

        protected java.lang.String selectFileByFileName
      • copyFileRecord

        protected java.lang.String copyFileRecord
      • renameFile

        protected java.lang.String renameFile
      • readLargeObject

        protected java.lang.String readLargeObject
      • appendToLargeObject

        protected java.lang.String appendToLargeObject
      • appendToLargeObjectResultSetType

        protected java.lang.Integer appendToLargeObjectResultSetType
      • appendToLargeObjectResultSetConcurrency

        protected java.lang.Integer appendToLargeObjectResultSetConcurrency
      • selectFileNamesByExtension

        protected java.lang.String selectFileNamesByExtension
    • Method Detail

      • createSchema

        protected void createSchema()
                             throws java.sql.SQLException
        Specified by:
        createSchema in class AbstractJDBCDriver
        Throws:
        java.sql.SQLException
      • listFiles

        public java.util.List<java.lang.String> listFiles​(java.lang.String extension)
                                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • openFile

        public void openFile​(JDBCSequentialFile file)
                      throws java.sql.SQLException
        Opens the supplied file. If the file does not exist in the database it will create a new one.
        Parameters:
        file -
        Throws:
        java.sql.SQLException
      • fileExists

        public long fileExists​(JDBCSequentialFile file)
                        throws java.sql.SQLException
        Checks to see if a file with filename and extension exists. If so returns the ID of the file or returns -1.
        Parameters:
        file -
        Returns:
        Throws:
        java.sql.SQLException
      • loadFile

        public void loadFile​(JDBCSequentialFile file)
                      throws java.sql.SQLException
        Loads an existing file.
        Parameters:
        file -
        Throws:
        java.sql.SQLException
      • createFile

        public void createFile​(JDBCSequentialFile file)
                        throws java.sql.SQLException
        Creates a new database row representing the supplied file.
        Parameters:
        file -
        Throws:
        java.sql.SQLException
      • renameFile

        public void renameFile​(JDBCSequentialFile file,
                               java.lang.String newFileName)
                        throws java.sql.SQLException
        Updates the fileName field to the new value.
        Parameters:
        file -
        newFileName -
        Throws:
        java.sql.SQLException
      • deleteFile

        public void deleteFile​(JDBCSequentialFile file)
                        throws java.sql.SQLException
        Deletes the associated row in the database.
        Parameters:
        file -
        Throws:
        java.sql.SQLException
      • writeToFile

        public int writeToFile​(JDBCSequentialFile file,
                               byte[] data)
                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • writeToFile

        public int writeToFile​(JDBCSequentialFile file,
                               byte[] data,
                               boolean append)
                        throws java.sql.SQLException
        Persists data to this files associated database mapping.
        Parameters:
        file -
        data -
        Returns:
        Throws:
        java.sql.SQLException
      • readFromFile

        public int readFromFile​(JDBCSequentialFile file,
                                java.nio.ByteBuffer bytes)
                         throws java.sql.SQLException
        Reads data from the file (at file.readPosition) into the byteBuffer.
        Parameters:
        file -
        bytes -
        Returns:
        Throws:
        java.sql.SQLException
      • copyFileData

        public void copyFileData​(JDBCSequentialFile fileFrom,
                                 JDBCSequentialFile fileTo)
                          throws java.sql.SQLException
        Copy the data content of FileFrom to FileTo
        Parameters:
        fileFrom -
        fileTo -
        Throws:
        java.sql.SQLException
      • destroy

        public void destroy()
                     throws java.sql.SQLException
        Drop all tables and data
        Overrides:
        destroy in class AbstractJDBCDriver
        Throws:
        java.sql.SQLException
      • calculateReadLength

        public long calculateReadLength​(long objectLength,
                                        int bufferSpace,
                                        long readPosition)
      • getMaxSize

        public long getMaxSize()