001/** 002 * Copyright 2005-2016 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 */ 016package org.kuali.rice.kew.doctype; 017 018import java.io.Serializable; 019 020import javax.persistence.Column; 021import javax.persistence.Embeddable; 022 023/** 024 */ 025@Embeddable 026public class ApplicationDocumentStatusId implements Serializable { 027 028 @Column(name="DOC_TYP_ID") 029 private String documentTypeId; 030 @Column(name="DOC_STAT_NM") 031 private String statusName; 032 033 public ApplicationDocumentStatusId() {} 034 035 public String getDocumentTypeId() { return documentTypeId; } 036 037 public void setDocumentTypeId(String documentTypeId) { this.documentTypeId = documentTypeId; } 038 039 public String getStatusName() { return statusName; } 040 041 public void setStatusName(String statusName) { this.statusName = statusName; } 042 043 /** 044 * This overridden method ... 045 * 046 * @see java.lang.Object#hashCode() 047 */ 048 @Override 049 public int hashCode() { 050 final int prime = 31; 051 int result = 1; 052 result = prime 053 * result 054 + ((this.documentTypeId == null) ? 0 : this.documentTypeId 055 .hashCode()); 056 result = prime * result 057 + ((this.statusName == null) ? 0 : this.statusName.hashCode()); 058 return result; 059 } 060 061 /** 062 * This overridden method ... 063 * 064 * @see java.lang.Object#equals(java.lang.Object) 065 */ 066 @Override 067 public boolean equals(Object obj) { 068 if (this == obj) 069 return true; 070 if (obj == null) 071 return false; 072 if (getClass() != obj.getClass()) 073 return false; 074 final ApplicationDocumentStatusId other = (ApplicationDocumentStatusId) obj; 075 if (this.documentTypeId == null) { 076 if (other.documentTypeId != null) 077 return false; 078 } else if (!this.documentTypeId.equals(other.documentTypeId)) 079 return false; 080 if (this.statusName == null) { 081 if (other.statusName != null) 082 return false; 083 } else if (!this.statusName.equals(other.statusName)) 084 return false; 085 return true; 086 } 087 088/* 089 public boolean equals(Object o) { 090 if (o == this) return true; 091 if (!(o instanceof DocumentTypePolicyId)) return false; 092 if (o == null) return false; 093 DocumentTypePolicyId pk = (DocumentTypePolicyId) o; 094 // TODO: Finish implementing this method. Compare o to pk and return true or false. 095 throw new UnsupportedOperationException("Please implement me!"); 096 } 097 098 public int hashCode() { 099 // TODO: Implement this method 100 throw new UnsupportedOperationException("Please implement me!"); 101 } 102*/ 103 104} 105