001 /** 002 * Copyright 2005-2013 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 */ 016 package org.kuali.rice.kew.useroptions; 017 018 import java.io.Serializable; 019 020 import javax.persistence.Column; 021 022 /** 023 * This Compound Primary Class has been generated by the rice ojb2jpa Groovy script. Please 024 * note that there are no setter methods, only getters. This is done purposefully as cpk classes 025 * can not change after they have been created. Also note they require a public no-arg constructor. 026 * TODO: Implement the equals() and hashCode() methods. 027 */ 028 public class UserOptionsId implements Serializable { 029 030 private static final long serialVersionUID = -982957447172014416L; 031 032 @Column(name="PRSN_OPTN_ID") 033 private String optionId; 034 @Column(name="PRNCPL_ID") 035 private String workflowId; 036 037 public UserOptionsId() {} 038 039 public String getOptionId() { return optionId; } 040 041 public String getWorkflowId() { return workflowId; } 042 043 public boolean equals(Object o) { 044 if (o == this) return true; 045 if (!(o instanceof UserOptionsId)) return false; 046 if (o == null) return false; 047 UserOptionsId pk = (UserOptionsId) o; 048 return getOptionId() != null && getWorkflowId() != null && getOptionId().equals(pk.getOptionId()) && getWorkflowId().equals(pk.getWorkflowId()); 049 } 050 051 public int hashCode() { 052 return (getOptionId() + getWorkflowId()).hashCode(); 053 } 054 055 } 056