001: /*
002: * Copyright (c) 2002-2003 by OpenSymphony
003: * All rights reserved.
004: */
005: /*
006: * Generated by XDoclet - Do not edit!
007: */
008: package com.opensymphony.workflow.spi.ejb;
009:
010: /**
011: * Primary key for CurrentStepPrev.
012: * @author Hani Suleiman (hani@formicary.net) Date: Apr 7, 2003 Time: 8:17:26 PM
013: */
014: public class PreviousStepPK extends java.lang.Object implements
015: java.io.Serializable {
016: //~ Instance fields ////////////////////////////////////////////////////////
017:
018: public java.lang.Long id;
019: public java.lang.Long previousId;
020:
021: //~ Constructors ///////////////////////////////////////////////////////////
022:
023: public PreviousStepPK() {
024: }
025:
026: public PreviousStepPK(java.lang.Long id, java.lang.Long previousId) {
027: this .id = id;
028: this .previousId = previousId;
029: }
030:
031: //~ Methods ////////////////////////////////////////////////////////////////
032:
033: public void setId(java.lang.Long id) {
034: this .id = id;
035: }
036:
037: public java.lang.Long getId() {
038: return id;
039: }
040:
041: public void setPreviousId(java.lang.Long previousId) {
042: this .previousId = previousId;
043: }
044:
045: public java.lang.Long getPreviousId() {
046: return previousId;
047: }
048:
049: public boolean equals(Object obj) {
050: if (!(obj instanceof com.opensymphony.workflow.spi.ejb.PreviousStepPK)) {
051: return false;
052: }
053:
054: com.opensymphony.workflow.spi.ejb.PreviousStepPK pk = (com.opensymphony.workflow.spi.ejb.PreviousStepPK) obj;
055: boolean eq = true;
056:
057: if (obj == null) {
058: eq = false;
059: } else {
060: if (this .id != null) {
061: eq = eq && this .id.equals(pk.getId());
062: } else // this.id == null
063: {
064: eq = eq && (pk.getId() == null);
065: }
066:
067: if (this .previousId != null) {
068: eq = eq && this .previousId.equals(pk.getPreviousId());
069: } else // this.previousId == null
070: {
071: eq = eq && (pk.getPreviousId() == null);
072: }
073: }
074:
075: return eq;
076: }
077:
078: public int hashCode() {
079: int _hashCode = 0;
080:
081: if (this .id != null) {
082: _hashCode += this .id.hashCode();
083: }
084:
085: if (this .previousId != null) {
086: _hashCode += this .previousId.hashCode();
087: }
088:
089: return _hashCode;
090: }
091:
092: /** @return String representation of this pk in the form of [.field1.field2.field3]. */
093: public String toString() {
094: StringBuffer toStringValue = new StringBuffer("[.");
095: toStringValue.append(this .id).append('.');
096: toStringValue.append(this .previousId).append('.');
097: toStringValue.append(']');
098:
099: return toStringValue.toString();
100: }
101: }
|