Class CoreSettings

java.lang.Object
org.pgcodekeeper.core.settings.CoreSettings
All Implemented Interfaces:
ISettings

public class CoreSettings extends Object implements ISettings
Core implementation of settings interface for database comparison and migration. Provides default implementations for all configuration options including database type, character encoding, file paths, and various migration behavior flags.
  • Constructor Details

    • CoreSettings

      public CoreSettings()
  • Method Details

    • getDbType

      public DatabaseType getDbType()
      Description copied from interface: ISettings
      Gets the database type for operations.
      Specified by:
      getDbType in interface ISettings
      Returns:
      the database type
    • setDbType

      public void setDbType(DatabaseType dbType)
    • isConcurrentlyMode

      public boolean isConcurrentlyMode()
      Description copied from interface: ISettings
      Checks if concurrent mode is enabled.
      Specified by:
      isConcurrentlyMode in interface ISettings
      Returns:
      true if concurrent mode is enabled
    • setConcurrentlyMode

      public void setConcurrentlyMode(boolean concurrentlyMode)
    • isAddTransaction

      public boolean isAddTransaction()
      Description copied from interface: ISettings
      Checks if migration scripts should be wrapped in transactions.
      Specified by:
      isAddTransaction in interface ISettings
      Returns:
      true if transaction wrapping is enabled
    • setAddTransaction

      public void setAddTransaction(boolean addTransaction)
    • isGenerateExists

      public boolean isGenerateExists()
      Description copied from interface: ISettings
      Checks if existence checks should be generated in migration scripts.
      Specified by:
      isGenerateExists in interface ISettings
      Returns:
      true if existence checks are enabled
    • setGenerateExists

      public void setGenerateExists(boolean generateExists)
    • isGenerateConstraintNotValid

      public boolean isGenerateConstraintNotValid()
      Description copied from interface: ISettings
      Checks if constraints should be generated with NOT VALID option.
      Specified by:
      isGenerateConstraintNotValid in interface ISettings
      Returns:
      true if NOT VALID constraints are enabled
    • setGenerateConstraintNotValid

      public void setGenerateConstraintNotValid(boolean generateConstraintNotValid)
    • isGenerateExistDoBlock

      public boolean isGenerateExistDoBlock()
      Description copied from interface: ISettings
      Checks if existence check DO blocks should be generated.
      Specified by:
      isGenerateExistDoBlock in interface ISettings
      Returns:
      true if DO block generation is enabled
    • setGenerateExistDoBlock

      public void setGenerateExistDoBlock(boolean generateExistDoBlock)
    • isPrintUsing

      public boolean isPrintUsing()
      Description copied from interface: ISettings
      Checks if USING clauses should be printed in generated SQL.
      Specified by:
      isPrintUsing in interface ISettings
      Returns:
      true if USING clause printing is enabled
    • setPrintUsing

      public void setPrintUsing(boolean printUsing)
    • isKeepNewlines

      public boolean isKeepNewlines()
      Description copied from interface: ISettings
      Checks if newlines should be preserved in generated SQL.
      Specified by:
      isKeepNewlines in interface ISettings
      Returns:
      true if newline preservation is enabled
    • setKeepNewlines

      public void setKeepNewlines(boolean keepNewlines)
    • isCommentsToEnd

      public boolean isCommentsToEnd()
      Description copied from interface: ISettings
      Checks if comments should be moved to the end of generated scripts.
      Specified by:
      isCommentsToEnd in interface ISettings
      Returns:
      true if comments are moved to end
    • setCommentsToEnd

      public void setCommentsToEnd(boolean commentsToEnd)
    • isAutoFormatObjectCode

      public boolean isAutoFormatObjectCode()
      Description copied from interface: ISettings
      Checks if object code should be automatically formatted.
      Specified by:
      isAutoFormatObjectCode in interface ISettings
      Returns:
      true if auto-formatting is enabled
    • isIgnorePrivileges

      public boolean isIgnorePrivileges()
      Description copied from interface: ISettings
      Checks if privileges should be ignored during comparison.
      Specified by:
      isIgnorePrivileges in interface ISettings
      Returns:
      true if privileges are ignored
    • setIgnorePrivileges

      public void setIgnorePrivileges(boolean ignorePrivileges)
      Description copied from interface: ISettings
      Sets whether privileges should be ignored during comparison.
      Specified by:
      setIgnorePrivileges in interface ISettings
      Parameters:
      ignorePrivileges - true to ignore privileges
    • isIgnoreColumnOrder

      public boolean isIgnoreColumnOrder()
      Description copied from interface: ISettings
      Checks if column order should be ignored during comparison.
      Specified by:
      isIgnoreColumnOrder in interface ISettings
      Returns:
      true if column order is ignored
    • setIgnoreColumnOrder

      public void setIgnoreColumnOrder(boolean ignoreColumnOrder)
    • isEnableFunctionBodiesDependencies

      public boolean isEnableFunctionBodiesDependencies()
      Description copied from interface: ISettings
      Checks if function body dependencies analysis is enabled.
      Specified by:
      isEnableFunctionBodiesDependencies in interface ISettings
      Returns:
      true if function body dependencies are enabled
    • setEnableFunctionBodiesDependencies

      public void setEnableFunctionBodiesDependencies(boolean enableFunctionBodiesDependencies)
    • isDataMovementMode

      public boolean isDataMovementMode()
      Description copied from interface: ISettings
      Checks if data movement mode is enabled for migrations.
      Specified by:
      isDataMovementMode in interface ISettings
      Returns:
      true if data movement mode is enabled
    • setDataMovementMode

      public void setDataMovementMode(boolean dataMovementMode)
    • isDropBeforeCreate

      public boolean isDropBeforeCreate()
      Description copied from interface: ISettings
      Checks if objects should be dropped before creating in migrations.
      Specified by:
      isDropBeforeCreate in interface ISettings
      Returns:
      true if drop-before-create is enabled
    • setDropBeforeCreate

      public void setDropBeforeCreate(boolean dropBeforeCreate)
    • isStopNotAllowed

      public boolean isStopNotAllowed()
      Description copied from interface: ISettings
      Checks if migration should stop when encountering not-allowed operations.
      Specified by:
      isStopNotAllowed in interface ISettings
      Returns:
      true if stop-on-not-allowed is enabled
    • setStopNotAllowed

      public void setStopNotAllowed(boolean stopNotAllowed)
    • isSelectedOnly

      public boolean isSelectedOnly()
      Description copied from interface: ISettings
      Checks if only selected objects should be processed.
      Specified by:
      isSelectedOnly in interface ISettings
      Returns:
      true if selected-only mode is enabled
    • setSelectedOnly

      public void setSelectedOnly(boolean selectedOnly)
    • isIgnoreConcurrentModification

      public boolean isIgnoreConcurrentModification()
      Description copied from interface: ISettings
      Checks if concurrent modifications should be ignored.
      Specified by:
      isIgnoreConcurrentModification in interface ISettings
      Returns:
      true if concurrent modifications are ignored
    • setIgnoreConcurrentModification

      public void setIgnoreConcurrentModification(boolean ignoreConcurrentModification)
    • isSimplifyView

      public boolean isSimplifyView()
      Description copied from interface: ISettings
      Checks if view definitions should be simplified.
      Specified by:
      isSimplifyView in interface ISettings
      Returns:
      true if view simplification is enabled
    • setSimplifyView

      public void setSimplifyView(boolean simplifyView)
    • isDisableCheckFunctionBodies

      public boolean isDisableCheckFunctionBodies()
      Description copied from interface: ISettings
      Checks if function body checking should be disabled.
      Specified by:
      isDisableCheckFunctionBodies in interface ISettings
      Returns:
      true if function body checking is disabled
    • setDisableCheckFunctionBodies

      public void setDisableCheckFunctionBodies(boolean disableCheckFunctionBodies)
    • getInCharsetName

      public String getInCharsetName()
      Description copied from interface: ISettings
      Gets the input character encoding name.
      Specified by:
      getInCharsetName in interface ISettings
      Returns:
      the character encoding name
    • setInCharsetName

      public void setInCharsetName(String inCharsetName)
    • getTimeZone

      public String getTimeZone()
      Description copied from interface: ISettings
      Gets the time zone setting.
      Specified by:
      getTimeZone in interface ISettings
      Returns:
      the time zone string
    • setTimeZone

      public void setTimeZone(String timeZone)
    • getFormatConfiguration

      public FormatConfiguration getFormatConfiguration()
      Description copied from interface: ISettings
      Gets the format configuration for code formatting.
      Specified by:
      getFormatConfiguration in interface ISettings
      Returns:
      the format configuration instance
    • getAllowedTypes

      public Collection<DbObjType> getAllowedTypes()
      Description copied from interface: ISettings
      Gets the collection of allowed database object types for processing.
      Specified by:
      getAllowedTypes in interface ISettings
      Returns:
      collection of allowed object types
    • setAllowedTypes

      public void setAllowedTypes(List<DbObjType> allowedTypes)
    • getPreFilePath

      public Collection<String> getPreFilePath()
      Description copied from interface: ISettings
      Gets the collection of pre-processing file paths.
      Specified by:
      getPreFilePath in interface ISettings
      Returns:
      collection of pre-processing file paths
    • setPreFilePath

      public void setPreFilePath(List<String> preFilePath)
    • getPostFilePath

      public Collection<String> getPostFilePath()
      Description copied from interface: ISettings
      Gets the collection of post-processing file paths.
      Specified by:
      getPostFilePath in interface ISettings
      Returns:
      collection of post-processing file paths
    • setPostFilePath

      public void setPostFilePath(List<String> postFilePath)
    • copy

      public CoreSettings copy()
      Description copied from interface: ISettings
      Creates a copy of this settings instance.
      Specified by:
      copy in interface ISettings
      Returns:
      a new settings instance with the same configuration