package com.ejie.ad74a.model;

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;
import java.util.Date;
import java.util.Locale;

import org.springframework.context.i18n.LocaleContextHolder;

/**
 * MaestroMotQueja generated by UDA, 02-oct-2023 13:02:27.
 * 
 * @author UDA
 */

public class MaestroMotQueja implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Long idMotivoQueja62;
	private String descEs62;
	private String descEu62;
	private Date FAlta62;
	private String usuAlta62;
	private Date FModif62;
	private String usuModif62;

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

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

	/**
	 * Method 'MaestroMotQueja'.
	 * 
	 * @param idMotivoQueja62 BigDecimal
	 * @param descEs62        String
	 * @param descEu62        String
	 * @param FAlta62         Date
	 * @param usuAlta62       String
	 * @param FModif62        Date
	 * @param usuModif62      String
	 */
	public MaestroMotQueja(Long idMotivoQueja62, String descEs62, String descEu62, Date FAlta62, String usuAlta62,
			Date FModif62, String usuModif62) {

		this.idMotivoQueja62 = idMotivoQueja62;
		this.descEs62 = descEs62;
		this.descEu62 = descEu62;
		this.FAlta62 = FAlta62;
		this.usuAlta62 = usuAlta62;
		this.FModif62 = FModif62;
		this.usuModif62 = usuModif62;
	}

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

	public Long getIdMotivoQueja62() {
		return this.idMotivoQueja62;
	}

	/**
	 * Method 'setIdMotivoQueja62'.
	 *
	 * @param idMotivoQueja62 BigDecimal
	 * @return
	 */

	public void setIdMotivoQueja62(Long idMotivoQueja62) {
		this.idMotivoQueja62 = idMotivoQueja62;
	}

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

	public String getDescEs62() {
		return this.descEs62;
	}

	/**
	 * Method 'setDescEs62'.
	 *
	 * @param descEs62 String
	 * @return
	 */

	public void setDescEs62(String descEs62) {
		this.descEs62 = descEs62;
	}

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

	public String getDescEu62() {
		return this.descEu62;
	}

	/**
	 * Method 'setDescEu62'.
	 *
	 * @param descEu62 String
	 * @return
	 */

	public void setDescEu62(String descEu62) {
		this.descEu62 = descEu62;
	}

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

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

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

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

	public String getUsuAlta62() {
		return this.usuAlta62;
	}

	/**
	 * Method 'setUsuAlta62'.
	 *
	 * @param usuAlta62 String
	 * @return
	 */

	public void setUsuAlta62(String usuAlta62) {
		this.usuAlta62 = usuAlta62;
	}

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

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

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

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

	public String getUsuModif62() {
		return this.usuModif62;
	}

	/**
	 * Method 'setUsuModif62'.
	 *
	 * @param usuModif62 String
	 * @return
	 */

	public void setUsuModif62(String usuModif62) {
		this.usuModif62 = usuModif62;
	}

	/**
	 * 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(" [ idMotivoQueja62: ").append(this.idMotivoQueja62).append(" ]");
		result.append(", [ descEs62: ").append(this.descEs62).append(" ]");
		result.append(", [ descEu62: ").append(this.descEu62).append(" ]");
		result.append(", [ FAlta62: ").append(this.FAlta62).append(" ]");
		result.append(", [ usuAlta62: ").append(this.usuAlta62).append(" ]");
		result.append(", [ FModif62: ").append(this.FModif62).append(" ]");
		result.append(", [ usuModif62: ").append(this.usuModif62).append(" ]");
		result.append("}");
		return result.toString();
	}

	public String getDesc() {
		Locale locale = LocaleContextHolder.getLocale();

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

}
