alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Hibernate example source code file (ChildIndexedListJoinColumnBidirectionalRefIngEntity.java)

This example Hibernate source code file (ChildIndexedListJoinColumnBidirectionalRefIngEntity.java) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Hibernate tags/keywords

audited, childindexedlistjoincolumnbidirectionalrefingentity, childindexedlistjoincolumnbidirectionalrefingentity, entity, override, override, parentindexedlistjoincolumnbidirectionalrefingentity, parentownedindexedlistjoincolumnbidirectionalrefedentity, parentownedindexedlistjoincolumnbidirectionalrefedentity, string, string

The Hibernate ChildIndexedListJoinColumnBidirectionalRefIngEntity.java source code

package org.hibernate.envers.test.entities.onetomany.detached.inheritance;
import javax.persistence.Entity;
import org.hibernate.envers.Audited;

/**
 * Entity for {@link org.hibernate.envers.test.integration.onetomany.detached.InheritanceIndexedJoinColumnBidirectionalList} test.
 * Child, owning side of the relation.
 * @author Adam Warski (adam at warski dot org)
 */
@Entity
@Audited
public class ChildIndexedListJoinColumnBidirectionalRefIngEntity extends ParentIndexedListJoinColumnBidirectionalRefIngEntity {
    private String data2;

    public ChildIndexedListJoinColumnBidirectionalRefIngEntity() {
    }

    public ChildIndexedListJoinColumnBidirectionalRefIngEntity(Integer id, String data, String data2, ParentOwnedIndexedListJoinColumnBidirectionalRefEdEntity... references) {
        super(id, data, references);
        this.data2 = data2;
    }

    public ChildIndexedListJoinColumnBidirectionalRefIngEntity(String data, String data2, ParentOwnedIndexedListJoinColumnBidirectionalRefEdEntity... references) {
        super(data, references);
        this.data2 = data2;
    }

    public String getData2() {
        return data2;
    }

    public void setData2(String data2) {
        this.data2 = data2;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof ChildIndexedListJoinColumnBidirectionalRefIngEntity)) return false;
        if (!super.equals(o)) return false;

        ChildIndexedListJoinColumnBidirectionalRefIngEntity that = (ChildIndexedListJoinColumnBidirectionalRefIngEntity) o;

        if (data2 != null ? !data2.equals(that.data2) : that.data2 != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (data2 != null ? data2.hashCode() : 0);
        return result;
    }

    public String toString() {
        return "ChildIndexedListJoinColumnBidirectionalRefIngEntity(id = " + getId() + ", data = " + getData() + ", data2 = " + data2 + ")";
    }
}

Other Hibernate examples (source code examples)

Here is a short list of links related to this Hibernate ChildIndexedListJoinColumnBidirectionalRefIngEntity.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

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.