class MbcCaracteristicaSalaCirgRN extends BaseBusiness {

	protected void atualizarHistoricoMovimentacoes(MbcCaracteristicaSalaCirg caractSalaCirg, boolean update) throws BaseException {
		MbcMvtoCaractSalaCirg mbcMvtoCaractSalaCirurg = new MbcMvtoCaractSalaCirg();
		if (update) {
			MbcMvtoCaractSalaCirg mbcMvtoCaractSalaCirgUpdate = getMbcMvtoCaractSalaCirgDAO().pesquisarUltimoMovimentoDaCaractSalaCirg(caractSalaCirg.getSeq());
			if (mbcMvtoCaractSalaCirgUpdate == null) {
				throw new ApplicationBusinessException(MbcCaracteristicaSalaCirgRNExceptionCode.MBC_01267);
			}
			setDataFimMvto(mbcMvtoCaractSalaCirgUpdate);
			getMbcMvtoCaractSalaCirgRN().persistirMbcMvtoCaractSalaCirg(mbcMvtoCaractSalaCirgUpdate);
			mbcMvtoCaractSalaCirurg.setMbcMvtoCaractSalaCirg(mbcMvtoCaractSalaCirgUpdate);
		} else {
			mbcMvtoCaractSalaCirurg.setMbcMvtoCaractSalaCirg(null);
		}
		populaMbcCaracteristicaSalaCirg(mbcMvtoCaractSalaCirurg, caractSalaCirg);
		getMbcMvtoCaractSalaCirgRN().persistirMbcMvtoCaractSalaCirg(mbcMvtoCaractSalaCirurg);
	}

}