Class GorTable<T extends org.gorpipe.gor.model.Row>

  • All Implemented Interfaces:
    org.gorpipe.gor.table.Table<T>
    Direct Known Subclasses:
    NorTable

    public class GorTable<T extends org.gorpipe.gor.model.Row>
    extends org.gorpipe.gor.table.BaseTable<T>
    Table class representing gor file (gor/gorz)
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.gorpipe.gor.table.BaseTable

        org.gorpipe.gor.table.BaseTable.Builder<B extends org.gorpipe.gor.table.BaseTable.Builder<B>>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.nio.file.Path tempOutFilePath  
      • Fields inherited from class org.gorpipe.gor.table.BaseTable

        fileReader, FORCE_SAME_COLUMN_NAMES, header, HISTORY_DIR_NAME, historyDir, path, prevSerial, tableLog
    • Constructor Summary

      Constructors 
      Constructor Description
      GorTable​(java.net.URI uri)  
      GorTable​(java.net.URI uri, org.gorpipe.gor.model.FileReader inputFileReader)  
      GorTable​(org.gorpipe.gor.table.BaseTable.Builder builder)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.nio.file.Path createInputTempFile​(java.util.Collection<T> lines)  
      protected T createRow​(java.lang.String line)  
      void delete​(java.lang.String... lines)  
      void delete​(java.util.Collection lines)  
      protected java.lang.String getGorCommand()  
      protected java.lang.String getInputTempFileEnding()  
      java.util.Iterator<java.lang.String> getLines()  
      protected java.nio.file.Path getTransactionFolderPath()  
      void initialize()  
      void insert​(java.lang.String... lines)  
      void insert​(java.util.Collection<T> lines)  
      protected java.util.List<T> lineStringsToEntries​(java.lang.String[] lines)  
      void saveTempMainFile()  
      protected void writeRowToStream​(org.gorpipe.gor.model.Row r, java.io.OutputStream os)  
      protected void writeToFile​(java.nio.file.Path filePath, java.util.Collection<T> lines)  
      • Methods inherited from class org.gorpipe.gor.table.BaseTable

        commit, commitRequest, containsProperty, getBooleanConfigTableProperty, getColumns, getConfigTableProperty, getFileReader, getFolderPath, getFolderUri, getId, getMetaFileName, getName, getPath, getPathUri, getProperty, getRootPath, getRootUri, getSecurityContext, getTempFileName, getTempMainFileName, getTempMetaFileName, isUseHistory, isValidateFiles, logAfter, parseHeader, parseHeaderFromFile, reload, save, saveTempMetaFile, setColumns, setFileReader, setProperty, setUseHistory, setValidateFiles, updateFromTempFile, updateMetaBeforeSave, updateNFSFolderMetadata, updateValidateHeader, validateFile
      • 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.table.Table

        delete, insert
    • Field Detail

      • tempOutFilePath

        protected java.nio.file.Path tempOutFilePath
    • Constructor Detail

      • GorTable

        public GorTable​(org.gorpipe.gor.table.BaseTable.Builder builder)
      • GorTable

        public GorTable​(java.net.URI uri,
                        org.gorpipe.gor.model.FileReader inputFileReader)
      • GorTable

        public GorTable​(java.net.URI uri)
    • Method Detail

      • getLines

        public java.util.Iterator<java.lang.String> getLines()
      • insert

        public void insert​(java.util.Collection<T> lines)
      • insert

        public void insert​(java.lang.String... lines)
      • delete

        public void delete​(java.util.Collection lines)
      • delete

        public void delete​(java.lang.String... lines)
      • lineStringsToEntries

        protected java.util.List<T> lineStringsToEntries​(java.lang.String[] lines)
      • createRow

        protected T createRow​(java.lang.String line)
      • getInputTempFileEnding

        protected java.lang.String getInputTempFileEnding()
      • getGorCommand

        protected java.lang.String getGorCommand()
      • saveTempMainFile

        public void saveTempMainFile()
        Specified by:
        saveTempMainFile in class org.gorpipe.gor.table.BaseTable<T extends org.gorpipe.gor.model.Row>
      • initialize

        public void initialize()
        Specified by:
        initialize in interface org.gorpipe.gor.table.Table<T extends org.gorpipe.gor.model.Row>
        Overrides:
        initialize in class org.gorpipe.gor.table.BaseTable<T extends org.gorpipe.gor.model.Row>
      • getTransactionFolderPath

        protected java.nio.file.Path getTransactionFolderPath()
      • createInputTempFile

        protected java.nio.file.Path createInputTempFile​(java.util.Collection<T> lines)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • writeToFile

        protected void writeToFile​(java.nio.file.Path filePath,
                                   java.util.Collection<T> lines)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • writeRowToStream

        protected void writeRowToStream​(org.gorpipe.gor.model.Row r,
                                        java.io.OutputStream os)
                                 throws java.io.IOException
        Throws:
        java.io.IOException