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 LanguageAgencyActionEvent.
22 */
23 @Entity
24 @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
25 @DiscriminatorValue("LanguageAgencyActionEvent")
26 public class LanguageAgencyActionEvent extends AbstractAgencyActionEvent {
27
28 /***
29 * The Enum Operation.
30 */
31 public enum Operation {
32
33 /*** The Add language content. */
34 AddLanguageContent,
35
36 /*** The Delete. */
37 Delete,
38
39 /*** The Update. */
40 Update
41
42 }
43
44 /*** The Constant serialVersionUID. */
45 private static final long serialVersionUID = 1L;
46
47 /*** The language id. */
48 private Long languageId;
49
50 /*** The operation. */
51 private Operation operation;
52
53 /***
54 * Instantiates a new language agency action event.
55 */
56 public LanguageAgencyActionEvent() {
57 }
58
59 /***
60 * Instantiates a new language agency action event.
61 *
62 * @param createdDate the created date
63 * @param userSession the user session
64 * @param agencyId the agency id
65 * @param languageId the language id
66 * @param operation the operation
67 */
68 public LanguageAgencyActionEvent(final Date createdDate,
69 final UserSession userSession, final Long agencyId,
70 final Long languageId, final Operation operation) {
71 super(createdDate, userSession, agencyId);
72 this.languageId = languageId;
73 this.operation = operation;
74 }
75
76 /***
77 * Gets the language id.
78 *
79 * @return the language id
80 */
81 public Long getLanguageId() {
82 return languageId;
83 }
84
85 /***
86 * Gets the operation.
87 *
88 * @return the operation
89 */
90 @Enumerated(EnumType.STRING)
91 public Operation getOperation() {
92 return operation;
93 }
94
95 /***
96 * Sets the language id.
97 *
98 * @param languageId the new language id
99 */
100 public void setLanguageId(final Long languageId) {
101 this.languageId = languageId;
102 }
103
104 /***
105 * Sets the operation.
106 *
107 * @param operation the new operation
108 */
109 public void setOperation(final Operation operation) {
110 this.operation = operation;
111 }
112
113 }