1 package org.javabb.vo; 2 3 import java.io.Serializable ; 4 import org.apache.commons.lang.builder.EqualsBuilder; 5 import org.apache.commons.lang.builder.HashCodeBuilder; 6 import org.apache.commons.lang.builder.ToStringBuilder; 7 8 23 24 28 public class GroupPermissionPK implements Serializable { 29 30 31 private Long groupId; 32 33 34 private Long idForum; 35 36 37 public GroupPermissionPK(Long groupId, Long idForum) { 38 this.groupId = groupId; 39 this.idForum = idForum; 40 } 41 42 43 public GroupPermissionPK() { 44 } 45 46 52 public Long getGroupId() { 53 return this.groupId; 54 } 55 56 public void setGroupId(Long groupId) { 57 this.groupId = groupId; 58 } 59 60 66 public Long getIdForum() { 67 return this.idForum; 68 } 69 70 public void setIdForum(Long idForum) { 71 this.idForum = idForum; 72 } 73 74 public String toString() { 75 return new ToStringBuilder(this) 76 .append("groupId", getGroupId()) 77 .append("idForum", getIdForum()) 78 .toString(); 79 } 80 81 public boolean equals(Object other) { 82 if ( !(other instanceof GroupPermissionPK) ) return false; 83 GroupPermissionPK castOther = (GroupPermissionPK) other; 84 return new EqualsBuilder() 85 .append(this.getGroupId(), castOther.getGroupId()) 86 .append(this.getIdForum(), castOther.getIdForum()) 87 .isEquals(); 88 } 89 90 public int hashCode() { 91 return new HashCodeBuilder() 92 .append(getGroupId()) 93 .append(getIdForum()) 94 .toHashCode(); 95 } 96 97 } 98 | Popular Tags |