@@ -0,0 +1,1707 @@
+// Copyright 2019 Google LLC%0A//%0A// Licensed under the Apache License, Version 2.0 (the %22License%22);%0A// you may not use this file except in compliance with the License.%0A// You may obtain a copy of the License at%0A//%0A//     https://www.apache.org/licenses/LICENSE-2.0%0A//%0A// Unless required by applicable law or agreed to in writing, software%0A// distributed under the License is distributed on an %22AS IS%22 BASIS,%0A// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A// See the License for the specific language governing permissions and%0A// limitations under the License.%0A%0Apackage com.google.sps.data;%0A%0Aimport com.google.appengine.api.datastore.Entity;%0A%0A/**%0A * A class to make a Trip type, containing%0A * a specific id, destinations, interests and routes %0A * to be used when updating a trip.%0A */%0Apublic final class Trip%7B%0A%0A  private long id;%0A  private final ArrayList%3CString%3E destinations;%0A  private final ArrayList%3CString%3E interests;%0A  private final ArrayList%3CString%3E route;%0A%0A  public Trip(long id, ArrayList%3CString%3E destinations) %7B%0A    this.id = id;%0A    this.destinations = destinations;%0A    this.interests = null;%0A    this.route = null;%0A  %7D%0A%0A  public void setInterestsFor(long id, ArrayList%3CString%3E interests)%7B%0A    if(this.id == id) %7B%0A      this.interests = interests;%0A    %7D else %7B%0A      // Indicate illegal action somehow?%0A      return;%0A    %7D%0A  %7D%0A%0A  public void setRouteFor(long id, ArrayList%3CString%3E route) %7B%0A    if(this.id == id) %7B%0A      this.route = route;%0A    %7D else %7B%0A      // Indicate illegal action somehow?%0A      return;%0A    %7D%0A  %7D%0A%0A  public ArrayList%3CString%3E getInterests() %7B%0A      return this.interests;%0A  %7D%0A%0A  public ArrayList%3CString%3E getRoute() %7B%0A      return this.route;%0A  %7D%0A%7D 

Make Trip class to use throughout servlets