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.bo;
17  
18  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
19  
20  import javax.persistence.Column;
21  import javax.persistence.Entity;
22  import javax.persistence.Id;
23  import javax.persistence.Table;
24  
25  @Entity
26  @Table(name="TRV_ACCT_TYPE")
27  public class TravelAccountType extends PersistableBusinessObjectBase {
28      private static final long serialVersionUID = 413236253897119667L;
29      
30  	@Id
31  	@Column(name="acct_type")
32  	private String accountTypeCode;
33      @Column(name="acct_type_name")
34  	private String name;
35      
36  
37      public String getAccountTypeCode() {
38  		return accountTypeCode;
39  	}
40  
41  
42  	public void setAccountTypeCode(String accountTypeCode) {
43  		this.accountTypeCode = accountTypeCode;
44  	}
45  
46  
47  	public String getName() {
48  		return name;
49  	}
50  
51  
52  	public void setName(String name) {
53  		this.name = name;
54  	}
55  
56  	public String getCodeAndDescription() {
57          if (accountTypeCode != null) {
58              return accountTypeCode + " - " + name;
59          }
60  
61          return "";
62  	}
63  }