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.DiscriminatorValue;
11 import javax.persistence.Entity;
12 import javax.persistence.EnumType;
13 import javax.persistence.Enumerated;
14
15 import org.hibernate.annotations.Cache;
16 import org.hibernate.annotations.CacheConcurrencyStrategy;
17
18 import com.hack23.cia.model.application.impl.common.UserSession;
19
20 /***
21 * The Class UserAccountActionEvent.
22 */
23 @Entity
24 @DiscriminatorValue("UserAccountActionEvent")
25 @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
26 public class UserAccountActionEvent extends AbstractUserAccountActionEvent {
27
28 /***
29 * The Enum Operation.
30 */
31 public enum Operation {
32
33 /*** The Login. */
34 Login,
35
36 /*** The Logout. */
37 Logout,
38
39 /*** The Process_login. */
40 Process_login,
41
42 /*** The Register. */
43 Register;
44 }
45
46 /*** The Constant serialVersionUID. */
47 private static final long serialVersionUID = 1L;
48
49 /*** The operation. */
50 private Operation operation;
51
52 /***
53 * Instantiates a new user account action event.
54 */
55 public UserAccountActionEvent() {
56 super();
57 }
58
59 /***
60 * Instantiates a new user account action event.
61 *
62 * @param createdDate the created date
63 * @param userSession the user session
64 * @param operation the operation
65 */
66 public UserAccountActionEvent(final Date createdDate,
67 final UserSession userSession, final Operation operation) {
68 super(createdDate, userSession);
69 this.operation = operation;
70 }
71
72 /***
73 * Gets the operation.
74 *
75 * @return the operation
76 */
77 @Enumerated(EnumType.STRING)
78 public Operation getOperation() {
79 return operation;
80 }
81
82 /***
83 * Sets the operation.
84 *
85 * @param operation the new operation
86 */
87 public void setOperation(final Operation operation) {
88 this.operation = operation;
89 }
90
91 }