Class SyncPair<U extends AbstractUnit,​P extends AbstractUnit>

    • Constructor Detail

      • SyncPair

        public SyncPair​(U left,
                        SchemaMapping mapping,
                        U right)
        Can synchronize using a specific schema mapping. Used in : - Synchronize with the database - Synchronize with a file.
        Parameters:
        left - project
        mapping - between schemas
        right - project
      • SyncPair

        public SyncPair​(U left,
                        U right)
        Used in: - layout generate selected unit sql - drop item in table detail pane, workspace - schema script generator
        Parameters:
        left - unit
        right - unit
      • SyncPair

        public SyncPair​(P leftParent,
                        U left,
                        P rightParent,
                        U right,
                        boolean descendIntoChildren)
        Used in : - clone column by create fk on drag and drop - clone unit in layout
        Parameters:
        leftParent - of left
        left - unit
        rightParent - of right
        right - unit
        descendIntoChildren - synchronize children
    • Method Detail

      • synchronize

        public void synchronize()
      • hasDifferences

        public boolean hasDifferences()
      • getDiffCount

        public int getDiffCount()
      • getChildrenPairs

        public java.util.List<SyncPair> getChildrenPairs()
      • getDifferences

        public java.util.List<AbstractDiff> getDifferences()
      • hasNodesWithAction

        public boolean hasNodesWithAction​(SyncAction action)
      • actionWillDrop

        public int actionWillDrop​(SyncAction action,
                                  SyncSide into,
                                  boolean onlyTablesColumns)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toString

        public java.lang.String toString​(int level)
      • toSql

        public void toSql​(java.lang.String rdbms,
                          SyncAction onlyAction,
                          SyncSide into,
                          java.io.PrintWriter writer)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • commitIntoDatabase

        public void commitIntoDatabase​(Connector connector,
                                       SyncSide into,
                                       SyncAction onlyAction)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • generateCommitScript

        public AlterScript generateCommitScript​(java.lang.String rdbms,
                                                SyncAction onlyAction,
                                                SyncSide into,
                                                boolean includeForeignKeysInCreateTable)
      • mergeInto

        public void mergeInto​(SyncSide into,
                              SyncAction onlyAction,
                              com.wisecoders.dbs.diagram.fx.GenericLayoutPane layoutPane)
      • getUnit

        public U getUnit()
      • getParent

        public P getParent​(SyncSide side)
      • filter

        public void filter​(com.wisecoders.dbs.rdbms.sync.model.SyncFilter filter)
        Filter all tree using a given filter. The rejected differences will be removed
        Parameters:
        filter - to use for filtering
      • buildExpandableRowTree

        public void buildExpandableRowTree()
      • childrenContainsPairsWithTableExistsDiff

        public boolean childrenContainsPairsWithTableExistsDiff()
      • canSkipInDisplayAndShowChildrenDiffs

        public boolean canSkipInDisplayAndShowChildrenDiffs()