Class ProjectUpdater

java.lang.Object
org.pgcodekeeper.core.utils.ProjectUpdater

public class ProjectUpdater extends Object
Database project update and export management utility. Handles partial and full updates of database projects with safe backup and restore functionality. Supports overrides-only updates and manages temporary directories for safe atomic operations.
  • Constructor Details

    • ProjectUpdater

      public ProjectUpdater(AbstractDatabase dbNew, AbstractDatabase dbOld, Collection<TreeElement> changedObjects, DatabaseType dbType, String encoding, Path dirExport, boolean overridesOnly, ISettings settings)
      Creates a new project updater with specified configuration.
      Parameters:
      dbNew - the new database schema
      dbOld - the old database schema for comparison
      changedObjects - collection of changed tree elements
      dbType - the database type
      encoding - the file encoding to use
      dirExport - the export directory path
      overridesOnly - whether to update only overrides
      settings - the application settings
  • Method Details

    • updatePartial

      public void updatePartial() throws IOException
      Performs partial update of database project. Updates only changed objects with safe backup and restore on failure.
      Throws:
      IOException - if update operation fails
    • updateFull

      public void updateFull(boolean projectOnly) throws IOException
      Performs full update of database project. Completely regenerates project structure with optional overrides preservation.
      Parameters:
      projectOnly - whether to preserve overrides directory during update
      Throws:
      IOException - if update operation fails