Package ecar.dao

Source Code of ecar.dao.ConfigMailCfgmDAO

package ecar.dao;

import java.util.Iterator;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import comum.database.Dao;

import ecar.exception.ECARException;
import ecar.pojo.ConfigMailCfgm;

/**
* @author rogeriom
* @version 0.1, 13/04/2006
*/
public class ConfigMailCfgmDAO extends Dao {
 
    /**
     *
     */
    public ConfigMailCfgmDAO() {
    super();
  }
 
        /**
         *
         * @param request
         */
        public ConfigMailCfgmDAO(HttpServletRequest request) {
    super();
    this.request = request;
  }

  /**
   * Lista os itens de configura��o.
   * @return List
   * @throws ECARException
   */
  public List listar() throws ECARException {
      return this.listar(ConfigMailCfgm.class, null);
  }
 
  /**
   * Retorna lista de Configura��es de Emails Ativos.
   * @return List
   * @throws ECARException
   */
  public List getMailsAtivos() throws ECARException {
   
   
    List list = this.listar();
   
    for (Iterator it = list.iterator(); it.hasNext();) {
      ConfigMailCfgm configMailCfgm = (ConfigMailCfgm) it.next();
         
      if( !"S".equals(configMailCfgm.getAtivoCfgm()) )  {
        it.remove();
      }
    }
   
    return list;
  }
}
TOP

Related Classes of ecar.dao.ConfigMailCfgmDAO

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.