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 edu.sampleu.travel.approval.dataobject;
17  
18  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
19  import javax.persistence.Column;
20  import javax.persistence.Entity;
21  import javax.persistence.GeneratedValue;
22  import javax.persistence.Id;
23  import javax.persistence.JoinColumn;
24  import javax.persistence.ManyToOne;
25  import javax.persistence.SequenceGenerator;
26  import javax.persistence.Table;
27  
28  import java.util.LinkedHashMap;
29  
30  /**
31   * @author Kuali Rice Team (rice.collab@kuali.org)
32   */
33  @Entity
34  @Table(name="TRVL_PER_DIEM_T")
35  public class PrimaryDestination extends PersistableBusinessObjectBase {
36  
37      @Id
38      @GeneratedValue(generator="TEM_PER_DIEM_ID_SEQ")
39      @SequenceGenerator(name="TEM_PER_DIEM_ID_SEQ",sequenceName="TEM_PER_DIEM_ID_SEQ", allocationSize=5)
40      @Column(name="id",nullable=false)
41      private Integer id;
42  
43      @ManyToOne
44      @JoinColumn(name="trip_typ_cd")
45      private TripType tripType;
46  
47      @Column(name="trip_typ_cd",length=3,nullable=false)
48      private String tripTypeCode;
49  
50      @Column(name="COUNTRY",length=100, nullable=false)
51      private String countryState;
52  
53      @Column(name="COUNTRY_NM",length=100, nullable=false)
54      private String countryStateName;
55  
56      @Column(name="COUNTY_CD",length=100, nullable=false)
57      private String county;
58  
59      @Column(name="PRI_DEST",length=100, nullable=false)
60      private String primaryDestinationName;
61  
62      @Column(name="ACTV_IND",nullable=false,length=1)
63      private Boolean active = Boolean.TRUE;
64  
65      public Integer getId() {
66          return id;
67      }
68  
69      public void setId(Integer id) {
70          this.id = id;
71      }
72  
73      public TripType getTripType() {
74          return tripType;
75      }
76  
77      public void setTripType(TripType tripType) {
78          this.tripType = tripType;
79      }
80  
81      public String getTripTypeCode() {
82          return tripTypeCode;
83      }
84  
85      public void setTripTypeCode(String tripTypeCode) {
86          this.tripTypeCode = tripTypeCode;
87      }
88  
89      public String getCountryState() {
90          return countryState;
91      }
92  
93      public void setCountryState(String countryState) {
94          this.countryState = countryState;
95      }
96  
97      public String getCountryStateName() {
98          return countryStateName;
99      }
100 
101     public void setCountryStateName(String countryStateName) {
102         this.countryStateName = countryStateName;
103     }
104 
105     public String getCounty() {
106         return county;
107     }
108 
109     public void setCounty(String county) {
110         this.county = county;
111     }
112 
113     public String getPrimaryDestinationName() {
114         return primaryDestinationName;
115     }
116 
117     public void setPrimaryDestinationName(String primaryDestinationName) {
118         this.primaryDestinationName = primaryDestinationName;
119     }
120 
121     public boolean isActive() {
122         return active;
123     }
124 
125     public void setActive(boolean active) {
126         this.active = active;
127     }
128 
129     protected LinkedHashMap toStringMapper() {
130         LinkedHashMap map = new LinkedHashMap();
131         map.put("tripType", this.tripTypeCode);
132         map.put("countryState", this.countryState);
133         map.put("county", this.county);
134         map.put("primaryDestinationName", this.primaryDestinationName);
135 
136         return map;
137     }
138 }