Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package br.com.mowa.comunicador.model;
- import java.io.Serializable;
- import javax.persistence.Column;
- import javax.persistence.Embeddable;
- @Embeddable
- public class MwGroupUserPK implements Serializable {
- private static final long serialVersionUID = 1L;
- @Column(name = "id_user", insertable = false, updatable = false)
- private Integer idUser;
- @Column(name = "id_group", insertable = false, updatable = false)
- private Integer idGroup;
- public MwGroupUserPK() {
- }
- public Integer getIdGroup() {
- return this.idGroup;
- }
- public void setIdGroup(Integer idGroup) {
- this.idGroup = idGroup;
- }
- public Integer getIdUser() {
- return this.idUser;
- }
- public void setIdUser(Integer idUser) {
- this.idUser = idUser;
- }
- public boolean equals(Object other) {
- if (this == other) {
- return true;
- }
- if (!(other instanceof MwGroupUserPK)) {
- return false;
- }
- MwGroupUserPK castOther = (MwGroupUserPK) other;
- return this.idGroup.equals(castOther.idGroup) && this.idUser.equals(castOther.idUser);
- }
- public int hashCode() {
- final int prime = 31;
- int hash = 17;
- hash = hash * prime + this.idGroup.hashCode();
- hash = hash * prime + this.idUser.hashCode();
- return hash;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement