package com.ejie.ad74a.model;

import java.util.Date;
import java.util.Locale;

import org.springframework.context.i18n.LocaleContextHolder;

import com.ejie.ad74a.constantes.Constantes;
import com.ejie.x38.serialization.JsonDateDeserializer;
import com.ejie.x38.serialization.JsonDateSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * MaestroMotDenegacion generated by UDA, 30-oct-2023 14:41:18.
 * 
 * @author UDA
 */

public class MaestroMotDenegacion implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Long idMotivoDeneg59;
	private String descEs59;
	private String descEu59;
	private Date fAlta59;
	private String idProcedimiento59;
	private String usuAlta59;
	private Date fModif59;
	private String usuModif59;

	/**
	 * Method 'MaestroMotDenegacion'.
	 */
	public MaestroMotDenegacion() {
	}

	/**
	 * Method 'MaestroMotDenegacion'.
	 * 
	 * @param idMotivoDeneg59 BigDecimal
	 */
	public MaestroMotDenegacion(Long idMotivoDeneg59) {
		this.idMotivoDeneg59 = idMotivoDeneg59;
	}

	/**
	 * Method 'MaestroMotDenegacion'.
	 * 
	 * @param idMotivoDeneg59   BigDecimal
	 * @param descEs59          String
	 * @param descEu59          String
	 * @param FAlta59           Date
	 * @param idProcedimiento59 String
	 * @param usuAlta59         String
	 * @param FModif59          Date
	 * @param usuModif59        String
	 */
	public MaestroMotDenegacion(Long idMotivoDeneg59, String descEs59, String descEu59, String idProcedimiento59,
			Date FAlta59, String usuAlta59, Date FModif59, String usuModif59) {

		this.idMotivoDeneg59 = idMotivoDeneg59;
		this.descEs59 = descEs59;
		this.descEu59 = descEu59;
		this.idProcedimiento59 = idProcedimiento59;
		this.fAlta59 = FAlta59;
		this.usuAlta59 = usuAlta59;
		this.fModif59 = FModif59;
		this.usuModif59 = usuModif59;
	}

	/**
	 * Method 'getIdMotivoDeneg59'.
	 *
	 * @return BigDecimal
	 */

	public Long getIdMotivoDeneg59() {
		return this.idMotivoDeneg59;
	}

	/**
	 * Method 'setIdMotivoDeneg59'.
	 *
	 * @param idMotivoDeneg59 BigDecimal
	 * @return
	 */

	public void setIdMotivoDeneg59(Long idMotivoDeneg59) {
		this.idMotivoDeneg59 = idMotivoDeneg59;
	}

	/**
	 * Method 'getDescEs59'.
	 *
	 * @return String
	 */

	public String getDescEs59() {
		return this.descEs59;
	}

	/**
	 * Method 'setDescEs59'.
	 *
	 * @param descEs59 String
	 * @return
	 */

	public void setDescEs59(String descEs59) {
		this.descEs59 = descEs59;
	}

	/**
	 * Method 'getDescEu59'.
	 *
	 * @return String
	 */

	public String getDescEu59() {
		return this.descEu59;
	}

	/**
	 * Method 'setDescEu59'.
	 *
	 * @param descEu59 String
	 * @return
	 */

	public void setDescEu59(String descEu59) {
		this.descEu59 = descEu59;
	}

	/**
	 * Method 'getFAlta59'.
	 *
	 * @return java.util.Date
	 */

	@JsonSerialize(using = JsonDateSerializer.class)
	public Date getfAlta59() {
		return this.fAlta59;
	}

	/**
	 * Method 'setFAlta59'.
	 *
	 * @param FAlta59 java.util.Date
	 * @return
	 */
	@JsonDeserialize(using = JsonDateDeserializer.class)
	public void setfAlta59(Date FAlta59) {
		this.fAlta59 = FAlta59;
	}

	/**
	 * Method 'getUsuAlta59'.
	 *
	 * @return String
	 */

	public String getUsuAlta59() {
		return this.usuAlta59;
	}

	/**
	 * Method 'setUsuAlta59'.
	 *
	 * @param usuAlta59 String
	 * @return
	 */

	public void setUsuAlta59(String usuAlta59) {
		this.usuAlta59 = usuAlta59;
	}

	/**
	 * Method 'getFModif59'.
	 *
	 * @return java.util.Date
	 */

	@JsonSerialize(using = JsonDateSerializer.class)
	public Date getFModif59() {
		return this.fModif59;
	}

	/**
	 * Method 'setFModif59'.
	 *
	 * @param FModif59 java.util.Date
	 * @return
	 */
	@JsonDeserialize(using = JsonDateDeserializer.class)
	public void setFModif59(Date FModif59) {
		this.fModif59 = FModif59;
	}

	/**
	 * Method 'getUsuModif59'.
	 *
	 * @return String
	 */

	public String getUsuModif59() {
		return this.usuModif59;
	}

	/**
	 * Method 'setUsuModif59'.
	 *
	 * @param usuModif59 String
	 * @return
	 */

	public void setUsuModif59(String usuModif59) {
		this.usuModif59 = usuModif59;
	}

	/**
	 * Intended only for logging and debugging.
	 * 
	 * Here, the contents of every main field are placed into the result.
	 * 
	 * @return String
	 */
	@Override
	public String toString() {
		StringBuilder result = new StringBuilder();
		result.append(this.getClass().getName()).append(" Object { ");
		result.append(" [ idMotivoDeneg59: ").append(this.idMotivoDeneg59).append(" ]");
		result.append(", [ descEs59: ").append(this.descEs59).append(" ]");
		result.append(", [ descEu59: ").append(this.descEu59).append(" ]");
		result.append(", [ idProcedimiento59: ").append(this.idProcedimiento59).append(" ]");
		result.append(", [ FAlta59: ").append(this.fAlta59).append(" ]");
		result.append(", [ usuAlta59: ").append(this.usuAlta59).append(" ]");
		result.append(", [ FModif59: ").append(this.fModif59).append(" ]");
		result.append(", [ usuModif59: ").append(this.usuModif59).append(" ]");
		result.append("}");
		return result.toString();
	}

	/**
	 * Method 'getDesc'.
	 *
	 * @return String
	 */
	public String getDesc() {
		Locale locale = LocaleContextHolder.getLocale();

		if (locale.equals(Constantes.LOCALE_ES)) {
			return this.descEs59;
		} else {
			return this.descEs59;
		}
	}

	public String getIdProcedimiento59() {
		return idProcedimiento59;
	}

	public void setIdProcedimiento59(String idProcedimiento59) {
		this.idProcedimiento59 = idProcedimiento59;
	}

}
