package es.uv.saic.domain;

import java.io.Serializable;
import jakarta.persistence.*;

@Embeddable
public class OrganPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private String tlugar;

	private Integer lugar;

	public OrganPK() {
	}
	public String getTlugar() {
		return this.tlugar;
	}
	public void setTlugar(String tlugar) {
		this.tlugar = tlugar;
	}
	public Integer getLugar() {
		return this.lugar;
	}
	public void setLugar(Integer lugar) {
		this.lugar = lugar;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof OrganPK)) {
			return false;
		}
		OrganPK castOther = (OrganPK)other;
		return 
			this.tlugar.equals(castOther.tlugar)
			&& this.lugar.equals(castOther.lugar);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.tlugar.hashCode();
		hash = hash * prime + this.lugar.hashCode();
		
		return hash;
	}
}