/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.qsoft.rs.sincoar.model;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author developer2
 */
@Entity
@Table(name="COMACO.TGENEMESSAGESTRUCTURE")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tgenemessagestructure.findAll", query = "SELECT t FROM Tgenemessagestructure t"),
    @NamedQuery(name = "Tgenemessagestructure.findByStructurecode", query = "SELECT t FROM Tgenemessagestructure t WHERE t.structurecode = :structurecode"),
    @NamedQuery(name = "Tgenemessagestructure.findByRecordversion", query = "SELECT t FROM Tgenemessagestructure t WHERE t.recordversion = :recordversion"),
    @NamedQuery(name = "Tgenemessagestructure.findByDescription", query = "SELECT t FROM Tgenemessagestructure t WHERE t.description = :description"),
    @NamedQuery(name = "Tgenemessagestructure.findByHaveheader", query = "SELECT t FROM Tgenemessagestructure t WHERE t.haveheader = :haveheader"),
    @NamedQuery(name = "Tgenemessagestructure.findByHeaderlength", query = "SELECT t FROM Tgenemessagestructure t WHERE t.headerlength = :headerlength"),
    @NamedQuery(name = "Tgenemessagestructure.findByHeaderseparator", query = "SELECT t FROM Tgenemessagestructure t WHERE t.headerseparator = :headerseparator"),
    @NamedQuery(name = "Tgenemessagestructure.findByEnddatacharacter", query = "SELECT t FROM Tgenemessagestructure t WHERE t.enddatacharacter = :enddatacharacter"),
    @NamedQuery(name = "Tgenemessagestructure.findByRecordlength", query = "SELECT t FROM Tgenemessagestructure t WHERE t.recordlength = :recordlength"),
    @NamedQuery(name = "Tgenemessagestructure.findByRecordseparator", query = "SELECT t FROM Tgenemessagestructure t WHERE t.recordseparator = :recordseparator"),
    @NamedQuery(name = "Tgenemessagestructure.findByFormatdate", query = "SELECT t FROM Tgenemessagestructure t WHERE t.formatdate = :formatdate"),
    @NamedQuery(name = "Tgenemessagestructure.findByFormattime", query = "SELECT t FROM Tgenemessagestructure t WHERE t.formattime = :formattime"),
    @NamedQuery(name = "Tgenemessagestructure.findByHeaderclass", query = "SELECT t FROM Tgenemessagestructure t WHERE t.headerclass = :headerclass"),
    @NamedQuery(name = "Tgenemessagestructure.findByDetailclass", query = "SELECT t FROM Tgenemessagestructure t WHERE t.detailclass = :detailclass")})
public class Tgenemessagestructure implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "STRUCTURECODE")
    private String structurecode;
    @Column(name = "RECORDVERSION")
    private BigInteger recordversion;
    @Column(name = "DESCRIPTION")
    private String description;
    @Column(name = "HAVEHEADER")
    private String haveheader;
    @Column(name = "HEADERLENGTH")
    private Short headerlength;
    @Column(name = "HEADERSEPARATOR")
    private String headerseparator;
    @Column(name = "ENDDATACHARACTER")
    private String enddatacharacter;
    @Column(name = "RECORDLENGTH")
    private Short recordlength;
    @Column(name = "RECORDSEPARATOR")
    private String recordseparator;
    @Column(name = "FORMATDATE")
    private String formatdate;
    @Column(name = "FORMATTIME")
    private String formattime;
    @Column(name = "HEADERCLASS")
    private String headerclass;
    @Column(name = "DETAILCLASS")
    private String detailclass;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenemessagestructure")
    private Collection<Tgenemessagestructuredata> tgenemessagestructuredataCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "tgenemessagestructure")
    private Collection<Tgenemessagestructureheader> tgenemessagestructureheaderCollection;

    public Tgenemessagestructure() {
    }

    public Tgenemessagestructure(String structurecode) {
        this.structurecode = structurecode;
    }

    public String getStructurecode() {
        return structurecode;
    }

    public void setStructurecode(String structurecode) {
        this.structurecode = structurecode;
    }

    public BigInteger getRecordversion() {
        return recordversion;
    }

    public void setRecordversion(BigInteger recordversion) {
        this.recordversion = recordversion;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getHaveheader() {
        return haveheader;
    }

    public void setHaveheader(String haveheader) {
        this.haveheader = haveheader;
    }

    public Short getHeaderlength() {
        return headerlength;
    }

    public void setHeaderlength(Short headerlength) {
        this.headerlength = headerlength;
    }

    public String getHeaderseparator() {
        return headerseparator;
    }

    public void setHeaderseparator(String headerseparator) {
        this.headerseparator = headerseparator;
    }

    public String getEnddatacharacter() {
        return enddatacharacter;
    }

    public void setEnddatacharacter(String enddatacharacter) {
        this.enddatacharacter = enddatacharacter;
    }

    public Short getRecordlength() {
        return recordlength;
    }

    public void setRecordlength(Short recordlength) {
        this.recordlength = recordlength;
    }

    public String getRecordseparator() {
        return recordseparator;
    }

    public void setRecordseparator(String recordseparator) {
        this.recordseparator = recordseparator;
    }

    public String getFormatdate() {
        return formatdate;
    }

    public void setFormatdate(String formatdate) {
        this.formatdate = formatdate;
    }

    public String getFormattime() {
        return formattime;
    }

    public void setFormattime(String formattime) {
        this.formattime = formattime;
    }

    public String getHeaderclass() {
        return headerclass;
    }

    public void setHeaderclass(String headerclass) {
        this.headerclass = headerclass;
    }

    public String getDetailclass() {
        return detailclass;
    }

    public void setDetailclass(String detailclass) {
        this.detailclass = detailclass;
    }

    @XmlTransient
    public Collection<Tgenemessagestructuredata> getTgenemessagestructuredataCollection() {
        return tgenemessagestructuredataCollection;
    }

    public void setTgenemessagestructuredataCollection(Collection<Tgenemessagestructuredata> tgenemessagestructuredataCollection) {
        this.tgenemessagestructuredataCollection = tgenemessagestructuredataCollection;
    }

    @XmlTransient
    public Collection<Tgenemessagestructureheader> getTgenemessagestructureheaderCollection() {
        return tgenemessagestructureheaderCollection;
    }

    public void setTgenemessagestructureheaderCollection(Collection<Tgenemessagestructureheader> tgenemessagestructureheaderCollection) {
        this.tgenemessagestructureheaderCollection = tgenemessagestructureheaderCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (structurecode != null ? structurecode.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Tgenemessagestructure)) {
            return false;
        }
        Tgenemessagestructure other = (Tgenemessagestructure) object;
        if ((this.structurecode == null && other.structurecode != null) || (this.structurecode != null && !this.structurecode.equals(other.structurecode))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.Tgenemessagestructure[ structurecode=" + structurecode + " ]";
    }
    
}
