| /* |
| * Copyright 2010 Google Inc. |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| * use this file except in compliance with the License. You may obtain a copy of |
| * the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| * License for the specific language governing permissions and limitations under |
| * the License. |
| */ |
| package com.google.gwt.sample.expenses.shared; |
| |
| import com.google.gwt.user.client.ui.HasValue; |
| import com.google.gwt.user.client.ui.HasValueList; |
| import com.google.gwt.valuestore.shared.DeltaValueStore; |
| import com.google.gwt.valuestore.shared.Property; |
| import com.google.gwt.valuestore.shared.ValueStore; |
| import com.google.gwt.valuestore.shared.Values; |
| |
| import java.util.Set; |
| |
| /** |
| * "Generated" factory for requests against com.google.gwt.sample.expenses.domain. |
| * <p> |
| * IRL would be an interface that was generated by a JPA-savvy script, and the |
| * following implementation would in turn be generated by a call to |
| * GWT.create(ExpenseRequestFactory.class) |
| */ |
| public class ExpenseRequestFactory { |
| private final ValueStore values = new ValueStore() { |
| |
| public void addValidation() { |
| // TODO Auto-generated method stub |
| } |
| |
| public DeltaValueStore edit() { |
| // TODO Auto-generated method stub |
| return null; |
| } |
| public <T, V> void subscribe(HasValue<V> watcher, T propertyOwner, |
| Property<T, V> property) { |
| // TODO Auto-generated method stub |
| } |
| |
| public <T, V> void subscribe(HasValueList<Values<T>> watcher, |
| T propertyOwner, Set<Property<T, ?>> properties) { |
| // TODO Auto-generated method stub |
| } |
| |
| }; |
| |
| public EmployeeRequests employeeRequest() { |
| return new EmployeeRequests(values); |
| } |
| |
| public EmployeeRequests employeeRequest(DeltaValueStore deltas) { |
| return new EmployeeRequests(deltas); |
| } |
| |
| public ValueStore getValueStore() { |
| return values; |
| } |
| |
| public DeltaValueStore newDeltaStore() { |
| return values.edit(); |
| } |
| } |