/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.asu.spring.quadriga.dto;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
/**
* This class represents the primary key column mappings for
* workspace dictionary table.
* @author Karthik
*/
@Embeddable
public class WorkspaceDictionaryDTOPK implements Serializable
{
private static final long serialVersionUID = 1L;
@Basic(optional = false)
@Column(name = "workspaceid")
private String workspaceid;
@Basic(optional = false)
@Column(name = "dictionaryid")
private String dictionaryid;
public WorkspaceDictionaryDTOPK() {
}
public WorkspaceDictionaryDTOPK(String workspaceid, String dictionaryid) {
this.workspaceid = workspaceid;
this.dictionaryid = dictionaryid;
}
public String getWorkspaceid() {
return workspaceid;
}
public void setWorkspaceid(String workspaceid) {
this.workspaceid = workspaceid;
}
public String getDictionaryid() {
return dictionaryid;
}
public void setDictionaryid(String dictionaryid) {
this.dictionaryid = dictionaryid;
}
@Override
public int hashCode() {
int hash = 0;
hash += (workspaceid != null ? workspaceid.hashCode() : 0);
hash += (dictionaryid != null ? dictionaryid.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
if (!(object instanceof WorkspaceDictionaryDTOPK)) {
return false;
}
WorkspaceDictionaryDTOPK other = (WorkspaceDictionaryDTOPK) object;
if ((this.workspaceid == null && other.workspaceid != null) || (this.workspaceid != null && !this.workspaceid.equals(other.workspaceid))) {
return false;
}
if ((this.dictionaryid == null && other.dictionaryid != null) || (this.dictionaryid != null && !this.dictionaryid.equals(other.dictionaryid))) {
return false;
}
return true;
}
}