Information

0
Story Points

Technologies

Decompiled Java File
package mx.com.bcm.banamex.ae.negocio.catalogo.bo.impl;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import mx.com.bcm.banamex.ae.negocio.catalogo.bo.CatalogoAtmBOBeanLocal;
import mx.com.bcm.banamex.ae.persistencia.assambler.AtmAssambler;
import mx.com.bcm.banamex.ae.persistencia.dao.CatalogoAtmDAOBeanLocal;
import mx.com.bcm.banamex.ae.persistencia.exception.EfectivoAplicacionBOException;
import mx.com.bcm.banamex.ae.persistencia.modelo.Atm;
import mx.com.bcm.banamex.ae.persistencia.vo.AtmVO;
import mx.com.bcm.banamex.ae.persistencia.vo.CriterioAtmVO;

@Stateless
public class CatalogoAtmBOImplBean implements CatalogoAtmBOBeanLocal {
   @EJB
   private CatalogoAtmDAOBeanLocal atmDAO;

   @TransactionAttribute(TransactionAttributeType.SUPPORTS)
   public List consultAtms() throws EfectivoAplicacionBOException {
      ArrayList listaAtmVO = new ArrayList();
      List listaAtms = this.atmDAO.findByAllAtm();
      Iterator var3 = listaAtms.iterator();

      while(var3.hasNext()) {
         Atm elemento = (Atm)var3.next();
         AtmVO atmVO = AtmAssambler.getAtmsVO(elemento);
         listaAtmVO.add(atmVO);
      }

      return listaAtmVO;
   }

   @TransactionAttribute(TransactionAttributeType.SUPPORTS)
   public List consultAtmPorIdAtms(CriterioAtmVO criterioAtmVO) throws EfectivoAplicacionBOException {
      ArrayList listaAtmVO = new ArrayList();
      new ArrayList();
      new AtmVO();
      criterioAtmVO.setBajaLogica("01");
      short id = criterioAtmVO.getAtmIdn().shortValue();
      if(id != 0) {
         List atms = this.atmDAO.findByIdnAtm(criterioAtmVO);
         Iterator var6 = atms.iterator();

         while(var6.hasNext()) {
            Atm elemento = (Atm)var6.next();
            AtmVO atmVO = AtmAssambler.getAtmsVO(elemento);
            listaAtmVO.add(atmVO);
         }
      } else {
         listaAtmVO.addAll(this.consultAtms());
      }

      return listaAtmVO;
   }
}
Page generated: Oct 19, 2017 2:35:00 PM