1 package fr.paris.lutece.plugins.grustoragedb.business;
2
3 import fr.paris.lutece.plugins.grubusiness.business.demand.Demand;
4 import fr.paris.lutece.plugins.grubusiness.business.demand.IDemandDAO;
5 import fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter;
6 import fr.paris.lutece.portal.service.plugin.Plugin;
7 import fr.paris.lutece.portal.service.plugin.PluginService;
8 import fr.paris.lutece.portal.service.spring.SpringContextService;
9
10 import java.util.Collection;
11 import java.util.List;
12
13
14
15
16 public final class DemandHome
17 {
18
19 private static IDemandDAO _dao = SpringContextService.getBean( "grustoragedb.DemandDAO" );
20 private static Plugin _plugin = PluginService.getPlugin( "grustoragedb" );
21
22
23
24
25 private DemandHome( )
26 {
27 }
28
29
30
31
32
33 public static List<Demand> getByIds( List<Integer> listIds)
34 {
35 return _dao.loadByIds( listIds);
36 }
37
38
39
40
41
42
43
44 public static List<Integer> searchIdsByFilter( NotificationFilter filter )
45 {
46 return _dao.loadIdsByFilter( filter );
47 }
48
49
50
51
52
53
54
55 public static Collection<Demand> searchByFilter( NotificationFilter filter )
56 {
57 return _dao.loadByFilter( filter );
58 }
59
60
61
62
63
64
65
66 public static Demand findByPrimaryKey( String strKey, String strDemandTypeId )
67 {
68 return _dao.load(strKey, strDemandTypeId);
69 }
70
71
72
73
74
75 public static Collection<Demand> getDemandIdCustomer(String strCustomerId )
76 {
77 return _dao.loadByCustomerId(strCustomerId);
78 }
79
80
81
82
83
84
85
86
87 public static List<Integer> getIdsByCustomerIdAndDemandTypeId( String strCustomerId, String strNotificationType, String strIdDemandType )
88 {
89 return _dao.loadIdsByCustomerIdAndIdDemandType( strCustomerId, strNotificationType, strIdDemandType );
90 }
91
92
93
94
95
96
97
98
99
100 public static List<Integer> getIdsByStatus( String strCustomerId, List<String> listStatus, String strNotificationType, String strIdDemandType )
101 {
102 return _dao.loadIdsByStatus( strCustomerId, listStatus, strNotificationType, strIdDemandType );
103 }
104
105
106
107
108
109
110
111
112 public static Demand update( Demand demand )
113 {
114 return _dao.store( demand );
115 }
116 }