View Javadoc

1   /*
2   Copyright 2010 James Pether Sörling Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 
3   	$Id
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 LanguageContentActionEvent.
22   */
23  @Entity
24  @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
25  @DiscriminatorValue("LanguageContentActionEvent")
26  public class LanguageContentActionEvent extends AbstractAgencyActionEvent {
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 language content id. */
45      private Long languageContentId;
46  
47      /*** The operation. */
48      private Operation operation;
49  
50      /***
51       * Instantiates a new language content action event.
52       */
53      public LanguageContentActionEvent() {
54      }
55  
56      /***
57       * Instantiates a new language content action event.
58       *
59       * @param createdDate the created date
60       * @param userSession the user session
61       * @param agencyId the agency id
62       * @param languageContentId the language content id
63       * @param operation the operation
64       */
65      public LanguageContentActionEvent(final Date createdDate,
66              final UserSession userSession, final Long agencyId,
67              final Long languageContentId, final Operation operation) {
68          super(createdDate, userSession, agencyId);
69          this.languageContentId = languageContentId;
70          this.operation = operation;
71      }
72  
73      /***
74       * Gets the language content id.
75       *
76       * @return the language content id
77       */
78      public Long getLanguageContentId() {
79          return languageContentId;
80      }
81  
82      /***
83       * Gets the operation.
84       *
85       * @return the operation
86       */
87      @Enumerated(EnumType.STRING)
88      public Operation getOperation() {
89          return operation;
90      }
91  
92      /***
93       * Sets the language content id.
94       *
95       * @param languageContentId the new language content id
96       */
97      public void setLanguageContentId(final Long languageContentId) {
98          this.languageContentId = languageContentId;
99      }
100 
101     /***
102      * Sets the operation.
103      *
104      * @param operation the new operation
105      */
106     public void setOperation(final Operation operation) {
107         this.operation = operation;
108     }
109 
110 }