View Javadoc

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