package com.ejie.ab78.model.procedimientos;

public class FieldExpedienteCompare {

	public static final String TEXT = "text";
	public static final String DATE = "date";
	public static final String COMBO = "checkbox";

	private boolean hasChanges = false;

	private String label;
	private String oldValue;
	private String newValue;

	private String oldDescValue;
	private String newDescValue;

	private String typeField;

	public FieldExpedienteCompare(String label, String oldValue, String newValue, String typeField) {
		this.setLabel(label);
		this.setOldValue(oldValue);
		this.setNewValue(newValue);
		this.setTypeField(typeField);
		setHasChanges(oldValue != null && newValue != null && !oldValue.equalsIgnoreCase(newValue));
	}

	public FieldExpedienteCompare(String label, String oldValue, String newValue, String typeField, String oldDescValue,
			String newDescValue) {
		this.setLabel(label);
		this.setOldValue(oldValue);
		this.setNewValue(newValue);
		this.setTypeField(typeField);
		this.setOldDescValue(oldDescValue);
		this.setNewDescValue(newDescValue);
		setHasChanges(oldValue != null && newValue != null && !oldValue.equalsIgnoreCase(newValue));
	}

	public boolean isHasChanges() {
		return hasChanges;
	}

	public void setHasChanges(boolean hasChanges) {
		this.hasChanges = hasChanges;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public String getOldValue() {
		return oldValue;
	}

	public void setOldValue(String oldValue) {
		this.oldValue = oldValue;
	}

	public String getNewValue() {
		return newValue;
	}

	public void setNewValue(String newValue) {
		this.newValue = newValue;
	}

	public String getTypeField() {
		return typeField;
	}

	public void setTypeField(String typeField) {
		this.typeField = typeField;
	}

	public String getOldDescValue() {
		return oldDescValue;
	}

	public void setOldDescValue(String oldDescValue) {
		this.oldDescValue = oldDescValue;
	}

	public String getNewDescValue() {
		return newDescValue;
	}

	public void setNewDescValue(String newDescValue) {
		this.newDescValue = newDescValue;
	}
}
