class ManterAltaPlanoRN extends BaseBusiness {

	public void verificarAlteracaoPlanoPosAlta(MpmAltaPlano altaPlano,MpmAltaPlano altaPlanoOriginal) throws ApplicationBusinessException {

		if (!altaPlano.getDescPlanoPosAlta().equalsIgnoreCase(altaPlanoOriginal.getDescPlanoPosAlta())
				&& !CoreUtil.modificados(altaPlano.getId(), altaPlanoOriginal.getId())) {
			throw new ApplicationBusinessException (ManterAltaPlanoRNExceptionCode.MPM_02643);
		}

		if (CoreUtil.modificados(altaPlano.getId(), altaPlanoOriginal.getId())
				&& ((altaPlano.getDescPlanoPosAlta() == null) || altaPlano.getDescPlanoPosAlta().equalsIgnoreCase(altaPlanoOriginal.getDescPlanoPosAlta()))) {
			throw new ApplicationBusinessException (ManterAltaPlanoRNExceptionCode.MPM_02644); //MPM-02644
		}

	}

}