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 UserActionEvent.
22 */
23 @Entity
24 @DiscriminatorValue("UserActionEvent")
25 @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
26 public class UserActionEvent extends AbstractUserActionEvent {
27
28 /***
29 * The Enum Operation.
30 */
31 public enum Operation {
32
33 /*** The Start page. */
34 StartPage,
35
36 /*** The User history. */
37 UserHistory
38 }
39
40 /*** The Constant serialVersionUID. */
41 private static final long serialVersionUID = 1L;
42
43 /*** The operation. */
44 private Operation operation;
45
46 /***
47 * Instantiates a new user action event.
48 */
49 public UserActionEvent() {
50 }
51
52 /***
53 * Instantiates a new user action event.
54 *
55 * @param createdDate the created date
56 * @param userSession the user session
57 * @param operation the operation
58 */
59 public UserActionEvent(final Date createdDate,
60 final UserSession userSession, final Operation operation) {
61 super(createdDate, userSession);
62 this.operation = operation;
63 }
64
65 /***
66 * Gets the operation.
67 *
68 * @return the operation
69 */
70 @Enumerated(EnumType.STRING)
71 public Operation getOperation() {
72 return operation;
73 }
74
75 /***
76 * Sets the operation.
77 *
78 * @param operation the new operation
79 */
80 public void setOperation(final Operation operation) {
81 this.operation = operation;
82 }
83
84 }