|
Hibernate example source code file (BabyCompleteEntity.java)
The Hibernate BabyCompleteEntity.java source codepackage org.hibernate.envers.test.integration.superclass.auditparents; import org.hibernate.envers.Audited; import org.hibernate.envers.test.entities.StrIntTestEntity; import javax.persistence.Entity; /** * @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com) */ @Entity @Audited(auditParents = {MappedParentEntity.class}) public class BabyCompleteEntity extends ChildCompleteEntity { private String baby; public BabyCompleteEntity() { } public BabyCompleteEntity(Long id, String grandparent, String notAudited, String parent, String child, StrIntTestEntity relation, String baby) { super(id, grandparent, notAudited, parent, child, relation); this.baby = baby; } public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof BabyCompleteEntity)) return false; if (!super.equals(o)) return false; BabyCompleteEntity that = (BabyCompleteEntity) o; if (baby != null ? !baby.equals(that.baby) : that.baby != null) return false; return true; } public int hashCode() { int result = super.hashCode(); result = 31 * result + (baby != null ? baby.hashCode() : 0); return result; } public String toString() { return "BabyCompleteEntity(" + super.toString() + ", baby = " + baby + ")"; } public String getBaby() { return baby; } public void setBaby(String baby) { this.baby = baby; } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate BabyCompleteEntity.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.