|
Android Mobile Physical Therapy Exercise Documenter | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.communipatient.amptedapp.data.PersistenceHelper
public class PersistenceHelper
The class that interacts with the SQLite database to make the exercise plan data persistent.
| Field Summary | |
|---|---|
private android.content.Context |
context
The context for the database. |
private MyDatabaseHelper |
helper
The helper that is used to get an instance of the database. |
| Constructor Summary | |
|---|---|
PersistenceHelper(android.content.Context context)
Initializes a new instance of the PersistenceHelper class. |
|
| Method Summary | |
|---|---|
int |
getActivePlanId()
Gets the id of the plan that is currently set as active. |
private java.util.List<Exercise> |
getExercises(int planId)
Gets the list of Exercises that belong to the specified plan. |
private java.util.List<Feedback> |
getFeedback(int exId)
The list of feedback for a given exercise. |
private java.util.List<ExerciseImage> |
getImages(int exId)
The list of Images associated with an Exercise. |
private java.util.List<ExerciseModifier> |
getModifiers(int exId)
The list of Modifiers associated with an Exercise. |
ExercisePlan |
getPlan(int planIdentifier)
Gets all of the ExercisePlans that are stored in the database. |
int |
getPlanId(java.lang.String mid)
Retrieves the requested plan id given a message identifier If the message identifier is not found, -1 will be returned. |
java.util.List<ExercisePlan> |
getPlanList()
Gets the list of exercise plans. |
ExercisePlan |
getPlanWithFeedback(int planIdentifier)
Gets all of the ExercisePlans that are stored in the database. |
long |
insert(ExercisePlan plan)
Inserts a new ExercisePlan into the database including all of the sub objects. |
long |
insert(Feedback feedback,
int exId)
Insert a new feedback entry into the database. |
void |
setPlanActive(int planId,
boolean active)
Sets the active flag for a plan. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private android.content.Context context
private MyDatabaseHelper helper
| Constructor Detail |
|---|
public PersistenceHelper(android.content.Context context)
context - The context used.| Method Detail |
|---|
public long insert(ExercisePlan plan)
plan - The ExercisePlan.
public long insert(Feedback feedback,
int exId)
feedback - The feedback.exId - The exercise identifier.
public void setPlanActive(int planId,
boolean active)
planId - The plan identifier.active - True to set as active; false for inactive.public int getActivePlanId()
public int getPlanId(java.lang.String mid)
mid - The message identifier.
public java.util.List<ExercisePlan> getPlanList()
public ExercisePlan getPlan(int planIdentifier)
planIdentifier - The id of the plan to retrieve.
public ExercisePlan getPlanWithFeedback(int planIdentifier)
planIdentifier - The id of the plan to retrieve.
private java.util.List<Exercise> getExercises(int planId)
planId - The plan identifier used as part of the query.
private java.util.List<ExerciseModifier> getModifiers(int exId)
exId - The Exercise identifier used as part of the query.
private java.util.List<ExerciseImage> getImages(int exId)
exId - The Exercise identifier used as part of the query.
private java.util.List<Feedback> getFeedback(int exId)
exId - The exercise identifier.
|
Revision: 109 Generated on Sat Dec 10 07:00:03 UTC 2011 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||