1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.waarp.openr66.dao.xml;
22
23 import org.waarp.openr66.dao.BusinessDAO;
24 import org.waarp.openr66.dao.DAOFactory;
25 import org.waarp.openr66.dao.HostDAO;
26 import org.waarp.openr66.dao.LimitDAO;
27 import org.waarp.openr66.dao.MultipleMonitorDAO;
28 import org.waarp.openr66.dao.RuleDAO;
29 import org.waarp.openr66.dao.TransferDAO;
30 import org.waarp.openr66.dao.exception.DAOConnectionException;
31
32 public class XMLDAOFactory extends DAOFactory {
33
34 public XMLDAOFactory() {
35
36 }
37
38 @Override
39 public BusinessDAO getBusinessDAO(final boolean isCacheable) {
40 return new XMLBusinessDAO();
41 }
42
43 @Override
44 public HostDAO getHostDAO(final boolean isCacheable) {
45 return new XMLHostDAO();
46 }
47
48 @Override
49 public LimitDAO getLimitDAO(final boolean isCacheable)
50 throws DAOConnectionException {
51 return new XMLLimitDAO();
52 }
53
54 @Override
55 public MultipleMonitorDAO getMultipleMonitorDAO(final boolean isCacheable)
56 throws DAOConnectionException {
57 throw new DAOConnectionException(
58 "MultipleMonitor is not supported on XML DAO");
59 }
60
61 @Override
62 public RuleDAO getRuleDAO(final boolean isCacheable) {
63 return new XMLRuleDAO();
64 }
65
66 @Override
67 public TransferDAO getTransferDAO() {
68 return new XMLTransferDAO();
69 }
70
71 @Override
72 public String getLimitRequest(final String request, final int limit,
73 final int offset) {
74 return request;
75 }
76
77 }