private void updateColumn ( EntityType entityType , Attribute attr , Attribute updatedAttr ) { // nullable changes if ( ! Objects . equals ( attr . isNillable ( ) , updatedAttr . isNillable ( ) ) ) { updateNillable ( entityType , attr , updatedAttr ) ; } // unique changes if ( ! Objects . equals ( attr . isUnique ( ) , updatedAttr . isUnique ( ) ) ) { updateUnique ( entityType , attr , updatedAttr ) ; } // readonly changes if ( ! Objects . equals ( attr . isReadOnly ( ) , updatedAttr . isReadOnly ( ) ) ) { updateReadonly ( entityType , attr , updatedAttr ) ; } // data type changes if ( ! Objects . equals ( attr . getDataType ( ) , updatedAttr . getDataType ( ) ) ) { if ( updatedAttr . isReadOnly ( ) ) { dropTableTriggers ( entityType ) ; } updateDataType ( entityType , attr , updatedAttr ) ; if ( updatedAttr . isReadOnly ( ) ) { createTableTriggers ( entityType ) ; } } // ref entity changes if ( attr . hasRefEntity ( ) && updatedAttr . hasRefEntity ( ) && ! attr . getRefEntity ( ) . getId ( ) . equals ( updatedAttr . getRefEntity ( ) . getId ( ) ) ) { updateRefEntity ( entityType , attr , updatedAttr ) ; } // enum option changes if ( ! Objects . equals ( attr . getEnumOptions ( ) , updatedAttr . getEnumOptions ( ) ) ) { updateEnumOptions ( entityType , attr , updatedAttr ) ; } }
Updates database column based on attribute changes .