001 /** 002 * Copyright 2005-2012 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package edu.sampleu.travel.approval.dataobject; 017 018 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase; 019 import javax.persistence.Column; 020 import javax.persistence.Entity; 021 import javax.persistence.GeneratedValue; 022 import javax.persistence.Id; 023 import javax.persistence.JoinColumn; 024 import javax.persistence.ManyToOne; 025 import javax.persistence.SequenceGenerator; 026 import javax.persistence.Table; 027 028 import java.util.LinkedHashMap; 029 030 /** 031 * @author Kuali Rice Team (rice.collab@kuali.org) 032 */ 033 @Entity 034 @Table(name="TRVL_PER_DIEM_T") 035 public class PrimaryDestination extends PersistableBusinessObjectBase { 036 037 @Id 038 @GeneratedValue(generator="TEM_PER_DIEM_ID_SEQ") 039 @SequenceGenerator(name="TEM_PER_DIEM_ID_SEQ",sequenceName="TEM_PER_DIEM_ID_SEQ", allocationSize=5) 040 @Column(name="id",nullable=false) 041 private Integer id; 042 043 @ManyToOne 044 @JoinColumn(name="trip_typ_cd") 045 private TripType tripType; 046 047 @Column(name="trip_typ_cd",length=3,nullable=false) 048 private String tripTypeCode; 049 050 @Column(name="COUNTRY",length=100, nullable=false) 051 private String countryState; 052 053 @Column(name="COUNTRY_NM",length=100, nullable=false) 054 private String countryStateName; 055 056 @Column(name="COUNTY_CD",length=100, nullable=false) 057 private String county; 058 059 @Column(name="PRI_DEST",length=100, nullable=false) 060 private String primaryDestinationName; 061 062 @Column(name="ACTV_IND",nullable=false,length=1) 063 private Boolean active = Boolean.TRUE; 064 065 public Integer getId() { 066 return id; 067 } 068 069 public void setId(Integer id) { 070 this.id = id; 071 } 072 073 public TripType getTripType() { 074 return tripType; 075 } 076 077 public void setTripType(TripType tripType) { 078 this.tripType = tripType; 079 } 080 081 public String getTripTypeCode() { 082 return tripTypeCode; 083 } 084 085 public void setTripTypeCode(String tripTypeCode) { 086 this.tripTypeCode = tripTypeCode; 087 } 088 089 public String getCountryState() { 090 return countryState; 091 } 092 093 public void setCountryState(String countryState) { 094 this.countryState = countryState; 095 } 096 097 public String getCountryStateName() { 098 return countryStateName; 099 } 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 }