com.testing26thjuly_.wmstudio.Table29.java Source code

Java tutorial

Introduction

Here is the source code for com.testing26thjuly_.wmstudio.Table29.java

Source

/*Copyright (c) 2016-2017 wavemaker.com All Rights Reserved.
 This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance
 with the terms of the source code license agreement you entered into with wavemaker.com*/

package com.testing26thjuly_.wmstudio;

/*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * Table29 generated by WaveMaker Studio.
 */
@Entity
@Table(name = "`TABLE29`", schema = "SARASWATHI")
public class Table29 implements Serializable {

    private int id;
    private String column2;
    private Table29 table29ByColumn3;
    private List<Table29> table29sForColumn3 = new ArrayList<>();

    @Id
    @Column(name = "`ID`", nullable = false, scale = 0, precision = 10)
    public int getId() {
        return this.id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Column(name = "`COLUMN2`", nullable = true, length = 255)
    public String getColumn2() {
        return this.column2;
    }

    public void setColumn2(String column2) {
        this.column2 = column2;
    }

    // ignoring self relation properties to avoid circular loops.
    @JsonIgnoreProperties({ "table29ByColumn3", "table29sForColumn3" })
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "`COLUMN3`", referencedColumnName = "`ID`", insertable = true, updatable = true)
    public Table29 getTable29ByColumn3() {
        return this.table29ByColumn3;
    }

    public void setTable29ByColumn3(Table29 table29ByColumn3) {
        this.table29ByColumn3 = table29ByColumn3;
    }

    // ignoring self relation properties to avoid circular loops.
    @JsonIgnoreProperties({ "table29ByColumn3", "table29sForColumn3" })
    @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "table29ByColumn3")
    public List<Table29> getTable29sForColumn3() {
        return this.table29sForColumn3;
    }

    public void setTable29sForColumn3(List<Table29> table29sForColumn3) {
        this.table29sForColumn3 = table29sForColumn3;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (!(o instanceof Table29))
            return false;
        final Table29 table29 = (Table29) o;
        return Objects.equals(getId(), table29.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId());
    }
}