|
Hibernate example source code file (MiddleKey.java)
The Hibernate MiddleKey.java source codepackage org.hibernate.test.legacy; import java.io.Serializable; /** * @author Stefano Travelli */ public class MiddleKey implements Serializable { private Inner sup; private String one; private String two; public String getOne() { return one; } public void setOne(String one) { this.one = one; } public String getTwo() { return two; } public void setTwo(String two) { this.two = two; } public Inner getSup() { return sup; } public void setSup(Inner sup) { this.sup = sup; } public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof MiddleKey)) return false; final MiddleKey cidMasterID = (MiddleKey) o; if (one != null ? !one.equals(cidMasterID.one) : cidMasterID.one != null) return false; if (sup != null ? !sup.equals(cidMasterID.sup) : cidMasterID.sup != null) return false; if (two != null ? !two.equals(cidMasterID.two) : cidMasterID.two != null) return false; return true; } public int hashCode() { int result; result = (sup != null ? sup.hashCode() : 0); result = 29 * result + (one != null ? one.hashCode() : 0); result = 29 * result + (two != null ? two.hashCode() : 0); return result; } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate MiddleKey.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.