Class SqlMerger

  • Direct Known Subclasses:
    SqlMerger2nd

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

      • SqlMerger

        public SqlMerger()
      • SqlMerger

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

      • old

        protected java.lang.String old()
      • getSyntax

        protected java.lang.String getSyntax()
        Overrides:
        getSyntax in class SqlUtil
      • 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 java.lang.String getNewSchema()
      • getOldSchema

        public java.lang.String getOldSchema()
      • getOldHost

        public java.lang.String getOldHost()
      • getOldPort

        public java.lang.String getOldPort()
      • getOldUser

        public java.lang.String getOldUser()
      • getOldPassword

        public java.lang.String getOldPassword()
      • getOldDatabase

        public java.lang.String getOldDatabase()
      • getProjectAlias

        public java.lang.String getProjectAlias()
      • setProjectAlias

        public void setProjectAlias​(java.lang.String alias)
      • getOldDataFolder

        public java.lang.String getOldDataFolder()
      • setOldDataFolder

        public void setOldDataFolder​(java.lang.String folder)
      • getTableNames

        public java.util.Set<java.lang.String> getTableNames()
      • getCurrentKeyTableNames

        public java.util.Set<java.lang.String> getCurrentKeyTableNames()
      • getMutableKeyTableNames

        public java.util.Set<java.lang.String> getMutableKeyTableNames()
      • getAddedKeyTableNames

        public java.util.Set<java.lang.String> getAddedKeyTableNames()
      • getUpdatedKeyTableNames

        public java.util.Set<java.lang.String> getUpdatedKeyTableNames()
      • getUpdatedRowTableNames

        public java.util.Set<java.lang.String> getUpdatedRowTableNames()
      • getDeletedRowTableNames

        public java.util.Set<java.lang.String> getDeletedRowTableNames()
      • getAddedTables

        public java.util.List<SqlTable> getAddedTables()
      • getDroppedTables

        public java.util.List<SqlTable> getDroppedTables()
      • getNewColumns

        public java.util.Map<java.lang.String,​SqlColumn> getNewColumns()
      • getOldColumns

        public java.util.Map<java.lang.String,​SqlColumn> getOldColumns()
      • getOddColumns

        public java.util.List<SqlColumnPair> getOddColumns()
      • getModifiedColumnNames

        public java.util.Set<java.lang.String> getModifiedColumnNames()
      • getAddedColumns

        public java.util.List<SqlColumn> getAddedColumns()
      • getDroppedColumns

        public java.util.List<SqlColumn> getDroppedColumns()
      • getAddedRows

        public java.util.List<SqlRow> getAddedRows()
      • getDeletedRows

        public java.util.List<SqlRow> getDeletedRows()
      • getAddedValues

        public java.util.List<SqlRowValue> getAddedValues()
      • getUpdatedRows

        public java.util.Map<java.lang.String,​SqlRowPair> getUpdatedRows()
      • getSharedTables

        public java.util.List<SqlTableWrapper> getSharedTables()
      • getMessages

        public java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> getMessages()
      • getWarnings

        public java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> getWarnings()
      • 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 java.lang.String[] reader1_args()
      • reader2_args

        protected java.lang.String[] reader2_args()
      • getTablesLoadSet

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

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

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

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

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

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

        protected java.lang.String platform()