Log In | Get Help   
Home My Page Projects Code Snippets Project Openings Accounting and Billing Portal
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files
[abportal] Annotation of /src/main/java/eu/smartlm/abs/portal/data/query/QueryConstructor.java
[abportal] / src / main / java / eu / smartlm / abs / portal / data / query / QueryConstructor.java Repository:
ViewVC logotype

Annotation of /src/main/java/eu/smartlm/abs/portal/data/query/QueryConstructor.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : dgarcia 1 package eu.smartlm.abs.portal.data.query;
2 :    
3 :     import java.util.Date;
4 :     import java.util.Set;
5 :    
6 :     import org.gridforum.x2003.urWg.HostDocument.Host;
7 :     import org.gridforum.x2003.urWg.ProjectNameDocument.ProjectName;
8 :     import org.gridforum.x2003.urWg.SubmitHostDocument.SubmitHost;
9 :     import org.gridforum.x2003.urWg.UserIdentityDocument.UserIdentity;
10 :    
11 :     import eu.smartlm.schemas.x2009.x06.urec.FeatureType;
12 :     import eu.smartlm.schemas.x2009.x06.urec.ProductType;
13 :     import eu.smartlm.schemas.x2009.x06.urec.SmartLMUsageRecordType;
14 :    
15 :     /**
16 :     * This interface defines the different necessary methods to construct the query and retrive the
17 :     * data form the Interface to EBS/Portal
18 :     * @author David García Pérez - CESGA
19 :     *
20 :     */
21 :     public interface QueryConstructor {
22 :    
23 :     /**
24 :     * Set-ups the url of the connection to get the data
25 :     * @param url
26 :     * @param cCtx
27 :     */
28 :     public void setUpConnection(String url, String rampartRepo, String clientProperties);
29 :    
30 :     /**
31 :     * Retrieves a collection of users from the database
32 :     * @param startDate delimiters users that have usagerecords starting from this date (null if no filter is applied)
33 :     * @param endDate delimiters users that have usagerecords ending from this date (null if no filter is applied)
34 :     * @param filterByUsers List of <code>localUserId</code> to reduce the search space (null if no filter is applied)
35 :     * @param filterByProduct List of <code>productId</code> to reduce the search space (null if no filter is applied)
36 :     * @param filterByProject List of <code>ProjectName</code> to reduce the search space (null if no filter is applied)
37 :     * @param filterByHost List of hosts names to reduce the search space (null if no filter is applied)
38 :     * @param filterBySubmitHost List of submithost names to reduce the search space (null if no filter is applied)
39 :     * @param filterByFeature List of features names to reduce the search space (null if no filter is applied)
40 :     * @param filterByAccountingGroups List of accounting groups names to reduce the search space (null if no filter is applied)
41 :     * @return a list of users (empty if no user matching the search criteria is found).
42 :     */
43 :    
44 :     public Set<UserIdentity> getListOfUsers(
45 :     Date startDate,
46 :     Date endDate,
47 :     Set<String> filterByUsers,
48 :     Set<String> filterByProduct,
49 :     Set<String> filterByProject,
50 :     Set<String> filterByHost,
51 :     Set<String> filterBySubmitHost,
52 :     Set<String> filterByFeature,
53 :     Set<String> filterByAccountingGroups);
54 :    
55 :     /**
56 :     * Retrieves a collection of products from the database
57 :     * @param startDate delimiters users that have usagerecords starting from this date (null if no filter is applied)
58 :     * @param endDate delimiters users that have usagerecords ending from this date (null if no filter is applied)
59 :     * @param filterByUsers List of <code>localUserId</code> to reduce the search space (null if no filter is applied)
60 :     * @param filterByProduct List of <code>productId</code> to reduce the search space (null if no filter is applied)
61 :     * @param filterByProject List of <code>ProjectName</code> to reduce the search space (null if no filter is applied)
62 :     * @param filterByHost List of hosts names to reduce the search space (null if no filter is applied)
63 :     * @param filterBySubmitHost List of submithost names to reduce the search space (null if no filter is applied)
64 :     * @param filterByFeature List of features names to reduce the search space (null if no filter is applied)
65 :     * @param filterByAccountingGroups List of accounting groups names to reduce the search space (null if no filter is applied)
66 :     * @return a list of projects (empty if no user matching the search criteria is found).
67 :     */
68 :     public Set<ProductType> getListOfProducts(
69 :     Date startDate,
70 :     Date endDate,
71 :     Set<String> filterByUsers,
72 :     Set<String> filterByProduct,
73 :     Set<String> filterByProject,
74 :     Set<String> filterByHost,
75 :     Set<String> filterBySubmitHost,
76 :     Set<String> filterByFeature,
77 :     Set<String> filterByAccountingGroups);
78 :    
79 :     /**
80 :     * Retrieves a collection of projects from the database
81 :     * @param startDate delimiters users that have usagerecords starting from this date (null if no filter is applied)
82 :     * @param endDate delimiters users that have usagerecords ending from this date (null if no filter is applied)
83 :     * @param filterByUsers List of <code>localUserId</code> to reduce the search space (null if no filter is applied)
84 :     * @param filterByProduct List of <code>productId</code> to reduce the search space (null if no filter is applied)
85 :     * @param filterByProject List of <code>ProjectName</code> to reduce the search space (null if no filter is applied)
86 :     * @param filterByHost List of hosts names to reduce the search space (null if no filter is applied)
87 :     * @param filterBySubmitHost List of submithost names to reduce the search space (null if no filter is applied)
88 :     * @param filterByFeature List of features names to reduce the search space (null if no filter is applied)
89 :     * @param filterByAccountingGroups List of accounting groups names to reduce the search space (null if no filter is applied)
90 :     * @return a list of projects (empty if no user matching the search criteria is found).
91 :     */
92 :     public Set<ProjectName> getListOfProjects(
93 :     Date startDate,
94 :     Date endDate,
95 :     Set<String> filterByUsers,
96 :     Set<String> filterByProduct,
97 :     Set<String> filterByProject,
98 :     Set<String> filterByHost,
99 :     Set<String> filterBySubmitHost,
100 :     Set<String> filterByFeature,
101 :     Set<String> filterByAccountingGroups);
102 :    
103 :     /**
104 :     * Retrieves a collection of hosts from the database
105 :     * @param startDate delimiters users that have usagerecords starting from this date (null if no filter is applied)
106 :     * @param endDate delimiters users that have usagerecords ending from this date (null if no filter is applied)
107 :     * @param filterByUsers List of <code>localUserId</code> to reduce the search space (null if no filter is applied)
108 :     * @param filterByProduct List of <code>productId</code> to reduce the search space (null if no filter is applied)
109 :     * @param filterByProject List of <code>ProjectName</code> to reduce the search space (null if no filter is applied)
110 :     * @param filterByHost List of hosts names to reduce the search space (null if no filter is applied)
111 :     * @param filterBySubmitHost List of submithost names to reduce the search space (null if no filter is applied)
112 :     * @param filterByFeature List of features names to reduce the search space (null if no filter is applied)
113 :     * @param filterByAccountingGroups List of accounting groups names to reduce the search space (null if no filter is applied)
114 :     * @return a list of hosts (empty if no user matching the search criteria is found).
115 :     */
116 :     public Set<Host> getListOfHosts(
117 :     Date startDate,
118 :     Date endDate,
119 :     Set<String> filterByUsers,
120 :     Set<String> filterByProduct,
121 :     Set<String> filterByProject,
122 :     Set<String> filterByHost,
123 :     Set<String> filterBySubmitHost,
124 :     Set<String> filterByFeature,
125 :     Set<String> filterByAccountingGroups);
126 :    
127 :     /**
128 :     * Retrieves a collection of submithosts from the database
129 :     * @param startDate delimiters users that have usagerecords starting from this date (null if no filter is applied)
130 :     * @param endDate delimiters users that have usagerecords ending from this date (null if no filter is applied)
131 :     * @param filterByUsers List of <code>localUserId</code> to reduce the search space (null if no filter is applied)
132 :     * @param filterByProduct List of <code>productId</code> to reduce the search space (null if no filter is applied)
133 :     * @param filterByProject List of <code>ProjectName</code> to reduce the search space (null if no filter is applied)
134 :     * @param filterByHost List of hosts names to reduce the search space (null if no filter is applied)
135 :     * @param filterBySubmitHost List of submithost names to reduce the search space (null if no filter is applied)
136 :     * @param filterByFeature List of features names to reduce the search space (null if no filter is applied)
137 :     * @param filterByAccountingGroups List of accounting groups names to reduce the search space (null if no filter is applied)
138 :     * @return a list of submitHosts (empty if no user matching the search criteria is found).
139 :     */
140 :     public Set<SubmitHost> getListOfSubmitHosts(
141 :     Date startDate,
142 :     Date endDate,
143 :     Set<String> filterByUsers,
144 :     Set<String> filterByProduct,
145 :     Set<String> filterByProject,
146 :     Set<String> filterByHost,
147 :     Set<String> filterBySubmitHost,
148 :     Set<String> filterByFeature,
149 :     Set<String> filterByAccountingGroups);
150 :    
151 :     /**
152 :     * Retrieves a collection of features from the database
153 :     * @param startDate delimiters users that have usagerecords starting from this date (null if no filter is applied)
154 :     * @param endDate delimiters users that have usagerecords ending from this date (null if no filter is applied)
155 :     * @param filterByUsers List of <code>localUserId</code> to reduce the search space (null if no filter is applied)
156 :     * @param filterByProduct List of <code>productId</code> to reduce the search space (null if no filter is applied)
157 :     * @param filterByProject List of <code>ProjectName</code> to reduce the search space (null if no filter is applied)
158 :     * @param filterByHost List of hosts names to reduce the search space (null if no filter is applied)
159 :     * @param filterBySubmitHost List of submithost names to reduce the search space (null if no filter is applied)
160 :     * @param filterByFeature List of features names to reduce the search space (null if no filter is applied)
161 :     * @param filterByAccountingGroups List of accounting groups names to reduce the search space (null if no filter is applied)
162 :     * @return a list of features (empty if no user matching the search criteria is found).
163 :     */
164 :     public Set<FeatureType> getListOfSubmitFeatures(
165 :     Date startDate,
166 :     Date endDate,
167 :     Set<String> filterByUsers,
168 :     Set<String> filterByProduct,
169 :     Set<String> filterByProject,
170 :     Set<String> filterByHost,
171 :     Set<String> filterBySubmitHost,
172 :     Set<String> filterByFeature,
173 :     Set<String> filterByAccountingGroups);
174 :    
175 :     /**
176 :     * Retrieves a collection of AccountingGroups from the database
177 :     * @param startDate delimiters users that have usagerecords starting from this date (null if no filter is applied)
178 :     * @param endDate delimiters users that have usagerecords ending from this date (null if no filter is applied)
179 :     * @param filterByUsers List of <code>localUserId</code> to reduce the search space (null if no filter is applied)
180 :     * @param filterByProduct List of <code>productId</code> to reduce the search space (null if no filter is applied)
181 :     * @param filterByProject List of <code>ProjectName</code> to reduce the search space (null if no filter is applied)
182 :     * @param filterByHost List of hosts names to reduce the search space (null if no filter is applied)
183 :     * @param filterBySubmitHost List of submithost names to reduce the search space (null if no filter is applied)
184 :     * @param filterByFeature List of features names to reduce the search space (null if no filter is applied)
185 :     * @param filterByAccountingGroups List of accounting groups names to reduce the search space (null if no filter is applied)
186 :     * @return a list of accountinggroups (empty if no user matching the search criteria is found).
187 :     */
188 :     public Set<String> getListOfAccountingGroups(
189 :     Date startDate,
190 :     Date endDate,
191 :     Set<String> filterByUsers,
192 :     Set<String> filterByProduct,
193 :     Set<String> filterByProject,
194 :     Set<String> filterByHost,
195 :     Set<String> filterBySubmitHost,
196 :     Set<String> filterByFeature,
197 :     Set<String> filterByAccountingGroups);
198 :    
199 :    
200 :     // This is not exactly to construct the query, but it is the final query constructed by the other methods
201 :     /**
202 :     * Retrieves a collection of SmartlmUsageRecords from the database (keep in mind that it needs a complete object tree)
203 :     * @param startDate delimiters users that have usagerecords starting from this date (null if no filter is applied)
204 :     * @param endDate delimiters users that have usagerecords ending from this date (null if no filter is applied)
205 :     * @param filterByUsers List of <code>localUserId</code> to reduce the search space (null if no filter is applied)
206 :     * @param filterByProduct List of <code>productId</code> to reduce the search space (null if no filter is applied)
207 :     * @param filterByProject List of <code>ProjectName</code> to reduce the search space (null if no filter is applied)
208 :     * @param filterByHost List of hosts names to reduce the search space (null if no filter is applied)
209 :     * @param filterBySubmitHost List of submithost names to reduce the search space (null if no filter is applied)
210 :     * @param filterByFeature List of features names to reduce the search space (null if no filter is applied)
211 :     * @param filterByAccountingGroups List of accounting groups names to reduce the search space (null if no filter is applied)
212 :     * @return a list of SmartLMUsageRecords (empty if no user matching the search criteria is found).
213 :     */
214 :     public Set<SmartLMUsageRecordType> getListOfSmartLMUsageRecords(
215 :     Date startDate,
216 :     Date endDate,
217 :     Set<String> filterByUsers,
218 :     Set<String> filterByProduct,
219 :     Set<String> filterByProject,
220 :     Set<String> filterByHost,
221 :     Set<String> filterBySubmitHost,
222 :     Set<String> filterByFeature,
223 :     Set<String> filterByAccountingGroups);
224 :     }

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge