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.common;
7   
8   import javax.persistence.DiscriminatorValue;
9   import javax.persistence.Entity;
10  
11  import org.hibernate.annotations.Cache;
12  import org.hibernate.annotations.CacheConcurrencyStrategy;
13  
14  import com.hack23.cia.model.core.impl.AbstractResource;
15  
16  /***
17   * The Class AbstractAgencyConfiguration.
18   */
19  @Entity
20  @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
21  @DiscriminatorValue("AbstractAgencyConfiguration")
22  public abstract class AbstractAgencyConfiguration extends AbstractResource {
23  
24      /*** The Constant serialVersionUID. */
25      private static final long serialVersionUID = 1L;
26      
27      /*** The active by default. */
28      private boolean activeByDefault;
29  
30      /*** The name. */
31      private String name;
32      
33      /*** The usage order. */
34      private int usageOrder;
35  
36      /***
37       * Instantiates a new abstract agency configuration.
38       */
39      public AbstractAgencyConfiguration() {
40          super();
41          setResourceType(ResourceType.Configuration);
42      }
43  
44  
45      /***
46       * Gets the active by default.
47       *
48       * @return the active by default
49       */
50  	public boolean getActiveByDefault() {
51  		return activeByDefault;
52  	}
53  
54  
55      /***
56       * Gets the name.
57       *
58       * @return the name
59       */
60      public String getName() {
61          return name;
62      }
63          
64  	/***
65  	 * Gets the usage order.
66  	 *
67  	 * @return the usage order
68  	 */
69  	public int getUsageOrder() {
70  		return usageOrder;
71  	}
72  
73  	/***
74  	 * Sets the active by default.
75  	 *
76  	 * @param activeByDefault the new active by default
77  	 */
78  	public void setActiveByDefault(final boolean activeByDefault) {
79  		this.activeByDefault = activeByDefault;
80  	}
81  
82  	/***
83  	 * Sets the name.
84  	 *
85  	 * @param name the new name
86  	 */
87      public void setName(final String name) {
88          this.name = name;
89      }
90  
91  	/***
92  	 * Sets the usage order.
93  	 *
94  	 * @param usageOrder the new usage order
95  	 */
96  	public void setUsageOrder(final int usageOrder) {
97  		this.usageOrder = usageOrder;
98  	}
99  }