var model = new Goal({id: 123}); model.fetch(); console.log(model.toJSON());
/** * @deprecated Use Reference#setResource(IBaseResource) instead */ @Deprecated public Goal addGoalTarget() { Goal r = new Goal(); if (this.goalTarget == null) this.goalTarget = new ArrayList<Goal>(); this.goalTarget.add(r); return r; }
/** * @deprecated Use Reference#setResource(IBaseResource) instead */ @Deprecated public Goal addGoalTarget() { Goal r = new Goal(); if (this.goalTarget == null) this.goalTarget = new ArrayList<Goal>(); this.goalTarget.add(r); return r; }
String json = new Gson().toJson(new Goal()); File file = new File(path); RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"), file); // MultipartBody.Part is used to send also the actual file name MultipartBody.Part body = MultipartBody.Part.createFormData("picture", file.getName(), requestFile); // add another part within the multipart request RequestBody jsonBody= RequestBody.create( MediaType.parse("multipart/form-data"), json); Retrofit retrofit = new Retrofit.Builder() .baseUrl(url) .addConverterFactory(GsonConverterFactory.create()) .build(); RestApi api = retrofit.create(RestApi.class); Call<ResponseBody> call = api.upload(jsonBody, body); call.enqueue(new Callback<ResponseBody>() { @Override public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) { Log.d("onResponse: ", "success"); } @Override public void onFailure(Call<ResponseBody> call, Throwable t) { Log.d("onFailure: ", t.getLocalizedMessage()); } });
Goal goal=new Goal(); goal.setGoal_name("Goal Name:- "+planGoals.getString("goal_name"));
public Goal copy() { Goal dst = new Goal(); copyValues(dst); if (identifier != null) {
return new MessageDefinition(); if ("Goal".equals(name)) return new Goal(); if ("Endpoint".equals(name)) return new Endpoint();
case 1260711798: return new FamilyMemberHistory(); case 2192268: return new Flag(); case 2224947: return new Goal(); case -180371167: return new GraphDefinition(); case 69076575: return new Group();