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   package org.directdemocracyportal.democracy.model.application;
6   
7   import javax.persistence.Entity;
8   import javax.persistence.JoinColumn;
9   import javax.persistence.ManyToOne;
10  
11  import org.directdemocracyportal.democracy.model.world.Government;
12  import org.hibernate.annotations.Cache;
13  import org.hibernate.annotations.CacheConcurrencyStrategy;
14  
15  /***
16   * The Class GovernmentPortal.
17   */
18  @Entity
19  @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
20  public class GovernmentPortal extends Portal
21  {
22  
23      /*** The government. */
24      private Government government;
25  
26      /*** The Constant serialVersionUID. */
27      private static final long serialVersionUID = 6912410871296718010L;
28  
29      /***
30       * Instantiates a new government portal.
31       */
32      public GovernmentPortal() {
33      }
34  
35      /***
36       * Gets the government.
37       *
38       * @return the government
39       */
40      @ManyToOne
41      @JoinColumn
42      public Government getGovernment() {
43          return government;
44      }
45  
46      /***
47       * Sets the government.
48       *
49       * @param government the new government
50       */
51      public void setGovernment(Government government) {
52          this.government = government;
53      }
54  }