/*
 * 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.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author developer2
 */
@Entity
@Table(name="COMACO.TCUSTPEOPLEOTHERASSETS")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tcustpeopleotherassets.findAll", query = "SELECT t FROM Tcustpeopleotherassets t"),
    @NamedQuery(name = "Tcustpeopleotherassets.findByPersoncode", query = "SELECT t FROM Tcustpeopleotherassets t WHERE t.tcustpeopleotherassetsPK.personcode = :personcode"),
    @NamedQuery(name = "Tcustpeopleotherassets.findByDateto", query = "SELECT t FROM Tcustpeopleotherassets t WHERE t.tcustpeopleotherassetsPK.dateto = :dateto"),
    @NamedQuery(name = "Tcustpeopleotherassets.findByAssetssequence", query = "SELECT t FROM Tcustpeopleotherassets t WHERE t.tcustpeopleotherassetsPK.assetssequence = :assetssequence"),
    @NamedQuery(name = "Tcustpeopleotherassets.findByDatefrom", query = "SELECT t FROM Tcustpeopleotherassets t WHERE t.datefrom = :datefrom"),
    @NamedQuery(name = "Tcustpeopleotherassets.findByRecordversion", query = "SELECT t FROM Tcustpeopleotherassets t WHERE t.recordversion = :recordversion"),
    @NamedQuery(name = "Tcustpeopleotherassets.findByAssessment", query = "SELECT t FROM Tcustpeopleotherassets t WHERE t.assessment = :assessment"),
    @NamedQuery(name = "Tcustpeopleotherassets.findByAssessmentdate", query = "SELECT t FROM Tcustpeopleotherassets t WHERE t.assessmentdate = :assessmentdate"),
    @NamedQuery(name = "Tcustpeopleotherassets.findByMortgageamount", query = "SELECT t FROM Tcustpeopleotherassets t WHERE t.mortgageamount = :mortgageamount"),
    @NamedQuery(name = "Tcustpeopleotherassets.findByMortgagedate", query = "SELECT t FROM Tcustpeopleotherassets t WHERE t.mortgagedate = :mortgagedate"),
    @NamedQuery(name = "Tcustpeopleotherassets.findByMortgagebalance", query = "SELECT t FROM Tcustpeopleotherassets t WHERE t.mortgagebalance = :mortgagebalance"),
    @NamedQuery(name = "Tcustpeopleotherassets.findByMortgagename", query = "SELECT t FROM Tcustpeopleotherassets t WHERE t.mortgagename = :mortgagename"),
    @NamedQuery(name = "Tcustpeopleotherassets.findByRemark", query = "SELECT t FROM Tcustpeopleotherassets t WHERE t.remark = :remark"),
    @NamedQuery(name = "Tcustpeopleotherassets.findByIngressusercode", query = "SELECT t FROM Tcustpeopleotherassets t WHERE t.ingressusercode = :ingressusercode"),
    @NamedQuery(name = "Tcustpeopleotherassets.findByModifyusercode", query = "SELECT t FROM Tcustpeopleotherassets t WHERE t.modifyusercode = :modifyusercode")})
