/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package yafft.FFModel.ModelItems;

import java.sql.Timestamp;
import javafx.beans.property.*;

/**
 *
 * @author michal
 */
public class FormItem {
    private StringProperty fieldID;
    private StringProperty formValue;
    private IntegerProperty timesUsed;
    private ObjectProperty<Timestamp> firstUsed;
    private ObjectProperty<Timestamp> lastUsed;
    
    
    public FormItem(String fieldID, String formValue, Integer timesUsed, Timestamp firstUsed, Timestamp lastUsed) {
        this.fieldID = new SimpleStringProperty(fieldID);
        this.formValue = new SimpleStringProperty(formValue);
        this.timesUsed = new SimpleIntegerProperty(timesUsed);
        this.firstUsed = new SimpleObjectProperty<>(firstUsed);
        this.lastUsed = new SimpleObjectProperty<>(lastUsed);
    }

    public StringProperty getFieldID() {
        return fieldID;
    }

    public StringProperty getFormValue() {
        return formValue;
    }

    public IntegerProperty getTimesUsed() {
        return timesUsed;
    }

    public ObjectProperty<Timestamp> getFirstUsed() {
        return firstUsed;
    }

    public ObjectProperty<Timestamp> getLastUsed() {
        return lastUsed;
    }

    @Override
    public String toString() {
        return "FormItem{" + "fieldID=" + fieldID + ", formValue=" + formValue + '}';
    }
    
    public String toString(Boolean b) {
        return "FormItem{" + "fieldID=" + fieldID + ", formValue=" + formValue + ", timesUsed=" + timesUsed + ", firstUsed=" + firstUsed + ", lastUsed=" + lastUsed + '}';
    }


 
    
}
