View Javadoc
1   /*
2    * Copyright 2007 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   * Created on Jul 9, 2004
18   *
19   */
20  package org.kuali.ole.pdp.businessobject;
21  
22  import java.util.LinkedHashMap;
23  import javax.persistence.CascadeType;
24  import javax.persistence.Column;
25  import javax.persistence.Entity;
26  import javax.persistence.FetchType;
27  import javax.persistence.GeneratedValue;
28  import javax.persistence.Id;
29  import javax.persistence.JoinColumn;
30  import javax.persistence.ManyToOne;
31  import javax.persistence.Table;
32  import org.kuali.ole.pdp.businessobject.PaymentDetail;
33  import org.kuali.ole.sys.OLEPropertyConstants;
34  import org.kuali.ole.sys.businessobject.TimestampedBusinessObjectBase;
35  import org.kuali.rice.core.api.util.type.KualiInteger;
36  import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
37  
38  @Entity
39  @Table(name = "PDP_PMT_NTE_TXT_T")
40  public class PaymentNoteText extends TimestampedBusinessObjectBase {
41  
42      @PortableSequenceGenerator(name = "PDP_PMT_NTE_ID_SEQ")
43      @GeneratedValue(generator = "PDP_PMT_NTE_ID_SEQ")
44      @Id
45      @Column(name = "PMT_NTE_ID")
46      private KualiInteger id;
47  
48      // PMT_NTE_ID
49      @Column(name = "PMT_DTL_ID")
50      private Integer paymentDetailId;
51  
52      @ManyToOne(targetEntity = PaymentDetail.class, fetch = FetchType.LAZY, cascade = { CascadeType.REFRESH })
53      @JoinColumn(name = "PMT_DTL_ID", referencedColumnName = "PMT_DTL_ID", insertable = false, updatable = false)
54      private PaymentDetail paymentDetail;
55  
56      // PMT_DTL_ID
57      @Column(name = "CUST_NTE_LN_NBR")
58      private KualiInteger customerNoteLineNbr;
59  
60      // CUST_NTE_LN_NBR
61      @Column(name = "CUST_NTE_TXT")
62      private String customerNoteText;
63  
64      // CUST_NTE_TXT
65      public PaymentNoteText() {
66          super();
67      }
68  
69      /**
70       * @hibernate.id column="PMT_NTE_ID" generator-class="sequence"
71       * @hibernate.generator-param name="sequence" value="PDP.PDP_PMT_NTE_ID_SEQ"
72       * @return Returns the paymentNoteId.
73       */
74      public KualiInteger getId() {
75          return id;
76      }
77  
78      /**
79       * @param paymentNoteId The paymentNoteId to set.
80       */
81      public void setId(KualiInteger paymentNoteId) {
82          this.id = paymentNoteId;
83      }
84  
85      /**
86       * @return
87       * @hibernate.property column="CUST_NTE_LN_NBR" not-null="true"
88       */
89      public KualiInteger getCustomerNoteLineNbr() {
90          return customerNoteLineNbr;
91      }
92  
93      /**
94       * @return
95       * @hibernate.property column="CUST_NTE_TXT" length="60" not-null="true"
96       */
97      public String getCustomerNoteText() {
98          return customerNoteText;
99      }
100 
101     /**
102      * @return
103      * @hibernate.many-to-one column="PMT_DTL_ID" class="edu.iu.uis.pdp.bo.PaymentDetail"
104      */
105     public PaymentDetail getPaymentDetail() {
106         return paymentDetail;
107     }
108 
109     /**
110      * @param integer
111      */
112     public void setCustomerNoteLineNbr(KualiInteger integer) {
113         customerNoteLineNbr = integer;
114     }
115 
116     /**
117      * @param string
118      */
119     public void setCustomerNoteText(String string) {
120         customerNoteText = string;
121     }
122 
123     /**
124      * @param integer
125      */
126     public void setPaymentDetail(PaymentDetail pd) {
127         paymentDetail = pd;
128     }
129 
130     public Integer getPaymentDetailId() {
131         return paymentDetailId;
132     }
133 
134     public void setPaymentDetailId(Integer paymentDetailId) {
135         this.paymentDetailId = paymentDetailId;
136     }
137 
138     /**
139      * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
140      */
141     protected LinkedHashMap toStringMapper() {
142         LinkedHashMap m = new LinkedHashMap();
143         m.put(OLEPropertyConstants.ID, this.id);
144         return m;
145     }
146 }