1
2
3
4
5
6 package com.hack23.cia.model.application.impl.admin;
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 PortalActionEvent.
22 */
23 @Entity
24 @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
25 @DiscriminatorValue("PortalActionEvent")
26 public class PortalActionEvent extends AbstractConfigurationActionEvent {
27
28 /***
29 * The Enum Operation.
30 */
31 public enum Operation {
32
33 /*** The Delete. */
34 Delete,
35
36 /*** The Update. */
37 Update
38
39 }
40
41 /*** The Constant serialVersionUID. */
42 private static final long serialVersionUID = 1L;
43
44 /*** The operation. */
45 private Operation operation;
46
47 /*** The portal id. */
48 private Long portalId;
49
50 /***
51 * Instantiates a new portal action event.
52 */
53 public PortalActionEvent() {
54 }
55
56 /***
57 * Instantiates a new portal action event.
58 *
59 * @param createdDate the created date
60 * @param userSession the user session
61 * @param operation the operation
62 * @param portalId the portal id
63 */
64 public PortalActionEvent(final Date createdDate,
65 final UserSession userSession, final Operation operation,
66 final Long portalId) {
67 super(createdDate, userSession);
68 this.operation = operation;
69 this.portalId = portalId;
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 * Gets the portal id.
84 *
85 * @return the portal id
86 */
87 public Long getPortalId() {
88 return portalId;
89 }
90
91 /***
92 * Sets the operation.
93 *
94 * @param operation the new operation
95 */
96 public void setOperation(final Operation operation) {
97 this.operation = operation;
98 }
99
100 /***
101 * Sets the portal id.
102 *
103 * @param portalId the new portal id
104 */
105 public void setPortalId(final Long portalId) {
106 this.portalId = portalId;
107 }
108 }