Class SqlMerger

  • Direct Known Subclasses:
    SqlMerger2nd

    public class SqlMerger
    extends SqlUtil
    Author:
    Jorge Campins
    • Constructor Detail

      • SqlMerger

        public SqlMerger()
      • SqlMerger

        public SqlMerger​(String[] args)
    • Method Detail

      • old

        protected String old()
      • isInfoLoggingEnabled

        public boolean isInfoLoggingEnabled()
      • enableInfoLogging

        public void enableInfoLogging()
      • disableInfoLogging

        public void disableInfoLogging()
      • isDetailLoggingEnabled

        public boolean isDetailLoggingEnabled()
      • enableDetailLogging

        public void enableDetailLogging()
      • disableDetailLogging

        public void disableDetailLogging()
      • isThereChanceOfRenamedTables

        public boolean isThereChanceOfRenamedTables()
      • isThereChanceOfRenamedColumns

        public boolean isThereChanceOfRenamedColumns()
      • isIncrementallyUpgradeable

        public boolean isIncrementallyUpgradeable()
        incrementally upgradeable indicator. A database can be safely incrementally upgraded if there are no:
        • dropped tables
        • dropped columns
        • tables with new not-nullable columns with no default value
        • tables with matching columns now not-nullable with no default value
        • tables with matching columns with incompatible data types
        • tables with matching columns with shorter length
        • tables with matching columns with fewer integer digits
        • tables with matching columns with new foreign-key constraint
        • tables with matching columns with different foreign-key constraint
        • rows in referenced enumeration tables with matching primary-key but different business-key
        • rows deleted in referenced enumeration tables
        Returns:
        true, if the database can be safely incrementally upgraded; false otherwise
      • isTestingPhase

        public boolean isTestingPhase()
      • getNewSchema

        public String getNewSchema()
      • getOldSchema

        public String getOldSchema()
      • getOldHost

        public String getOldHost()
      • getOldPort

        public String getOldPort()
      • getOldUser

        public String getOldUser()
      • getOldPassword

        public String getOldPassword()
      • getOldDatabase

        public String getOldDatabase()
      • getProjectAlias

        public String getProjectAlias()
      • setProjectAlias

        public void setProjectAlias​(String alias)
      • getOldDataFolder

        public String getOldDataFolder()
      • setOldDataFolder

        public void setOldDataFolder​(String folder)
      • getTableNames

        public Set<String> getTableNames()
      • getCurrentKeyTableNames

        public Set<String> getCurrentKeyTableNames()
      • getMutableKeyTableNames

        public Set<String> getMutableKeyTableNames()
      • getUpdatedKeyTableNames

        public Set<String> getUpdatedKeyTableNames()
      • getUpdatedRowTableNames

        public Set<String> getUpdatedRowTableNames()
      • getDeletedRowTableNames

        public Set<String> getDeletedRowTableNames()
      • getDroppedTables

        public List<SqlTable> getDroppedTables()
      • getModifiedColumnNames

        public Set<String> getModifiedColumnNames()
      • getAddedRows

        public List<SqlRow> getAddedRows()
      • getDeletedRows

        public List<SqlRow> getDeletedRows()
      • clear

        public void clear()
      • merge

        public boolean merge()
      • merge

        public boolean merge​(boolean testing)
      • read1

        protected boolean read1()
      • read1

        protected boolean read1​(boolean simple)
      • reader1_args

        protected String[] reader1_args()
      • reader2_args

        protected String[] reader2_args()
      • getTablesLoadSet

        public Set<String> getTablesLoadSet()
        Returns:
        the tables load set
      • getTablesLoadMap

        public Map<String,​String> getTablesLoadMap()
        Returns:
        the tables load map
      • setTablesLoadMap

        public void setTablesLoadMap​(Map<String,​String> map)
        Parameters:
        map - the tables load map to set
      • getCatalogTablesSet

        public Set<String> getCatalogTablesSet()
        Returns:
        the catalog tables set
      • getCatalogTablesMap

        public Map<String,​String> getCatalogTablesMap()
        Returns:
        the catalog tables map
      • setCatalogTablesMap

        public void setCatalogTablesMap​(Map<String,​String> map)
        Parameters:
        map - the catalog tables map to set
      • platform

        protected String platform()