1
2
3
4
5
6 package com.hack23.cia.service.impl.common;
7
8 import java.util.List;
9
10 import com.hack23.cia.model.application.impl.common.ImageContent;
11 import com.hack23.cia.model.application.impl.common.Language;
12 import com.hack23.cia.model.application.impl.common.ParliamentChart;
13 import com.hack23.cia.model.sweden.impl.Ballot;
14 import com.hack23.cia.model.sweden.impl.CommitteeReport;
15 import com.hack23.cia.model.sweden.impl.ParliamentMember;
16 import com.hack23.cia.model.sweden.impl.ParliamentMemberVoteCompareResult;
17 import com.hack23.cia.model.sweden.impl.PoliticalParty;
18 import com.hack23.cia.model.sweden.impl.RegisterInformation;
19 import com.hack23.cia.model.sweden.impl.Vote;
20
21 /***
22 * The Interface ParliamentService.
23 */
24 public interface ParliamentService {
25
26 /***
27 * Find last votes.
28 *
29 * @param id the id
30 * @return the list
31 */
32 List<Vote> findLastVotes(Long id);
33
34 /***
35 * Find last votes by ballot id.
36 *
37 * @param id the id
38 * @return the list
39 */
40 List<Vote> findLastVotesByBallotId(final Long id);
41
42 /***
43 * Find parliament members by name.
44 *
45 * @param searchString the search string
46 * @return the list
47 */
48 List<ParliamentMember> findParliamentMembersByName(String searchString);
49
50 /***
51 * Find political party by short code.
52 *
53 * @param party the party
54 * @return the political party
55 */
56 PoliticalParty findPoliticalPartyByShortCode(String party);
57
58 /***
59 * Find votes.
60 *
61 * @param id the id
62 * @return the list
63 */
64 List<Vote> findVotes(Long id);
65
66 /***
67 * Gets the all commitee reports.
68 *
69 * @return the all commitee reports
70 */
71 List<CommitteeReport> getAllCommiteeReports();
72
73 /***
74 * Gets the current list.
75 *
76 * @return the current list
77 */
78 List<ParliamentMember> getCurrentList();
79
80 /***
81 * Gets the current top list absent.
82 *
83 * @param number the number
84 * @return the current top list absent
85 */
86 List<ParliamentMember> getCurrentTopListAbsent(int number);
87
88 /***
89 * Gets the current top list absent in party.
90 *
91 * @param i the i
92 * @param party the party
93 * @return the current top list absent in party
94 */
95 List<ParliamentMember> getCurrentTopListAbsentInParty(int i, String party);
96
97 /***
98 * Gets the current top list losers.
99 *
100 * @param i the i
101 * @return the current top list losers
102 */
103 List<ParliamentMember> getCurrentTopListLosers(int i);
104
105 /***
106 * Gets the current top list losers in party.
107 *
108 * @param i the i
109 * @param party the party
110 * @return the current top list losers in party
111 */
112 List<ParliamentMember> getCurrentTopListLosersInParty(int i, String party);
113
114 /***
115 * Gets the current top list loyal.
116 *
117 * @param i the i
118 * @return the current top list loyal
119 */
120 List<ParliamentMember> getCurrentTopListLoyal(int i);
121
122 /***
123 * Gets the current top list loyal in party.
124 *
125 * @param i the i
126 * @param party the party
127 * @return the current top list loyal in party
128 */
129 List<ParliamentMember> getCurrentTopListLoyalInParty(int i, String party);
130
131 /***
132 * Gets the current top list present.
133 *
134 * @param i the i
135 * @return the current top list present
136 */
137 List<ParliamentMember> getCurrentTopListPresent(int i);
138
139 /***
140 * Gets the current top list present in party.
141 *
142 * @param i the i
143 * @param party the party
144 * @return the current top list present in party
145 */
146 List<ParliamentMember> getCurrentTopListPresentInParty(int i, String party);
147
148 /***
149 * Gets the current top list rebels.
150 *
151 * @param i the i
152 * @return the current top list rebels
153 */
154 List<ParliamentMember> getCurrentTopListRebels(int i);
155
156 /***
157 * Gets the current top list rebels in party.
158 *
159 * @param i the i
160 * @param party the party
161 * @return the current top list rebels in party
162 */
163 List<ParliamentMember> getCurrentTopListRebelsInParty(int i, String party);
164
165 /***
166 * Gets the current top list winners.
167 *
168 * @param i the i
169 * @return the current top list winners
170 */
171 List<ParliamentMember> getCurrentTopListWinners(int i);
172
173 /***
174 * Gets the current top list winners in party.
175 *
176 * @param i the i
177 * @param party the party
178 * @return the current top list winners in party
179 */
180 List<ParliamentMember> getCurrentTopListWinnersInParty(int i, String party);
181
182 /***
183 * Gets the graph.
184 *
185 * @param summary the summary
186 * @param ballot the ballot
187 * @param language the language
188 * @return the graph
189 */
190 ImageContent getGraph(ParliamentChart summary, Ballot ballot,
191 Language language);
192
193 /***
194 * Gets the graph.
195 *
196 * @param summary the summary
197 * @param committeeReport the committee report
198 * @param language the language
199 * @return the graph
200 */
201 ImageContent getGraph(ParliamentChart summary, CommitteeReport committeeReport,
202 Language language);
203
204 /***
205 * Gets the graph.
206 *
207 * @param chart the chart
208 * @param language the language
209 * @return the graph
210 */
211 ImageContent getGraph(ParliamentChart chart,Language language);
212
213 /***
214 * Gets the graph.
215 *
216 * @param chart the chart
217 * @param parliamentMember the parliament member
218 * @param language the language
219 * @return the graph
220 */
221 ImageContent getGraph(ParliamentChart chart,ParliamentMember parliamentMember,Language language);
222
223 /***
224 * Gets the graph.
225 *
226 * @param summary the summary
227 * @param politicalParty the political party
228 * @param language the language
229 * @return the graph
230 */
231 ImageContent getGraph(ParliamentChart summary, PoliticalParty politicalParty,
232 Language language);
233
234 /***
235 * Gets the last decided commitee reports.
236 *
237 * @return the last decided commitee reports
238 */
239 List<CommitteeReport> getLastDecidedCommiteeReports();
240
241 /***
242 * Gets the parliament member.
243 *
244 * @param parliamentMemberId the parliament member id
245 * @return the parliament member
246 */
247 ParliamentMember getParliamentMember(Long parliamentMemberId);
248
249 /***
250 * Gets the parliament member enemies.
251 *
252 * @param parliamentMember the parliament member
253 * @return the parliament member enemies
254 */
255 List<ParliamentMemberVoteCompareResult> getParliamentMemberEnemies(
256 ParliamentMember parliamentMember);
257
258 /***
259 * Gets the parliament member friends.
260 *
261 * @param parliamentMember the parliament member
262 * @return the parliament member friends
263 */
264 List<ParliamentMemberVoteCompareResult> getParliamentMemberFriends(
265 ParliamentMember parliamentMember);
266
267
268 /***
269 * Gets the parliament member party enemies.
270 *
271 * @param parliamentMember the parliament member
272 * @return the parliament member party enemies
273 */
274 List<ParliamentMemberVoteCompareResult> getParliamentMemberPartyEnemies(
275 ParliamentMember parliamentMember);
276
277 /***
278 * Gets the parliament member party friends.
279 *
280 * @param parliamentMember the parliament member
281 * @return the parliament member party friends
282 */
283 List<ParliamentMemberVoteCompareResult> getParliamentMemberPartyFriends(
284 ParliamentMember parliamentMember);
285
286 /***
287 * Gets the political parties.
288 *
289 * @return the political parties
290 */
291 List<PoliticalParty> getPoliticalParties();
292
293 /***
294 * Load ballot by id.
295 *
296 * @param ballotId the ballot id
297 * @return the ballot
298 */
299 Ballot loadBallotById(Long ballotId);
300
301 /***
302 * Load committee report by id.
303 *
304 * @param committeeReportId the committee report id
305 * @return the committee report
306 */
307 CommitteeReport loadCommitteeReportById(Long committeeReportId);
308
309 /***
310 * Lookup register information.
311 *
312 * @param parliamentMember the parliament member
313 * @return the register information
314 */
315 RegisterInformation lookupRegisterInformation(
316 ParliamentMember parliamentMember);
317 }