com.fitbit.api.common.model.foods
Class FoodLog

java.lang.Object
  extended by com.fitbit.api.common.model.foods.FoodLog

public class FoodLog
extends Object

User: gkutlu Date: Jul 24, 2010 Time: 1:55:43 AM


Field Summary
protected  boolean isFavorite
           
protected  LoggedFood loggedFood
           
protected  long logId
           
protected  NutritionalValues nutritionalValues
           
 
Constructor Summary
FoodLog(org.json.JSONObject json)
           
FoodLog(long logId, LoggedFood loggedFood, NutritionalValues nutritionalValues, boolean favorite)
           
FoodLog(long logId, LoggedFood loggedFood, NutritionalValues nutritionalValues, boolean favorite, org.joda.time.LocalDate logDate)
           
 
Method Summary
static List<FoodLog> constructFoodlogList(Response res)
           
static List<FoodLog> constructFoodLogList(Response res, String arrayName)
           
 String getLogDate()
           
 LoggedFood getLoggedFood()
           
 long getLogId()
           
 NutritionalValues getNutritionalValues()
           
 boolean isFavorite()
           
 org.joda.time.LocalDate logDate()
          Returns the log date if it is set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logId

protected final long logId

loggedFood

protected final LoggedFood loggedFood

nutritionalValues

protected final NutritionalValues nutritionalValues

isFavorite

protected final boolean isFavorite
Constructor Detail

FoodLog

public FoodLog(long logId,
               LoggedFood loggedFood,
               NutritionalValues nutritionalValues,
               boolean favorite)

FoodLog

public FoodLog(long logId,
               LoggedFood loggedFood,
               NutritionalValues nutritionalValues,
               boolean favorite,
               org.joda.time.LocalDate logDate)

FoodLog

public FoodLog(org.json.JSONObject json)
        throws org.json.JSONException
Throws:
org.json.JSONException
Method Detail

constructFoodlogList

public static List<FoodLog> constructFoodlogList(Response res)
                                          throws FitbitAPIException
Throws:
FitbitAPIException

constructFoodLogList

public static List<FoodLog> constructFoodLogList(Response res,
                                                 String arrayName)
                                          throws FitbitAPIException
Throws:
FitbitAPIException

getLogId

public final long getLogId()

getLoggedFood

public final LoggedFood getLoggedFood()

getNutritionalValues

public final NutritionalValues getNutritionalValues()

isFavorite

public final boolean isFavorite()

logDate

public org.joda.time.LocalDate logDate()
Returns the log date if it is set. Throws an exception if it is not set.

Typically, the API will not return the log date when the request narrows the log date to a single value. This is the case, e.g., when the list of logged resources on a given date is requested.

Returns:
the log date if it is set.
Throws:
UnsupportedOperationException - if parsing is not supported

getLogDate

public String getLogDate()


Copyright © 2012. All Rights Reserved.