|
Hibernate example source code file (ActivityId.java)
The Hibernate ActivityId.java source codepackage org.hibernate.envers.test.integration.inheritance.mixed.entities; import javax.persistence.Embeddable; import java.io.Serializable; @Embeddable public class ActivityId implements Serializable { private Integer id; private Integer id2; public ActivityId() { } public ActivityId(int i, int i1) { id = i; id2 = i1; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getId2() { return id2; } public void setId2(Integer id2) { this.id2 = id2; } @Override public boolean equals(Object obj) { if (obj == null) { return true; } if (!(obj instanceof ActivityId)) { return false; } ActivityId id = (ActivityId) obj; return getId().equals(id.getId()) && getId2().equals(id.getId2()); } @Override public int hashCode() { int result = getId().hashCode(); result = 31 * result + getId2().hashCode(); return result; } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate ActivityId.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.