View Javadoc

1   /**
2    * Copyright 2005-2012 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.ken.bo;
17  
18  import org.hibernate.annotations.GenericGenerator;
19  import org.hibernate.annotations.Parameter;
20  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
21  
22  import javax.persistence.*;
23  
24  /**
25   * This class represents a priority for a notification - i.e. "High", "Medium", "Low", "Emergency", etc.
26   * In addition, it describes information about a priority such as its ranking order of priority.  Priority 
27   * order within the system is assumed to be ascending.  This by no means impacts the order of delivery 
28   * of a notification system message.
29   * @author Kuali Rice Team (rice.collab@kuali.org)
30   */
31  @Entity
32  @Table(name="KREN_PRIO_T")
33  public class NotificationPriority extends PersistableBusinessObjectBase{
34      @Id
35      @GeneratedValue(generator="KREN_PRIO_S")
36  	@GenericGenerator(name="KREN_PRIO_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={
37  			@Parameter(name="sequence_name",value="KREN_PRIO_S"),
38  			@Parameter(name="value_column",value="id")
39  	})
40  	@Column(name="PRIO_ID")
41  	private Long id;
42      @Column(name="NM", nullable=false)
43  	private String name;
44      @Column(name="DESC_TXT", nullable=false)
45  	private String description;
46      @Column(name="PRIO_ORD", nullable=false)
47  	private Integer order;
48      
49      /**
50       * Constructs a NotificationPriority instance.
51       */
52      public NotificationPriority() {
53      }
54  
55      /**
56       * Gets the description attribute. 
57       * @return Returns the description.
58       */
59      public String getDescription() {
60  	return description;
61      }
62  
63      /**
64       * Sets the description attribute value.
65       * @param description The description to set.
66       */
67      public void setDescription(String description) {
68  	this.description = description;
69      }
70  
71      /**
72       * Gets the id attribute. 
73       * @return Returns the id.
74       */
75      public Long getId() {
76  	return id;
77      }
78  
79      /**
80       * Sets the id attribute value.
81       * @param id The id to set.
82       */
83      public void setId(Long id) {
84  	this.id = id;
85      }
86  
87      /**
88       * Gets the name attribute. 
89       * @return Returns the name.
90       */
91      public String getName() {
92  	return name;
93      }
94  
95      /**
96       * Sets the name attribute value.
97       * @param name The name to set.
98       */
99      public void setName(String name) {
100 	this.name = name;
101     }
102 
103     /**
104      * Gets the order attribute. 
105      * @return Returns the order.
106      */
107     public Integer getOrder() {
108 	return order;
109     }
110 
111     /**
112      * Sets the order attribute value.
113      * @param order The order to set.
114      */
115     public void setOrder(Integer order) {
116 	this.order = order;
117     }
118 }
119