001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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: /*
017: * Created on Jul 9, 2004
018: *
019: */
020: package org.kuali.module.pdp.bo;
021:
022: import java.io.Serializable;
023: import java.sql.Timestamp;
024: import java.util.Date;
025:
026: import org.apache.commons.lang.builder.EqualsBuilder;
027: import org.apache.commons.lang.builder.HashCodeBuilder;
028: import org.apache.commons.lang.builder.ToStringBuilder;
029: import org.apache.ojb.broker.PersistenceBroker;
030: import org.apache.ojb.broker.PersistenceBrokerAware;
031: import org.apache.ojb.broker.PersistenceBrokerException;
032:
033: /**
034: * @author delyea
035: * @hibernate.class table="PDP.PDP_PMT_NTE_TXT_T"
036: */
037:
038: public class PaymentNoteText implements Serializable,
039: PersistenceBrokerAware {
040:
041: private Integer id; // PMT_NTE_ID
042:
043: private Integer paymentDetailId;
044: private PaymentDetail paymentDetail; // PMT_DTL_ID
045:
046: private Integer customerNoteLineNbr; // CUST_NTE_LN_NBR
047: private String customerNoteText; // CUST_NTE_TXT
048: private Timestamp lastUpdate;
049: private Integer version; // VER_NBR
050:
051: public PaymentNoteText() {
052: super ();
053: }
054:
055: /**
056: * @hibernate.id column="PMT_NTE_ID" generator-class="sequence"
057: * @hibernate.generator-param name="sequence" value="PDP.PDP_PMT_NTE_ID_SEQ"
058: * @return Returns the paymentNoteId.
059: */
060: public Integer getId() {
061: return id;
062: }
063:
064: /**
065: * @param paymentNoteId The paymentNoteId to set.
066: */
067: public void setId(Integer paymentNoteId) {
068: this .id = paymentNoteId;
069: }
070:
071: /**
072: * @return
073: * @hibernate.version column="VER_NBR" not-null="true"
074: */
075: public Integer getVersion() {
076: return version;
077: }
078:
079: /**
080: * @return
081: * @hibernate.property column="CUST_NTE_LN_NBR" not-null="true"
082: */
083: public Integer getCustomerNoteLineNbr() {
084: return customerNoteLineNbr;
085: }
086:
087: /**
088: * @return
089: * @hibernate.property column="CUST_NTE_TXT" length="60" not-null="true"
090: */
091: public String getCustomerNoteText() {
092: return customerNoteText;
093: }
094:
095: /**
096: * @return
097: * @hibernate.many-to-one column="PMT_DTL_ID" class="edu.iu.uis.pdp.bo.PaymentDetail"
098: */
099: public PaymentDetail getPaymentDetail() {
100: return paymentDetail;
101: }
102:
103: /**
104: * @param integer
105: */
106: public void setCustomerNoteLineNbr(Integer integer) {
107: customerNoteLineNbr = integer;
108: }
109:
110: /**
111: * @param string
112: */
113: public void setCustomerNoteText(String string) {
114: customerNoteText = string;
115: }
116:
117: /**
118: * @param integer
119: */
120: public void setPaymentDetail(PaymentDetail pd) {
121: paymentDetail = pd;
122: }
123:
124: /**
125: * @param integer
126: */
127: public void setVersion(Integer integer) {
128: version = integer;
129: }
130:
131: public boolean equals(Object obj) {
132: if (!(obj instanceof PaymentNoteText)) {
133: return false;
134: }
135: PaymentNoteText o = (PaymentNoteText) obj;
136: return new EqualsBuilder().append(id, o.getId()).isEquals();
137: }
138:
139: public int hashCode() {
140: return new HashCodeBuilder(83, 7).append(id).toHashCode();
141: }
142:
143: public String toString() {
144: return new ToStringBuilder(this ).append("id", this .id)
145: .toString();
146: }
147:
148: /**
149: * @return Returns the lastUpdate.
150: */
151: public Timestamp getLastUpdate() {
152: return lastUpdate;
153: }
154:
155: /**
156: * @param lastUpdate The lastUpdate to set.
157: */
158: public void setLastUpdate(Timestamp lastUpdate) {
159: this .lastUpdate = lastUpdate;
160: }
161:
162: public void beforeInsert(PersistenceBroker broker)
163: throws PersistenceBrokerException {
164: lastUpdate = new Timestamp((new Date()).getTime());
165: }
166:
167: public void afterInsert(PersistenceBroker broker)
168: throws PersistenceBrokerException {
169:
170: }
171:
172: public void beforeUpdate(PersistenceBroker broker)
173: throws PersistenceBrokerException {
174: lastUpdate = new Timestamp((new Date()).getTime());
175: }
176:
177: public void afterUpdate(PersistenceBroker broker)
178: throws PersistenceBrokerException {
179:
180: }
181:
182: public void beforeDelete(PersistenceBroker broker)
183: throws PersistenceBrokerException {
184:
185: }
186:
187: public void afterDelete(PersistenceBroker broker)
188: throws PersistenceBrokerException {
189:
190: }
191:
192: public void afterLookup(PersistenceBroker broker)
193: throws PersistenceBrokerException {
194:
195: }
196: }
|