package com.ejie.ad74a.model;

import com.ejie.ad74a.constantes.Constantes;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

import org.springframework.context.i18n.LocaleContextHolder;

/**
 * MaestroActores generated by UDA, 12-may-2023 11:16:38.
 * 
 * @author UDA
 */

public class MaestroActores implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Long idActor42;
	private String descEs42;
	private String descEu42;
	private String descSort42;
	private String desc;
	private List<MaestroSubtiposAvisoActor> maestroSubtiposAvisoActors = new ArrayList<MaestroSubtiposAvisoActor>();
	private List<Avisos> avisosesForOrigen20 = new ArrayList<Avisos>();
	private List<Avisos> avisosesForDestino20 = new ArrayList<Avisos>();

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

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

	/**
	 * Method 'MaestroActores'.
	 * 
	 * @param idActor42  Long
	 * @param descEs42   String
	 * @param descEu42   String
	 * @param descSort42 String
	 */
	public MaestroActores(Long idActor42, String descEs42, String descEu42, String descSort42) {
		this.idActor42 = idActor42;
		this.descEs42 = descEs42;
		this.descEu42 = descEu42;
		this.descSort42 = descSort42;
	}

	/**
	 * Method 'MaestroActores'.
	 * 
	 * @param idActor42                  Long
	 * @param descEs42                   String
	 * @param descEu42                   String
	 * @param descSort42                 String
	 * @param maestroSubtiposAvisoActors List<MaestroSubtiposAvisoActor>
	 * @param avisosesForOrigen20        List<Avisos>
	 * @param avisosesForDestino20       List<Avisos>
	 */
	public MaestroActores(Long idActor42, String descEs42, String descEu42, String descSort42,
			List<MaestroSubtiposAvisoActor> maestroSubtiposAvisoActors, List<Avisos> avisosesForOrigen20,
			List<Avisos> avisosesForDestino20) {

		this.idActor42 = idActor42;
		this.descEs42 = descEs42;
		this.descEu42 = descEu42;
		this.descSort42 = descSort42;
		this.maestroSubtiposAvisoActors = maestroSubtiposAvisoActors;
		this.avisosesForOrigen20 = avisosesForOrigen20;
		this.avisosesForDestino20 = avisosesForDestino20;
	}

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

	public Long getIdActor42() {
		return this.idActor42;
	}

	/**
	 * Method 'setIdActor42'.
	 *
	 * @param idActor42 Long
	 * @return
	 */

	public void setIdActor42(Long idActor42) {
		this.idActor42 = idActor42;
	}

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

	public String getDescEs42() {
		return this.descEs42;
	}

	/**
	 * Method 'setDescEs42'.
	 *
	 * @param descEs42 String
	 * @return
	 */

	public void setDescEs42(String descEs42) {
		this.descEs42 = descEs42;
	}

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

	public String getDescEu42() {
		return this.descEu42;
	}

	/**
	 * Method 'setDescEu42'.
	 *
	 * @param descEu42 String
	 * @return
	 */

	public void setDescEu42(String descEu42) {
		this.descEu42 = descEu42;
	}

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

	public String getDescSort42() {
		return this.descSort42;
	}

	/**
	 * Method 'setDescSort42'.
	 *
	 * @param descSort42 String
	 * @return
	 */

	public void setDescSort42(String descSort42) {
		this.descSort42 = descSort42;
	}

	/**
	 * Method 'getMaestroSubtiposAvisoActors'.
	 *
	 * @return List
	 */
	@JsonIgnore
	public List<MaestroSubtiposAvisoActor> getMaestroSubtiposAvisoActors() {
		return this.maestroSubtiposAvisoActors;
	}

	/**
	 * Method 'setMaestroSubtiposAvisoActors'.
	 *
	 * @param maestroSubtiposAvisoActors List
	 * @return
	 */
	public void setMaestroSubtiposAvisoActors(List<MaestroSubtiposAvisoActor> maestroSubtiposAvisoActors) {
		this.maestroSubtiposAvisoActors = maestroSubtiposAvisoActors;
	}

	/**
	 * Method 'getAvisosesForOrigen20'.
	 *
	 * @return List
	 */
	@JsonIgnore
	public List<Avisos> getAvisosesForOrigen20() {
		return this.avisosesForOrigen20;
	}

	/**
	 * Method 'setAvisosesForOrigen20'.
	 *
	 * @param avisosesForOrigen20 List
	 * @return
	 */
	public void setAvisosesForOrigen20(List<Avisos> avisosesForOrigen20) {
		this.avisosesForOrigen20 = avisosesForOrigen20;
	}

	/**
	 * Method 'getAvisosesForDestino20'.
	 *
	 * @return List
	 */
	@JsonIgnore
	public List<Avisos> getAvisosesForDestino20() {
		return this.avisosesForDestino20;
	}

	/**
	 * Method 'setAvisosesForDestino20'.
	 *
	 * @param avisosesForDestino20 List
	 * @return
	 */
	public void setAvisosesForDestino20(List<Avisos> avisosesForDestino20) {
		this.avisosesForDestino20 = avisosesForDestino20;
	}

	/**
	 * 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(" [ idActor42: ").append(this.idActor42).append(" ]");
		result.append(", [ descEs42: ").append(this.descEs42).append(" ]");
		result.append(", [ descEu42: ").append(this.descEu42).append(" ]");
		result.append(", [ descSort42: ").append(this.descSort42).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.descEs42;
		} else {
			return this.descEs42;
		}
	}

	/**
	 * Method 'setDesc'.
	 *
	 * @param desc String
	 * @return
	 */
	public void setDesc(String desc) {
		this.desc = desc;
	}

}
