private void writeDeletion ( CatalogType prevType , CatalogType newlyChildlessParent , String mapName ) { // Don't write deletions if the field can be ignored if ( checkDeleteIgnoreList ( prevType , newlyChildlessParent , mapName , prevType . getTypeName ( ) ) ) { return ; } // verify this is possible, write an error and mark return code false if so String errorMessage = checkAddDropWhitelist ( prevType , ChangeType . DELETION ) ; // if it's not possible with non-empty tables, check for possible with empty tables if ( errorMessage != null ) { TablePopulationRequirements response = checkAddDropIfTableIsEmptyWhitelist ( prevType , ChangeType . DELETION ) ; List < TablePopulationRequirements > responseList = null ; if ( response != null ) { responseList = Collections . singletonList ( response ) ; } processModifyResponses ( errorMessage , responseList ) ; } if ( ! m_requiresCatalogDiffCmdsApplyToEE && checkCatalogDiffShouldApplyToEE ( prevType ) ) { m_requiresCatalogDiffCmdsApplyToEE = true ; } // write the commands to make it so // they will be ignored if the change is unsupported m_serializer . writeDeleteDiffStatement ( prevType , mapName ) ; // add it to the set of deletions to later compute descriptive text CatalogChangeGroup cgrp = m_changes . get ( DiffClass . get ( prevType ) ) ; cgrp . processDeletion ( prevType , newlyChildlessParent ) ; }
Add a deletion