1 package ecar.dao;
2
3 import java.util.Iterator;
4 import java.util.List;
5
6 import javax.servlet.http.HttpServletRequest;
7
8 import comum.database.Dao;
9
10 import ecar.exception.ECARException;
11 import ecar.pojo.ConfigMailCfgm;
12
13
14
15
16
17 public class ConfigMailCfgmDAO extends Dao {
18
19 public ConfigMailCfgmDAO() {
20 super();
21 }
22
23 public ConfigMailCfgmDAO(HttpServletRequest request) {
24 super();
25 this.request = request;
26 }
27
28
29
30
31
32
33 public List listar() throws ECARException {
34 return this.listar(ConfigMailCfgm.class, null);
35 }
36
37
38
39
40
41
42
43 public List getMailsAtivos() throws ECARException {
44
45 List list = this.listar();
46
47 for (Iterator it = list.iterator(); it.hasNext();) {
48 ConfigMailCfgm configMailCfgm = (ConfigMailCfgm) it.next();
49
50 if (!"S".equals(configMailCfgm.getAtivoCfgm())) {
51 it.remove();
52 }
53 }
54
55 return list;
56 }
57 }