private void writeModification(CatalogType newType, CatalogType prevType, String field)
    {
        // Don't write modifications if the field can be ignored
        if (checkModifyIgnoreList(newType, prevType, field)) {
            return;
        }

        // verify this is possible, write an error and mark return code false if so
        String errorMessage = checkModifyWhitelist(newType, prevType, field);

        // if it's not possible with non-empty tables, check for possible with empty tables
        if (errorMessage != null) {
            List<TablePopulationRequirements> responseList = checkModifyIfTableIsEmptyWhitelist(newType, prevType, field);
            // handle all the error messages and state from the modify check
            processModifyResponses(errorMessage, responseList);
        }

        if (! m_requiresCatalogDiffCmdsApplyToEE && checkCatalogDiffShouldApplyToEE(newType)) {
            m_requiresCatalogDiffCmdsApplyToEE = true;
        }

        // write the commands to make it so
        // they will be ignored if the change is unsupported
        m_serializer.writeCommandForField(newType, field, true);

        // record the field change for later generation of descriptive text
        // though skip the schema field of database because it changes all the time
        // and the diff will be caught elsewhere
        // need a better way to generalize this
        if ((newType instanceof Database) && field.equals("schema")) {
            return;
        }
        CatalogChangeGroup cgrp = m_changes.get(DiffClass.get(newType));
        cgrp.processChange(newType, prevType, field);
    }
private void writeModification ( CatalogType newType , CatalogType prevType , String field ) { if ( checkModifyIgnoreList ( newType , prevType , field ) ) { return ; } String errorMessage = checkModifyWhitelist ( newType , prevType , field ) ; if ( errorMessage != null ) { List < TablePopulationRequirements > responseList = checkModifyIfTableIsEmptyWhitelist ( newType , prevType , field ) ; processModifyResponses ( errorMessage , responseList ) ; } if ( ! m_requiresCatalogDiffCmdsApplyToEE && checkCatalogDiffShouldApplyToEE ( newType ) ) { m_requiresCatalogDiffCmdsApplyToEE = true ; } m_serializer . writeCommandForField ( newType , field , true ) ; if ( ( newType instanceof Database ) && field . equals ( "schema" ) ) { return ; } CatalogChangeGroup cgrp = m_changes . get ( DiffClass . get ( newType ) ) ; cgrp . processChange ( newType , prevType , field ) ; }
Add a modification