Package com.bestfit.shared

Examples of com.bestfit.shared.Bridge


      }
    });
  }

  public void getUserMeals() {
    Bridge msg = new Bridge();
    msg.startDate = new Date();
    rpc.getUserMeals(msg, new AsyncCallback<Bridge>() {

      @Override
      public void onSuccess(Bridge result) {
View Full Code Here


  }

  public void getUserWorkout() {

    Bridge msg = new Bridge();
    msg.startDate = new Date();
    rpc.getUserWorkouts(msg, new AsyncCallback<Bridge>() {

      @Override
      public void onSuccess(Bridge result) {
View Full Code Here

 
  public Bridge getUserProfile() throws IllegalArgumentException {
    UserService userService = UserServiceFactory.getUserService();
    User user = userService.getCurrentUser();

    Bridge _msg = new Bridge();

    if (user != null) {

      PersistenceManager pm = getPersistenceManager();
View Full Code Here

           
            btnNewButton.setEnabled(false);
           
            Date currentTime = new Date();
           
            Bridge msg = new Bridge();
            msg.targetWeight = Double.valueOf(textBox_1.getValue());
            msg.startDate = currentTime;
            msg.targetDate = dateBox.getValue();
           
            rpc.storeGoal(msg, new AsyncCallback<String>() {
View Full Code Here

      e.printStackTrace();
    }
  }

  public void getUserMeals() {
    Bridge msg = new Bridge();
    msg.startDate = new Date(0);
    rpc.getUserMeals(msg, new AsyncCallback<Bridge>() {
      public void onFailure(Throwable caught) {
        MealsListFlexTable.setText(0, 0,
            "There are no meals to display.");
View Full Code Here

      }
    });
  }

  public void getUserWorkouts() {
    Bridge msg = new Bridge();
    msg.startDate = new Date(0);
    rpc.getUserWorkouts(msg, new AsyncCallback<Bridge>() {
      public void onFailure(Throwable caught) {
        WorkoutsListFlexTable.setText(0, 0,
            "There are no workouts to display.");
View Full Code Here

      }
    });
  }

  private void saveUserMeal() {
    Bridge msg = new Bridge();
    msg.meal = newMeal;
    rpc.saveUserMeal(msg, new AsyncCallback<Boolean>() {
      public void onFailure(Throwable caught) {
        Window.alert("Failed to save meal (communication error).");
        Window.Location.reload();
View Full Code Here

      }
    });
  }

  private void saveUserWorkout() {
    Bridge msg = new Bridge();
    msg.workout = newWorkout;
    rpc.saveUserWorkout(msg, new AsyncCallback<Boolean>() {
      public void onFailure(Throwable caught) {
        Window.alert("Your workout could not be saved (communication error).");
        Window.Location.reload();
View Full Code Here

    }
   
  }
 
    private void saveFoodItem(FoodItem item) {
      Bridge msg = new Bridge();
      msg.foodItem = item;
      rpc.saveFoodItem(msg, new AsyncCallback<Boolean>() {
        public void onFailure(Throwable caught) {}

        public void onSuccess(Boolean result) {}
View Full Code Here

      saveExerciseItem(items[i]);
    }
   
  }
  private void saveExerciseItem(ExerciseItem item) {
    Bridge msg = new Bridge();
    msg.exercise = item;
    rpc.saveExerciseItem(msg, new AsyncCallback<Boolean>() {
      public void onFailure(Throwable caught) {}

      public void onSuccess(Boolean result) {}
View Full Code Here

TOP

Related Classes of com.bestfit.shared.Bridge

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.