Class PostgresDataStorage<R extends io.github.factoryfx.factory.FactoryBase<?,​R>>

  • All Implemented Interfaces:
    io.github.factoryfx.factory.storage.DataStorage<R>

    public class PostgresDataStorage<R extends io.github.factoryfx.factory.FactoryBase<?,​R>>
    extends java.lang.Object
    implements io.github.factoryfx.factory.storage.DataStorage<R>
    • Constructor Summary

      Constructors 
      Constructor Description
      PostgresDataStorage​(javax.sql.DataSource dataSource, R initialDataParam, io.github.factoryfx.factory.storage.migration.MigrationManager<R> migrationManager, io.github.factoryfx.factory.jackson.SimpleObjectMapper objectMapper)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addFutureData​(io.github.factoryfx.factory.storage.ScheduledUpdate<R> futureFactory)  
      void deleteFutureData​(java.lang.String id)  
      io.github.factoryfx.factory.storage.DataAndId<R> getCurrentData()  
      R getFutureData​(java.lang.String id)  
      java.util.Collection<io.github.factoryfx.factory.storage.ScheduledUpdateMetadata> getFutureDataList()  
      R getHistoryData​(java.lang.String id)  
      java.util.Collection<io.github.factoryfx.factory.storage.StoredDataMetadata> getHistoryDataList()  
      void patchAll​(io.github.factoryfx.factory.storage.DataStoragePatcher consumer)  
      void patchCurrentData​(io.github.factoryfx.factory.storage.DataStoragePatcher consumer)  
      void updateCurrentData​(io.github.factoryfx.factory.storage.DataUpdate<R> update, io.github.factoryfx.factory.storage.UpdateSummary changeSummary)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.github.factoryfx.factory.storage.DataStorage

        getInitialData
    • Constructor Detail

      • PostgresDataStorage

        public PostgresDataStorage​(javax.sql.DataSource dataSource,
                                   R initialDataParam,
                                   io.github.factoryfx.factory.storage.migration.MigrationManager<R> migrationManager,
                                   io.github.factoryfx.factory.jackson.SimpleObjectMapper objectMapper)
    • Method Detail

      • getHistoryData

        public R getHistoryData​(java.lang.String id)
        Specified by:
        getHistoryData in interface io.github.factoryfx.factory.storage.DataStorage<R extends io.github.factoryfx.factory.FactoryBase<?,​R>>
      • getHistoryDataList

        public java.util.Collection<io.github.factoryfx.factory.storage.StoredDataMetadata> getHistoryDataList()
        Specified by:
        getHistoryDataList in interface io.github.factoryfx.factory.storage.DataStorage<R extends io.github.factoryfx.factory.FactoryBase<?,​R>>
      • getCurrentData

        public io.github.factoryfx.factory.storage.DataAndId<R> getCurrentData()
        Specified by:
        getCurrentData in interface io.github.factoryfx.factory.storage.DataStorage<R extends io.github.factoryfx.factory.FactoryBase<?,​R>>
      • updateCurrentData

        public void updateCurrentData​(io.github.factoryfx.factory.storage.DataUpdate<R> update,
                                      io.github.factoryfx.factory.storage.UpdateSummary changeSummary)
        Specified by:
        updateCurrentData in interface io.github.factoryfx.factory.storage.DataStorage<R extends io.github.factoryfx.factory.FactoryBase<?,​R>>
      • patchAll

        public void patchAll​(io.github.factoryfx.factory.storage.DataStoragePatcher consumer)
        Specified by:
        patchAll in interface io.github.factoryfx.factory.storage.DataStorage<R extends io.github.factoryfx.factory.FactoryBase<?,​R>>
      • patchCurrentData

        public void patchCurrentData​(io.github.factoryfx.factory.storage.DataStoragePatcher consumer)
        Specified by:
        patchCurrentData in interface io.github.factoryfx.factory.storage.DataStorage<R extends io.github.factoryfx.factory.FactoryBase<?,​R>>
      • getFutureDataList

        public java.util.Collection<io.github.factoryfx.factory.storage.ScheduledUpdateMetadata> getFutureDataList()
        Specified by:
        getFutureDataList in interface io.github.factoryfx.factory.storage.DataStorage<R extends io.github.factoryfx.factory.FactoryBase<?,​R>>
      • deleteFutureData

        public void deleteFutureData​(java.lang.String id)
        Specified by:
        deleteFutureData in interface io.github.factoryfx.factory.storage.DataStorage<R extends io.github.factoryfx.factory.FactoryBase<?,​R>>
      • getFutureData

        public R getFutureData​(java.lang.String id)
        Specified by:
        getFutureData in interface io.github.factoryfx.factory.storage.DataStorage<R extends io.github.factoryfx.factory.FactoryBase<?,​R>>
      • addFutureData

        public void addFutureData​(io.github.factoryfx.factory.storage.ScheduledUpdate<R> futureFactory)
        Specified by:
        addFutureData in interface io.github.factoryfx.factory.storage.DataStorage<R extends io.github.factoryfx.factory.FactoryBase<?,​R>>