package com.fp.persistence.pgeneral.score;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.EntityManager;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Table;
import com.fp.dto.hb.HibernateBean;
import java.lang.reflect.Field;
import javax.persistence.Transient;
import java.sql.Date;

/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TLOANACCOUNTSCOREDETAIL*/
@Entity(name="TgeneAccountScoreDetail")
@Table(name="TLOANACCOUNTSCOREDETAIL")
public class TgeneAccountScoreDetail extends com.fp.dto.AbstractDataTransport implements Serializable,HibernateBean,Cloneable{
/**
* HashCode asociado con la Instancia
*/
@Transient
private int hashValue = 0;
/**
* Version de la Clase
*/
private static final long serialVersionUID = 1L;
/**
* Clave primaria de la Entidad TgeneAccountScoreDetail
*/
@EmbeddedId
private TgeneAccountScoreDetailKey pk;
@Column(name="PRINCIPALSUSPEND", nullable=true)

/**
* null
*/
private BigDecimal principalsuspend;

@Column(name="PRINCIPALPUNISHED", nullable=true)

/**
* null
*/
private String principalpunished;

@Column(name="PRINCIPALJUDIAL", nullable=true)

/**
* null
*/
private String principaljudial;

@Column(name="MORTGAGEWARRANTIES", nullable=true)

/**
* null
*/
private BigDecimal mortgagewarranties;

@Column(name="APPRAISALMORTGAGEWARRANTIES", nullable=true)

/**
* null
*/
private BigDecimal appraisalmortgagewarranties;

@Column(name="FULFILMENMORTGAGEWARRANTIES", nullable=true)

/**
* null
*/
private BigDecimal fulfilmenmortgagewarranties;

@Column(name="BANKWARRANTIES", nullable=true)

/**
* null
*/
private BigDecimal bankwarranties;

@Column(name="APPRAISALBANKWARRANTIES", nullable=true)

/**
* null
*/
private BigDecimal appraisalbankwarranties;

@Column(name="FULFILMENBANKWARRANTIES", nullable=true)

/**
* null
*/
private BigDecimal fulfilmenbankwarranties;

@Column(name="POLICYWARRANTIES", nullable=true)

/**
* null
*/
private BigDecimal policywarranties;

@Column(name="APPRAISALPOLICYWARRANTIES", nullable=true)

/**
* null
*/
private BigDecimal appraisalpolicywarranties;

@Column(name="FULFILMENPOLICYWARRANTIES", nullable=true)

/**
* null
*/
private BigDecimal fulfilmenpolicywarranties;

/**Contructor por defecto*/
public TgeneAccountScoreDetail(){
}
/**Contructor de TgeneAccountScoreDetail
@param pPk Clave Primaria del entity
*/
public TgeneAccountScoreDetail(TgeneAccountScoreDetailKey pPk){
 this();
 pk=pPk;
}
/**
* Metodo que entrega datos de la tabla dada la clave primaria.
* @param pEntityManager referencia de la session a obtener datos del bean.
* @param pKey Caleve primaria del bean.
* @return TgeneAccountScoreDetail
*/
public static TgeneAccountScoreDetail find(EntityManager pEntityManager,TgeneAccountScoreDetailKey pKey) throws Exception{
    TgeneAccountScoreDetail obj = pEntityManager.find(TgeneAccountScoreDetail.class,pKey);
    return obj;
}
/**Entrega la Clave primaria de TgeneAccountScoreDetail
@return El objeto que referencia a la Clave primaria de TgeneAccountScoreDetail
*/
public TgeneAccountScoreDetailKey getPk(){
  return pk;
}
/**Fija un nuevo valor a la Clave primaria de TgeneAccountScoreDetail
@param pPk El objeto que referencia a la nueva Clave primaria de TgeneAccountScoreDetail
*/
public void setPk(TgeneAccountScoreDetailKey pPk){
  pk=pPk;
}
/**Obtiene el valor de principalsuspend
@return valor de principalsuspend*/
public BigDecimal getPrincipalsuspend(){
  return principalsuspend;
}
/**Fija el valor de principalsuspend
@param pPrincipalsuspend nuevo Valor de principalsuspend*/
public void setPrincipalsuspend(BigDecimal pPrincipalsuspend){
  principalsuspend=pPrincipalsuspend;
}

/**Obtiene el valor de principalpunished
@return valor de principalpunished*/
public String getPrincipalpunished(){
  return principalpunished;
}
/**Fija el valor de principalpunished
@param pPrincipalpunished nuevo Valor de principalpunished*/
public void setPrincipalpunished(String pPrincipalpunished){
  principalpunished=pPrincipalpunished;
}

/**Obtiene el valor de principaljudial
@return valor de principaljudial*/
public String getPrincipaljudial(){
  return principaljudial;
}
/**Fija el valor de principaljudial
@param pPrincipaljudial nuevo Valor de principaljudial*/
public void setPrincipaljudial(String pPrincipaljudial){
  principaljudial=pPrincipaljudial;
}

/**Obtiene el valor de mortgagewarranties
@return valor de mortgagewarranties*/
public BigDecimal getMortgagewarranties(){
  return mortgagewarranties;
}
/**Fija el valor de mortgagewarranties
@param pMortgagewarranties nuevo Valor de mortgagewarranties*/
public void setMortgagewarranties(BigDecimal pMortgagewarranties){
  mortgagewarranties=pMortgagewarranties;
}

/**Obtiene el valor de appraisalmortgagewarranties
@return valor de appraisalmortgagewarranties*/
public BigDecimal getAppraisalmortgagewarranties(){
  return appraisalmortgagewarranties;
}
/**Fija el valor de appraisalmortgagewarranties
@param pAppraisalmortgagewarranties nuevo Valor de appraisalmortgagewarranties*/
public void setAppraisalmortgagewarranties(BigDecimal pAppraisalmortgagewarranties){
  appraisalmortgagewarranties=pAppraisalmortgagewarranties;
}

/**Obtiene el valor de fulfilmenmortgagewarranties
@return valor de fulfilmenmortgagewarranties*/
public BigDecimal getFulfilmenmortgagewarranties(){
  return fulfilmenmortgagewarranties;
}
/**Fija el valor de fulfilmenmortgagewarranties
@param pFulfilmenmortgagewarranties nuevo Valor de fulfilmenmortgagewarranties*/
public void setFulfilmenmortgagewarranties(BigDecimal pFulfilmenmortgagewarranties){
  fulfilmenmortgagewarranties=pFulfilmenmortgagewarranties;
}

/**Obtiene el valor de bankwarranties
@return valor de bankwarranties*/
public BigDecimal getBankwarranties(){
  return bankwarranties;
}
/**Fija el valor de bankwarranties
@param pBankwarranties nuevo Valor de bankwarranties*/
public void setBankwarranties(BigDecimal pBankwarranties){
  bankwarranties=pBankwarranties;
}

/**Obtiene el valor de appraisalbankwarranties
@return valor de appraisalbankwarranties*/
public BigDecimal getAppraisalbankwarranties(){
  return appraisalbankwarranties;
}
/**Fija el valor de appraisalbankwarranties
@param pAppraisalbankwarranties nuevo Valor de appraisalbankwarranties*/
public void setAppraisalbankwarranties(BigDecimal pAppraisalbankwarranties){
  appraisalbankwarranties=pAppraisalbankwarranties;
}

/**Obtiene el valor de fulfilmenbankwarranties
@return valor de fulfilmenbankwarranties*/
public BigDecimal getFulfilmenbankwarranties(){
  return fulfilmenbankwarranties;
}
/**Fija el valor de fulfilmenbankwarranties
@param pFulfilmenbankwarranties nuevo Valor de fulfilmenbankwarranties*/
public void setFulfilmenbankwarranties(BigDecimal pFulfilmenbankwarranties){
  fulfilmenbankwarranties=pFulfilmenbankwarranties;
}

/**Obtiene el valor de policywarranties
@return valor de policywarranties*/
public BigDecimal getPolicywarranties(){
  return policywarranties;
}
/**Fija el valor de policywarranties
@param pPolicywarranties nuevo Valor de policywarranties*/
public void setPolicywarranties(BigDecimal pPolicywarranties){
  policywarranties=pPolicywarranties;
}

/**Obtiene el valor de appraisalpolicywarranties
@return valor de appraisalpolicywarranties*/
public BigDecimal getAppraisalpolicywarranties(){
  return appraisalpolicywarranties;
}
/**Fija el valor de appraisalpolicywarranties
@param pAppraisalpolicywarranties nuevo Valor de appraisalpolicywarranties*/
public void setAppraisalpolicywarranties(BigDecimal pAppraisalpolicywarranties){
  appraisalpolicywarranties=pAppraisalpolicywarranties;
}

/**Obtiene el valor de fulfilmenpolicywarranties
@return valor de fulfilmenpolicywarranties*/
public BigDecimal getFulfilmenpolicywarranties(){
  return fulfilmenpolicywarranties;
}
/**Fija el valor de fulfilmenpolicywarranties
@param pFulfilmenpolicywarranties nuevo Valor de fulfilmenpolicywarranties*/
public void setFulfilmenpolicywarranties(BigDecimal pFulfilmenpolicywarranties){
  fulfilmenpolicywarranties=pFulfilmenpolicywarranties;
}

public boolean equals(Object rhs){
    if (rhs == null)return false;
    if (! (rhs instanceof TgeneAccountScoreDetail))return false;
    TgeneAccountScoreDetail that = (TgeneAccountScoreDetail) rhs;
    if (this.getPk() == null || that.getPk() == null)
        return false;
    return (this.getPk().equals(that.getPk()));
}
/**Implementacion del metodo hashCode de la la entidad TgeneAccountScoreDetail
@return el hashCode la instancia
*/
public int hashCode()    {
    if (this.hashValue == 0){
        int result = 17;
        if (this.getPk() == null){
            result = super.hashCode();
        }else{
            result = this.getPk().hashCode();
        }
        this.hashValue = result;
    }
    return this.hashValue;
}
/**Implementacion toString
*/
public String toString() {
	Field[]fs=this.getClass().getDeclaredFields();
	String data="";
	for(Field f:fs){
	 try{	
	 String name=f.getName();
   if(f.getType().getName().compareTo("java.util.Set")==0)continue;
	 if(name.compareTo("hashValue")==0||name.compareTo("serialVersionUID")==0)continue;
		data+=name+"="+f.get(this)+";";
	 }catch(Exception e){
		 continue;
	 }
		}
		if(data.compareTo("")==0){
		data=super.toString();
		}
	return data;
	}
/**Implementacion de la creacion de un bean en blanco TgeneAccountScoreDetail
*/
public Object createInstance(){
 TgeneAccountScoreDetail instance=new TgeneAccountScoreDetail();	
 instance.setPk(new TgeneAccountScoreDetailKey());
 return instance;
}
/**Clona la entidad TgeneAccountScoreDetail
@see com.fp.dto.hb.HibernateBean#cloneMe()
*/
public Object cloneMe() throws CloneNotSupportedException{
  TgeneAccountScoreDetail p=(TgeneAccountScoreDetail)this.clone();
  p.setPk((TgeneAccountScoreDetailKey)this.pk.cloneMe());
  return p;
}
}
