com.passiveMonitorBackend.connectMonitor.model.ChangeOffSet.java Source code

Java tutorial

Introduction

Here is the source code for com.passiveMonitorBackend.connectMonitor.model.ChangeOffSet.java

Source

package com.passiveMonitorBackend.connectMonitor.model;
/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: 
 * License Type: Evaluation
 */
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;

import com.passiveMonitorBackend.system.model.MachineAxials;

/**
 * ??
 */
@Entity
@org.hibernate.annotations.Proxy(lazy = false)
@Table(name = "MAC_CHANGE_OFFSET_INFO")
public class ChangeOffSet implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    @Column(name = "OFFSET_SRNO", nullable = false)
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int offSetSrno;

    @ManyToOne(targetEntity = MachineAxials.class)
    @JoinColumns({ @JoinColumn(name = "MACHINE_ID", referencedColumnName = "MACHINE_ID", nullable = false),
            @JoinColumn(name = "TOOL_SET_ID", referencedColumnName = "TOOL_SET_ID", nullable = false),
            @JoinColumn(name = "AXIAL_ID", referencedColumnName = "AXIAL_ID", nullable = false) })
    private MachineAxials machineAxial;

    @Column(name = "OFFSET_ID", nullable = false, length = 255)
    private String offSetId;

    //   @ManyToOne(targetEntity=COM_PROCESS_MAIN.class)   
    //   @org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.LOCK})   
    //   @JoinColumns({ @JoinColumn(name="PROCESS_SRNO", referencedColumnName="PROCESS_SRNO", nullable=false) })   
    //   private COM_PROCESS_MAIN PROCESS_SRNO;

    @ManyToOne(targetEntity = ChangeMain.class)
    @JoinColumns({ @JoinColumn(name = "OFFSET_CHANGE_ID", referencedColumnName = "CHANGE_ID") })
    private ChangeMain changeMain;

    @Column(name = "OFFSET_VALUE", nullable = false, precision = 10, scale = 4)
    private Double offSetValue;

    @Column(name = "OFFSET_IS_VALID", nullable = false)
    private int isValid = 0;

    @Column(name = "OFFSET_CREATE_ID", nullable = false, length = 255, insertable = true, updatable = false)
    private String createId;

    @Column(name = "OFFSET_CREATE_DATE", nullable = false, insertable = true, updatable = false)
    @CreatedDate
    @Temporal(TemporalType.TIMESTAMP)
    private Date createDate;

    @Column(name = "OFFSET_UPDATE_ID", nullable = false, length = 255, insertable = true, updatable = true)
    private String updateId;

    @Column(name = "OFFSET_UPDATE_DATE", nullable = false, insertable = true, updatable = true)
    @LastModifiedDate
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateDate;

    @PrePersist
    void createDate() {
        long time = new Date().getTime();
        this.createDate = this.updateDate = new Timestamp(time);
    }

    @PreUpdate
    void updateDate() {
        long time = new Date().getTime();
        this.updateDate = new Timestamp(time);
    }

    public int getOffSetSrno() {
        return offSetSrno;
    }

    public void setOffSetSrno(int offSetSrno) {
        this.offSetSrno = offSetSrno;
    }

    public MachineAxials getMachineAxial() {
        return machineAxial;
    }

    public void setMachineAxial(MachineAxials machineAxial) {
        this.machineAxial = machineAxial;
    }

    public String getOffSetId() {
        return offSetId;
    }

    public void setOffSetId(String offSetId) {
        this.offSetId = offSetId;
    }

    public ChangeMain getChangeMain() {
        return changeMain;
    }

    public void setChangeMain(ChangeMain changeMain) {
        this.changeMain = changeMain;
    }

    public Double getOffSetValue() {
        return offSetValue;
    }

    public void setOffSetValue(Double offSetValue) {
        this.offSetValue = offSetValue;
    }

    public int getIsValid() {
        return isValid;
    }

    public void setIsValid(int isValid) {
        this.isValid = isValid;
    }

    public String getCreateId() {
        return createId;
    }

    public void setCreateId(String createId) {
        this.createId = createId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getUpdateId() {
        return updateId;
    }

    public void setUpdateId(String updateId) {
        this.updateId = updateId;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

}