1
2
3
4
5
6 package com.hack23.cia.model.application.impl.user;
7
8 import java.util.Date;
9
10 import javax.persistence.Entity;
11 import javax.persistence.EnumType;
12 import javax.persistence.Enumerated;
13
14 import com.hack23.cia.model.application.impl.common.UserSession;
15
16 /***
17 * The Class AbstractTopListActionEvent.
18 */
19 @Entity
20 public abstract class AbstractTopListActionEvent extends
21 AbstractParliamentActionEvent {
22
23 /***
24 * The Enum Operation.
25 */
26 public enum Operation {
27
28 /*** The Top absent. */
29 TopAbsent,
30
31 /*** The Top losers. */
32 TopLosers,
33
34 /*** The Top loyals. */
35 TopLoyals,
36
37 /*** The Top present. */
38 TopPresent,
39
40 /*** The Top rebels. */
41 TopRebels,
42
43 /*** The Top winners. */
44 TopWinners;
45 }
46
47 /*** The Constant serialVersionUID. */
48 private static final long serialVersionUID = 1L;
49
50 /*** The operation. */
51 private Operation operation;
52
53 /***
54 * Instantiates a new abstract top list action event.
55 */
56 public AbstractTopListActionEvent() {
57 super();
58 }
59
60 /***
61 * Instantiates a new abstract top list action event.
62 *
63 * @param createdDate the created date
64 * @param userSession the user session
65 * @param operation the operation
66 */
67 public AbstractTopListActionEvent(final Date createdDate,
68 final UserSession userSession, final Operation operation) {
69 super(createdDate, userSession);
70 this.operation = operation;
71 }
72
73 /***
74 * Gets the operation.
75 *
76 * @return the operation
77 */
78 @Enumerated(EnumType.STRING)
79 public Operation getOperation() {
80 return operation;
81 }
82
83 /***
84 * Sets the operation.
85 *
86 * @param operation the new operation
87 */
88 public void setOperation(final Operation operation) {
89 this.operation = operation;
90 }
91
92 }