package com.ejie.aa20b.model;

import com.ejie.x38.serialization.JsonDateTimeDeserializer;
import com.ejie.x38.serialization.JsonDateTimeSerializer;
import java.util.Date;

import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonSerialize;

/**
 * Usuarios generated by UDA, 10-mar-2015 14:56:20.
 * 
 * @author UDA
 */

public class UsuariosMovil implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Integer idUsuarioMovil;
	private String login;
	private String rol;
	private String nombreBD;
	private String passwordHash;
	private String imei;
	private String idTecnico;
	private Date fechaUltimaSinc;
	private String idIdioma;
	private String email;
	private String versionApp;
	private String deviceName;
	private String deviceVersion;
	private String devicePlatform;
	private Date fechaUltimaSincD;
	private Date fechaUltimaSincH;
	private String strFechaUltimaSincD;
	private String strFechaUltimaSincH;

	private RolesMovil rolMovil;
	private Tecnicos tecnico;

	private String strFeini; // para recoger los filtros y mantener al Volver.

	/**
	 * Method 'Usuarios'.
	 */
	public UsuariosMovil() {
	}

	/**
	 * Method 'UsuariosMovil'.
	 * 
	 */
	public UsuariosMovil(Integer idUsuarioMovil, String login, String rol,
			String nombreBD, String passwordHash, String imei,
			String idTecnico, Date fechaUltimaSinc, String idIdioma,
			String email, String versionApp, String deviceName,
			String deviceVersion, String devicePlatform, RolesMovil rolMovil,
			Tecnicos tecnico) {

		this.idUsuarioMovil = idUsuarioMovil;
		this.login = login;
		this.rol = rol;
		this.nombreBD = nombreBD;
		this.passwordHash = passwordHash;
		this.imei = imei;
		this.idTecnico = idTecnico;
		this.fechaUltimaSinc = fechaUltimaSinc;
		this.idIdioma = idIdioma;
		this.email = email;
		this.versionApp = versionApp;
		this.deviceName = deviceName;
		this.deviceVersion = deviceVersion;
		this.devicePlatform = devicePlatform;
		this.rolMovil = rolMovil;
		this.tecnico = tecnico;
	}

	public Integer getIdUsuarioMovil() {
		return idUsuarioMovil;
	}

	public void setIdUsuarioMovil(Integer idUsuarioMovil) {
		this.idUsuarioMovil = idUsuarioMovil;
	}

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getRol() {
		return rol;
	}

	public void setRol(String rol) {
		this.rol = rol;
	}

	public String getNombreBD() {
		return nombreBD;
	}

	public void setNombreBD(String nombreBD) {
		this.nombreBD = nombreBD;
	}

	public String getPasswordHash() {
		return passwordHash;
	}

	public void setPasswordHash(String passwordHash) {
		this.passwordHash = passwordHash;
	}

	public String getImei() {
		return imei;
	}

	public void setImei(String imei) {
		this.imei = imei;
	}

	public String getIdTecnico() {
		return idTecnico;
	}

	public void setIdTecnico(String idTecnico) {
		this.idTecnico = idTecnico;
	}

	@JsonSerialize(using = JsonDateTimeSerializer.class)
	public Date getFechaUltimaSinc() {
		return fechaUltimaSinc;
	}

	@JsonDeserialize(using = JsonDateTimeDeserializer.class)
	public void setFechaUltimaSinc(Date fechaUltimaSinc) {
		this.fechaUltimaSinc = fechaUltimaSinc;
	}

	public String getIdIdioma() {
		return idIdioma;
	}

	public void setIdIdioma(String idIdioma) {
		this.idIdioma = idIdioma;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getVersionApp() {
		return versionApp;
	}

	public void setVersionApp(String versionApp) {
		this.versionApp = versionApp;
	}

	public String getDeviceName() {
		return deviceName;
	}

	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}

	public String getDeviceVersion() {
		return deviceVersion;
	}

	public void setDeviceVersion(String deviceVersion) {
		this.deviceVersion = deviceVersion;
	}

	public String getDevicePlatform() {
		return devicePlatform;
	}

	public void setDevicePlatform(String devicePlatform) {
		this.devicePlatform = devicePlatform;
	}

	public String getStrFeini() {
		return strFeini;
	}

	public void setStrFeini(String strFeini) {
		this.strFeini = strFeini;
	}

	/**
	 * Intended only for logging and debugging.
	 * 
	 * Here, the contents of every main field are placed into the result.
	 * private String login; private String rol; private String nombreBD;
	 * private String passwordHash; private String imei; private String
	 * idTecnico; private Date fechaUltimaSinc; private String idIdioma; private
	 * String email; private String versionApp; private String deviceName;
	 * private String deviceVersion; private String devicePlatform;
	 * 
	 * @return String
	 */
	@Override
	public String toString() {
		StringBuilder result = new StringBuilder();
		result.append(this.getClass().getName()).append(" Object { ");
		result.append(" [ idUsuarioMovil: ").append(this.idUsuarioMovil)
				.append(" ]");
		result.append(" [ login: ").append(this.login).append(" ]");
		result.append(", [ nombreBD: ").append(this.nombreBD).append(" ]");
		result.append(", [ passwordHash: ").append(this.passwordHash)
				.append(" ]");
		result.append(", [ imei: ").append(this.imei).append(" ]");
		result.append(", [ idTecnico: ").append(this.idTecnico).append(" ]");
		result.append(", [ fechaUltimaSinc: ").append(this.fechaUltimaSinc)
				.append(" ]");
		result.append(", [ idIdioma: ").append(this.idIdioma).append(" ]");
		result.append(", [ email: ").append(this.email).append(" ]");
		result.append(", [ versionApp: ").append(this.versionApp).append(" ]");
		result.append(", [ deviceName: ").append(this.deviceName).append(" ]");
		result.append(", [ deviceVersion: ").append(this.deviceVersion)
				.append(" ]");
		result.append(", [ devicePlatform: ").append(this.devicePlatform)
				.append(" ]");

		result.append("}");
		return result.toString();
	}

	public Date getFechaUltimaSincD() {
		return fechaUltimaSincD;
	}

	public void setFechaUltimaSincD(Date fechaUltimaSincD) {
		this.fechaUltimaSincD = fechaUltimaSincD;
	}

	public Date getFechaUltimaSincH() {
		return fechaUltimaSincH;
	}

	public void setFechaUltimaSincH(Date fechaUltimaSincH) {
		this.fechaUltimaSincH = fechaUltimaSincH;
	}

	public String getStrFechaUltimaSincD() {
		return strFechaUltimaSincD;
	}

	public void setStrFechaUltimaSincD(String strFechaUltimaSincD) {
		this.strFechaUltimaSincD = strFechaUltimaSincD;
	}

	public String getStrFechaUltimaSincH() {
		return strFechaUltimaSincH;
	}

	public void setStrFechaUltimaSincH(String strFechaUltimaSincH) {
		this.strFechaUltimaSincH = strFechaUltimaSincH;
	}

	public RolesMovil getRolMovil() {
		return rolMovil;
	}

	public void setRolMovil(RolesMovil rolMovil) {
		this.rolMovil = rolMovil;
	}

	public Tecnicos getTecnico() {
		return tecnico;
	}

	public void setTecnico(Tecnicos tecnico) {
		this.tecnico = tecnico;
	}

}
