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.user;
7   
8   import java.util.Date;
9   
10  import javax.persistence.Entity;
11  import javax.persistence.EnumType;
12  import javax.persistence.Enumerated;
13  
14  import com.hack23.cia.model.application.impl.common.UserSession;
15  
16  /***
17   * The Class AbstractTopListActionEvent.
18   */
19  @Entity
20  public abstract class AbstractTopListActionEvent extends
21          AbstractParliamentActionEvent {
22  
23      /***
24       * The Enum Operation.
25       */
26      public enum Operation {
27  
28          /*** The Top absent. */
29          TopAbsent,
30  
31          /*** The Top losers. */
32          TopLosers,
33  
34          /*** The Top loyals. */
35          TopLoyals,
36  
37          /*** The Top present. */
38          TopPresent,
39  
40          /*** The Top rebels. */
41          TopRebels,
42  
43          /*** The Top winners. */
44          TopWinners;
45      }
46  
47      /*** The Constant serialVersionUID. */
48      private static final long serialVersionUID = 1L;
49  
50      /*** The operation. */
51      private Operation operation;
52  
53      /***
54       * Instantiates a new abstract top list action event.
55       */
56      public AbstractTopListActionEvent() {
57          super();
58      }
59  
60      /***
61       * Instantiates a new abstract top list action event.
62       *
63       * @param createdDate the created date
64       * @param userSession the user session
65       * @param operation the operation
66       */
67      public AbstractTopListActionEvent(final Date createdDate,
68              final UserSession userSession, final Operation operation) {
69          super(createdDate, userSession);
70          this.operation = operation;
71      }
72  
73      /***
74       * Gets the operation.
75       *
76       * @return the operation
77       */
78      @Enumerated(EnumType.STRING)
79      public Operation getOperation() {
80          return operation;
81      }
82  
83      /***
84       * Sets the operation.
85       *
86       * @param operation the new operation
87       */
88      public void setOperation(final Operation operation) {
89          this.operation = operation;
90      }
91  
92  }