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_FMT_PROC_T"
036: */
037:
038: public class FormatProcess implements Serializable,
039: PersistenceBrokerAware {
040:
041: private String physicalCampusProcessCode; // PHYS_CMP_PROC_CD
042: private Timestamp beginFormat; // BEG_FMT_TS
043: private Timestamp lastUpdate;
044: private Integer version; // VER_NBR
045:
046: public FormatProcess() {
047: super ();
048: }
049:
050: public Timestamp getBeginFormat() {
051: return beginFormat;
052: }
053:
054: public void setBeginFormat(Timestamp beginFormat) {
055: this .beginFormat = beginFormat;
056: }
057:
058: /**
059: * @return
060: * @hibernate.version column="VER_NBR" not-null="true"
061: */
062: public Integer getVersion() {
063: return version;
064: }
065:
066: /**
067: * @return
068: * @hibernate.id column="PHYS_CMP_PROC_CD" length="2" generator-class="assigned"
069: */
070: public String getPhysicalCampusProcessCode() {
071: return physicalCampusProcessCode;
072: }
073:
074: /**
075: * @param string
076: */
077: public void setPhysicalCampusProcessCode(String string) {
078: physicalCampusProcessCode = string;
079: }
080:
081: /**
082: * @param integer
083: */
084: public void setVersion(Integer integer) {
085: version = integer;
086: }
087:
088: public boolean equals(Object obj) {
089: if (!(obj instanceof FormatProcess)) {
090: return false;
091: }
092: FormatProcess o = (FormatProcess) obj;
093: return new EqualsBuilder().append(physicalCampusProcessCode,
094: o.getPhysicalCampusProcessCode()).isEquals();
095: }
096:
097: public int hashCode() {
098: return new HashCodeBuilder(83, 91).append(
099: physicalCampusProcessCode).toHashCode();
100: }
101:
102: public String toString() {
103: return new ToStringBuilder(this ).append(
104: "physicalCampusProcessCode",
105: this .physicalCampusProcessCode).toString();
106: }
107:
108: /**
109: * @return Returns the lastUpdate.
110: */
111: public Timestamp getLastUpdate() {
112: return lastUpdate;
113: }
114:
115: /**
116: * @param lastUpdate The lastUpdate to set.
117: */
118: public void setLastUpdate(Timestamp lastUpdate) {
119: this .lastUpdate = lastUpdate;
120: }
121:
122: public void beforeInsert(PersistenceBroker broker)
123: throws PersistenceBrokerException {
124: lastUpdate = new Timestamp((new Date()).getTime());
125: }
126:
127: public void afterInsert(PersistenceBroker broker)
128: throws PersistenceBrokerException {
129:
130: }
131:
132: public void beforeUpdate(PersistenceBroker broker)
133: throws PersistenceBrokerException {
134: lastUpdate = new Timestamp((new Date()).getTime());
135: }
136:
137: public void afterUpdate(PersistenceBroker broker)
138: throws PersistenceBrokerException {
139:
140: }
141:
142: public void beforeDelete(PersistenceBroker broker)
143: throws PersistenceBrokerException {
144:
145: }
146:
147: public void afterDelete(PersistenceBroker broker)
148: throws PersistenceBrokerException {
149:
150: }
151:
152: public void afterLookup(PersistenceBroker broker)
153: throws PersistenceBrokerException {
154:
155: }
156: }
|