All Downloads are FREE. Search and download functionalities are using the official Maven repository.

model.DataproductIspartof Maven / Gradle / Ivy

There is a newer version: 2.5.21
Show newest version
package model;

import jakarta.persistence.*;

@Entity
@Table(name = "dataproduct_ispartof", schema = "public", catalog = "cerif")
@IdClass(DataproductIspartofPK.class)
public class DataproductIspartof {
    @Id
    @Column(name = "dataproduct1_instance_id", nullable = false, length = 100)
    private String dataproduct1InstanceId;
    @Id
    @Column(name = "dataproduct2_instance_id", nullable = false, length = 100)
    private String dataproduct2InstanceId;
    @ManyToOne
    @PrimaryKeyJoinColumn(name = "dataproduct1_instance_id", referencedColumnName = "instance_id")
    private Dataproduct dataproductByDataproduct1InstanceId;
    @ManyToOne
    @PrimaryKeyJoinColumn(name = "dataproduct2_instance_id", referencedColumnName = "instance_id")
    private Dataproduct dataproductByDataproduct2InstanceId;

    public String getDataproduct1InstanceId() {
        return dataproduct1InstanceId;
    }

    public void setDataproduct1InstanceId(String dataproduct1InstanceId) {
        this.dataproduct1InstanceId = dataproduct1InstanceId;
    }

    public String getDataproduct2InstanceId() {
        return dataproduct2InstanceId;
    }

    public void setDataproduct2InstanceId(String dataproduct2InstanceId) {
        this.dataproduct2InstanceId = dataproduct2InstanceId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DataproductIspartof that = (DataproductIspartof) o;

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

        return true;
    }

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

    public Dataproduct getDataproductByDataproduct1InstanceId() {
        return dataproductByDataproduct1InstanceId;
    }

    public void setDataproductByDataproduct1InstanceId(Dataproduct dataproductByDataproduct1InstanceId) {
        this.dataproductByDataproduct1InstanceId = dataproductByDataproduct1InstanceId;
    }

    public Dataproduct getDataproductByDataproduct2InstanceId() {
        return dataproductByDataproduct2InstanceId;
    }

    public void setDataproductByDataproduct2InstanceId(Dataproduct dataproductByDataproduct2InstanceId) {
        this.dataproductByDataproduct2InstanceId = dataproductByDataproduct2InstanceId;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy