class ManterAltaPlanoRN extends BaseBusiness {

	public void verificarCompl(Short novoPlaSeq, Short oldPlaSeq, String novoComplPlanoPosAlta) throws ApplicationBusinessException {
		MpmPlanoPosAlta planoPosAlta = null;

		if (novoPlaSeq != null) {
			planoPosAlta = this.getPlanoPosAltaDAO().obterPlanoPosAltaPeloId(novoPlaSeq.intValue());
		} else {
			planoPosAlta = this.getPlanoPosAltaDAO().obterPlanoPosAltaPeloId(oldPlaSeq.intValue());
		}

		if (planoPosAlta != null) {
			if ((planoPosAlta.getIndExigeComplemento() != null)
					&& planoPosAlta.getIndExigeComplemento().booleanValue()
					&& (StringUtils.isBlank(novoComplPlanoPosAlta))) {
				ManterAltaPlanoRNExceptionCode.MPM_02949.throwException();
			}
			if ((planoPosAlta.getIndExigeComplemento() != null)
					&& !planoPosAlta.getIndExigeComplemento()
							.booleanValue() 
					&& (StringUtils.isNotBlank(novoComplPlanoPosAlta) )) {
				ManterAltaPlanoRNExceptionCode.MPM_02950.throwException();
			}
		} else {
			//MPM-02645:Plano pós alta não encontrado.
			ManterAltaPlanoRNExceptionCode.MPM_02645.throwException();
		}
		
	}

}