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;

/**
 * DocuAvisos generated by UDA, 13-jul-2023 10:09:33.
 * 
 * @author UDA
 */

public class DocuAvisos implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Long idDocAviso70;
	private Long idAviso70;
	private String ruta70;
	private String nombreDoc70;
	private String extension70;
	private Date fecAlta70;
	private String usuAlta70;
	private Long idTipoDoc70;
	private String tipoDocumentoDescEs;
	private String tipoDocumentoDescEu;

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

	/**
	 * Method 'DocuAvisos'.
	 * 
	 * @param idDocAviso70 Long
	 */
	public DocuAvisos(Long idDocAviso70) {
		this.idDocAviso70 = idDocAviso70;
	}

	/**
	 * Method 'DocuAvisos'.
	 * 
	 * @param idDocAviso70 Long
	 * @param idAviso70    Long
	 * @param ruta70       String
	 * @param nombreDoc70  String
	 * @param extension70  String
	 * @param fecAlta70    Date
	 * @param usuAlta70    String
	 */
	public DocuAvisos(Long idDocAviso70, Long idAviso70, String ruta70, String nombreDoc70, String extension70,
			Date fecAlta70, String usuAlta70) {

		this.idDocAviso70 = idDocAviso70;
		this.idAviso70 = idAviso70;
		this.ruta70 = ruta70;
		this.nombreDoc70 = nombreDoc70;
		this.extension70 = extension70;
		this.fecAlta70 = fecAlta70;
		this.usuAlta70 = usuAlta70;
	}

	/**
	 * Method 'getIdDocAviso70'.
	 *
	 * @return Long
	 */

	public Long getIdDocAviso70() {
		return this.idDocAviso70;
	}

	/**
	 * Method 'setIdDocAviso70'.
	 *
	 * @param idDocAviso70 Long
	 * @return
	 */

	public void setIdDocAviso70(Long idDocAviso70) {
		this.idDocAviso70 = idDocAviso70;
	}

	/**
	 * Method 'getIdAviso70'.
	 *
	 * @return Long
	 */

	public Long getIdAviso70() {
		return this.idAviso70;
	}

	/**
	 * Method 'setIdAviso70'.
	 *
	 * @param idAviso70 Long
	 * @return
	 */

	public void setIdAviso70(Long idAviso70) {
		this.idAviso70 = idAviso70;
	}

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

	public String getRuta70() {
		return this.ruta70;
	}

	/**
	 * Method 'setRuta70'.
	 *
	 * @param ruta70 String
	 * @return
	 */

	public void setRuta70(String ruta70) {
		this.ruta70 = ruta70;
	}

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

	public String getNombreDoc70() {
		return this.nombreDoc70;
	}

	/**
	 * Method 'setNombreDoc70'.
	 *
	 * @param nombreDoc70 String
	 * @return
	 */

	public void setNombreDoc70(String nombreDoc70) {
		this.nombreDoc70 = nombreDoc70;
	}

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

	public String getExtension70() {
		return this.extension70;
	}

	/**
	 * Method 'setExtension70'.
	 *
	 * @param extension70 String
	 * @return
	 */

	public void setExtension70(String extension70) {
		this.extension70 = extension70;
	}

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

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

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

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

	public String getUsuAlta70() {
		return this.usuAlta70;
	}

	/**
	 * Method 'setUsuAlta70'.
	 *
	 * @param usuAlta70 String
	 * @return
	 */

	public void setUsuAlta70(String usuAlta70) {
		this.usuAlta70 = usuAlta70;
	}

	/**
	 * 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(" [ idDocAviso70: ").append(this.idDocAviso70).append(" ]");
		result.append(", [ idAviso70: ").append(this.idAviso70).append(" ]");
		result.append(", [ ruta70: ").append(this.ruta70).append(" ]");
		result.append(", [ nombreDoc70: ").append(this.nombreDoc70).append(" ]");
		result.append(", [ extension70: ").append(this.extension70).append(" ]");
		result.append(", [ fecAlta70: ").append(this.fecAlta70).append(" ]");
		result.append(", [ usuAlta70: ").append(this.usuAlta70).append(" ]");
		result.append("}");
		return result.toString();
	}

	public String getTipoDocumentoEs() {
		return tipoDocumentoDescEs;
	}

	public void setTipoDocumentoEs(String tipoDocumentoEs) {
		this.tipoDocumentoDescEs = tipoDocumentoEs;
	}

	public String getTipoDocumentoEu() {
		return tipoDocumentoDescEu;
	}

	public void setTipoDocumentoEu(String tipoDocumentoEu) {
		this.tipoDocumentoDescEu = tipoDocumentoEu;
	}

	public Long getIdTipoDoc70() {
		return idTipoDoc70;
	}

	public void setIdTipoDoc70(Long idTipoDoc70) {
		this.idTipoDoc70 = idTipoDoc70;
	}

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

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

}
