Feedback.java :  » App » ampted » com » AMPTedApp » Data » Android Open Source

Android Open Source » App » ampted 
ampted » com » AMPTedApp » Data » Feedback.java
/*
 * Android Mobile Physical Therapy Exercise Documenter
 * Copyright (C) 2010 http://www.amptedapp.com/
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *  
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.AMPTedApp.Data;

import java.io.Serializable;
import java.util.Calendar;

/**
 * The feedback for exercises completed by the user.
 * 
 * @author Jared Hatfield
 * 
 */
public class Feedback implements Serializable {

    /**
     * The serial version UID.
     */
    private static final long serialVersionUID = 1L;

    /**
     * The time and date the exercise feedback was completed by the user.
     */
    private Calendar timeUser;

    /**
     * The time and date the exercise feedback was added.
     */
    private Calendar timeAdd;

    /**
     * The time and date the exercise feedback was updated.
     */
    private Calendar timeUpdate;

    /**
     * The pain level of the user from 1 to 10.
     * 
     * Note: 0 indicates field was not filled out.
     */
    private int pain;

    /**
     * The notes submitted by the user.
     */
    private String notes;

    /**
     * Initializes a new instance of the Feedback class.
     * 
     * @param time
     *            The time the exercise feedback was completed.
     * @param pain
     *            The users pain level.
     * @param notes
     *            The notes submitted by the users.
     */
    public Feedback(Calendar time, int pain, String notes) {
        this.timeUser = time;
        this.timeAdd = Calendar.getInstance();
        this.timeUpdate = Calendar.getInstance();
        this.pain = pain;
        this.notes = notes;
    }

    /**
     * Initializes a new instance of the Feedback class.
     * 
     * @param timeUser
     *            The time the exercise feedback was completed.
     * @param timeAdd
     *            The time the exercise feedback was added.
     * @param timeUpdate
     *            The time the exercise feedback was updated.
     * @param pain
     *            The users pain level.
     * @param notes
     *            The notes submitted by the users.
     */
    public Feedback(Calendar timeUser, Calendar timeAdd, Calendar timeUpdate,
            int pain, String notes) {
        this.timeUser = timeUser;
        this.timeAdd = timeAdd;
        this.timeUpdate = timeUpdate;
        this.pain = pain;
        this.notes = notes;
    }

    /**
     * Gets the time and date the exercise feedback was completed by the user.
     * 
     * @return The time User.
     */
    public Calendar getTimeUser() {
        return timeUser;
    }

    /**
     * Sets the time and date the exercise feedback was completed by the user.
     * 
     * @param timeUser
     *            The time User to set.
     */
    public void setTimeUser(Calendar timeUser) {
        this.timeUser = timeUser;
    }

    /**
     * Gets the time and date the exercise feedback was added.
     * 
     * @return The time Add.
     */
    public Calendar getTimeAdd() {
        return timeAdd;
    }

    /**
     * Sets the time and date the exercise feedback was added.
     * 
     * @param timeAdd
     *            The timeAdd to set.
     */
    public void setTimeAdd(Calendar timeAdd) {
        this.timeAdd = timeAdd;
    }

    /**
     * Gets the time and date the exercise feedback was updated.
     * 
     * @return The time update.
     */
    public Calendar getTimeUpdate() {
        return timeUpdate;
    }

    /**
     * Sets the time and date the exercise feedback was updated.
     * 
     * @param timeUpdate
     *            The time update to set.
     */
    public void setTimeUpdate(Calendar timeUpdate) {
        this.timeUpdate = timeUpdate;
    }

    /**
     * Gets the pain level of the user from 1 to 10.
     * 
     * @return The pain.
     */
    public int getPain() {
        return pain;
    }

    /**
     * Sets the pain level of the user from 1 to 10.
     * 
     * @param pain
     *            The pain to set.
     */
    public void setPain(int pain) {
        this.pain = pain;
    }

    /**
     * Gets the notes submitted by the user.
     * 
     * @return The notes.
     */
    public String getNotes() {
        return notes;
    }

    /**
     * Gets the notes submitted by the user.
     * 
     * @param notes
     *            The notes to set.
     */
    public void setNotes(String notes) {
        this.notes = notes;
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.