Android Open Source - activity-tracker Workout D A O






From Project

Back to project page activity-tracker.

License

The source code is released under:

MIT License

If you think the Android project activity-tracker listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.hopto.mjancola.utility;
/*  ww  w  . j  a v  a2s.  c o m*/
public class WorkoutDAO
{
    private long id;
    private String type;
    private long   start;
    private long   distance;
    private long   duration;
    private long   avgSpeed;
    private String startReason;
    private String endReason;
    public static String INTENT_ID = "Intent_ID";

    public WorkoutDAO( Long id, String type, Long start, Long distance, Long duration, Long avgSpeed, String startReason, String endReason )
    {
        if (id == null) this.id = 99L;
        else this.id = id;

        if (type == null) type = "NONE";
        this.type = type;

        if (start == null) this.start = 0L;
        else this.start = start;

        if (distance == null) this.distance = 0L;
        else this.distance = distance;

        if (duration == null) this.duration = 0L;
        else this.duration = duration;

        if (avgSpeed == null) this.avgSpeed = 0L;
        else this.avgSpeed = avgSpeed;

        if (startReason == null) this.startReason = "NONE";
        else this.startReason = startReason;

        if (endReason == null) this.endReason = "NONE";
        else this.endReason = endReason;
    }

    public long getId()
    {
        return id;
    }

    public String getType()
    {
        return type;
    }

    public long getStart()
    {
        return start;
    }

    public long getDistance()
    {
        return distance;
    }

    public long getDuration()
    {
        return duration;
    }

    public long getAvgSpeed()
    {
        return avgSpeed;
    }

    public String getStartReason()
    {
        return startReason;
    }

    public String getEndReason()
    {
        return endReason;
    }


}




Java Source Code List

org.hopto.mjancola.ActivityTrackerApplication.java
org.hopto.mjancola.activity.ActivityRecognitionActivity.java
org.hopto.mjancola.activity.ActivityTracker.java
org.hopto.mjancola.activity.DemoDetailsList.java
org.hopto.mjancola.activity.DemoDetails.java
org.hopto.mjancola.activity.EditWorkoutDAOActivity.java
org.hopto.mjancola.activity.FeatureView.java
org.hopto.mjancola.activity.LegalInfoActivity.java
org.hopto.mjancola.activity.ListWorkoutsActivity.java
org.hopto.mjancola.activity.MyLocationDemoActivity.java
org.hopto.mjancola.activity.SpeedActivity.java
org.hopto.mjancola.activity.UserSettingsActivity.java
org.hopto.mjancola.adapter.WorkoutDAOAdapter.java
org.hopto.mjancola.fragment.EditWorkoutDAOFragment.java
org.hopto.mjancola.model.DataPoint.java
org.hopto.mjancola.model.GenericMovement.java
org.hopto.mjancola.model.GenericWorkout.java
org.hopto.mjancola.model.LearningMode.java
org.hopto.mjancola.model.MyMovement.java
org.hopto.mjancola.model.WorkoutTotal.java
org.hopto.mjancola.model.WorkoutType.java
org.hopto.mjancola.model.Workout.java
org.hopto.mjancola.service.ActivityRecognitionService.java
org.hopto.mjancola.service.MovementListenerService.java
org.hopto.mjancola.service.MovementTrackerService.java
org.hopto.mjancola.utility.Converter.java
org.hopto.mjancola.utility.MySQLiteHelper.java
org.hopto.mjancola.utility.SettingsHelper.java
org.hopto.mjancola.utility.WorkoutDAO.java
org.hopto.mjancola.utility.WorkoutDataSource.java