public class Tcustpeopleotherassets implements Serializable {

    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected TcustpeopleotherassetsPK tcustpeopleotherassetsPK;
    @Column(name = "DATEFROM")
    @Temporal(TemporalType.TIMESTAMP)
    private Date datefrom;
    @Column(name = "RECORDVERSION")
    private BigInteger recordversion;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "ASSESSMENT")
    private BigDecimal assessment;
    @Column(name = "ASSESSMENTDATE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date assessmentdate;
    @Column(name = "MORTGAGEAMOUNT")
    private BigDecimal mortgageamount;
    @Column(name = "MORTGAGEDATE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date mortgagedate;
    @Column(name = "MORTGAGEBALANCE")
    private BigDecimal mortgagebalance;
    @Column(name = "MORTGAGENAME")
    private String mortgagename;
    @Column(name = "REMARK")
    private String remark;
    @Column(name = "INGRESSUSERCODE")
    private String ingressusercode;
    @Column(name = "MODIFYUSERCODE")
    private String modifyusercode;
    @JoinColumn(name = "MORTGAGEPERSONCODE", referencedColumnName = "PERSONCODE")
    @ManyToOne
    private Tcustperson mortgagepersoncode;
    @JoinColumn(name = "PERSONCODE", referencedColumnName = "PERSONCODE", insertable = false, updatable = false)
    @ManyToOne(optional = false)
    private Tcustperson tcustperson;
    @JoinColumns({
        @JoinColumn(name = "PROPERTYTYPECATALOG", referencedColumnName = "CATALOG"),
        @JoinColumn(name = "PROPERTYTYPECATALOGCODE", referencedColumnName = "CATALOGCODE")})
    @ManyToOne
    private Tgenecatalogdetail tgenecatalogdetail;
    @JoinColumn(name = "CURRENCYCODE", referencedColumnName = "CURRENCYCODE")
    @ManyToOne
    private Tgenecurrency currencycode;

    public Tcustpeopleotherassets() {
    }

    public Tcustpeopleotherassets(TcustpeopleotherassetsPK tcustpeopleotherassetsPK) {
        this.tcustpeopleotherassetsPK = tcustpeopleotherassetsPK;
    }

    public Tcustpeopleotherassets(long personcode, Date dateto, short assetssequence) {
        this.tcustpeopleotherassetsPK = new TcustpeopleotherassetsPK(personcode, dateto, assetssequence);
    }

    public TcustpeopleotherassetsPK getTcustpeopleotherassetsPK() {
        return tcustpeopleotherassetsPK;
    }

    public void setTcustpeopleotherassetsPK(TcustpeopleotherassetsPK tcustpeopleotherassetsPK) {
        this.tcustpeopleotherassetsPK = tcustpeopleotherassetsPK;
    }

    public Date getDatefrom() {
        return datefrom;
    }

    public void setDatefrom(Date datefrom) {
        this.datefrom = datefrom;
    }

    public BigInteger getRecordversion() {
        return recordversion;
    }

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

    public BigDecimal getAssessment() {
        return assessment;
    }

    public void setAssessment(BigDecimal assessment) {
        this.assessment = assessment;
    }

    public Date getAssessmentdate() {
        return assessmentdate;
    }

    public void setAssessmentdate(Date assessmentdate) {
        this.assessmentdate = assessmentdate;
    }

    public BigDecimal getMortgageamount() {
        return mortgageamount;
    }

    public void setMortgageamount(BigDecimal mortgageamount) {
        this.mortgageamount = mortgageamount;
    }

    public Date getMortgagedate() {
        return mortgagedate;
    }

    public void setMortgagedate(Date mortgagedate) {
        this.mortgagedate = mortgagedate;
    }

    public BigDecimal getMortgagebalance() {
        return mortgagebalance;
    }

    public void setMortgagebalance(BigDecimal mortgagebalance) {
        this.mortgagebalance = mortgagebalance;
    }

    public String getMortgagename() {
        return mortgagename;
    }

    public void setMortgagename(String mortgagename) {
        this.mortgagename = mortgagename;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getIngressusercode() {
        return ingressusercode;
    }

    public void setIngressusercode(String ingressusercode) {
        this.ingressusercode = ingressusercode;
    }

    public String getModifyusercode() {
        return modifyusercode;
    }

    public void setModifyusercode(String modifyusercode) {
        this.modifyusercode = modifyusercode;
    }

    public Tcustperson getMortgagepersoncode() {
        return mortgagepersoncode;
    }

    public void setMortgagepersoncode(Tcustperson mortgagepersoncode) {
        this.mortgagepersoncode = mortgagepersoncode;
    }

    public Tcustperson getTcustperson() {
        return tcustperson;
    }

    public void setTcustperson(Tcustperson tcustperson) {
        this.tcustperson = tcustperson;
    }

    public Tgenecatalogdetail getTgenecatalogdetail() {
        return tgenecatalogdetail;
    }

    public void setTgenecatalogdetail(Tgenecatalogdetail tgenecatalogdetail) {
        this.tgenecatalogdetail = tgenecatalogdetail;
    }

    public Tgenecurrency getCurrencycode() {
        return currencycode;
    }

    public void setCurrencycode(Tgenecurrency currencycode) {
        this.currencycode = currencycode;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (tcustpeopleotherassetsPK != null ? tcustpeopleotherassetsPK.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 Tcustpeopleotherassets)) {
            return false;
        }
        Tcustpeopleotherassets other = (Tcustpeopleotherassets) object;
        if ((this.tcustpeopleotherassetsPK == null && other.tcustpeopleotherassetsPK != null) || (this.tcustpeopleotherassetsPK != null && !this.tcustpeopleotherassetsPK.equals(other.tcustpeopleotherassetsPK))) {
            return false;
        }
        return true;
    }

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