|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface User
Method Summary | |
---|---|
void |
addUserChangeListener(UserChangeListener l)
Add a listener for user change events. |
void |
addUserMetrics(java.util.Date date,
UserMetrics metrics)
Add a new set of metrics for a particular date. |
void |
addUserMetrics(UserMetrics metrics)
Add a new set of metrics for the current time. |
java.lang.Integer |
getAge()
Get the user's age |
java.util.Date |
getBirthDate()
Get the user's birthdate |
java.lang.Double |
getHeightInCM()
Get the user's height in cm |
java.lang.String |
getName()
Get the name of the user. |
Target |
getTarget(NutrientInfo nutrient)
Get the target value for a particular nutrient. |
java.util.List |
getUserMetrics()
Get a List of all user metrics. |
java.util.List |
getUserMetrics(java.util.Date date)
Get a List of all user metrics for a given day. |
java.lang.String |
getUserPreference(java.lang.String prefName)
This gets a user preference by name. |
boolean |
isFemale()
Get the gender of the user. |
boolean |
isMale()
Get the gender of the user. |
void |
removeUserChangeListener(UserChangeListener l)
Remove a listener for user change events. |
void |
removeUserMetrics(UserMetrics metrics)
Remove a set of user metrics from the database. |
void |
setBirthDate(java.util.Date date)
Set the user's birthdate |
void |
setGender(boolean male)
Set the gender of the user |
void |
setHeightInCM(java.lang.Double height)
Set the user's height in cm |
void |
setName(java.lang.String name)
Set the name of the user |
void |
setTarget(NutrientInfo nutrient,
Target target)
Set a target value for a particular NutrientInfo. |
void |
setUserPreference(java.lang.String prefName,
java.lang.String value)
Sets the value of a user preference. |
Method Detail |
---|
java.lang.String getName()
void setName(java.lang.String name)
name
- boolean isMale()
boolean isFemale()
void setGender(boolean male)
male
- true
if the user is male, false
otherwise.java.util.Date getBirthDate()
void setBirthDate(java.util.Date date)
date
- java.lang.Integer getAge()
java.lang.Double getHeightInCM()
void setHeightInCM(java.lang.Double height)
height
- java.lang.String getUserPreference(java.lang.String prefName)
prefName
- the ID of the preference.
void setUserPreference(java.lang.String prefName, java.lang.String value)
CRONConfiguration
. In the case where
the value is not legal, this method will silently fail.
prefName
- Tne ID of the preference.value
- The new value for the preference.java.util.List getUserMetrics()
List
of all user metrics. These are the values that the user
is tracking.
List
containing UserMetrics
objects for each
date the user has a metric for.java.util.List getUserMetrics(java.util.Date date)
List
of all user metrics for a given day. The day in the
Date
provided will be used to select them.
date
- The date to search for metrics from.
void addUserMetrics(java.util.Date date, UserMetrics metrics)
date
- metrics
- void addUserMetrics(UserMetrics metrics)
metrics
- void removeUserMetrics(UserMetrics metrics)
metrics
- void setTarget(NutrientInfo nutrient, Target target)
nutrient
- target
- Target getTarget(NutrientInfo nutrient)
nutrient
-
void addUserChangeListener(UserChangeListener l)
l
- the listener.void removeUserChangeListener(UserChangeListener l)
l
- the listener.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |