Rename RequestObject->Request and pull the 'with' method into it
Fix various warnings
Review at http://gwt-code-reviews.appspot.com/909801
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@8839 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java b/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java
index ad3e35c..0cf012c 100644
--- a/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java
+++ b/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java
@@ -25,7 +25,7 @@
import com.google.gwt.requestfactory.client.RequestFactoryEditorDriver;
import com.google.gwt.requestfactory.shared.ProxyRequest;
import com.google.gwt.requestfactory.shared.Receiver;
-import com.google.gwt.requestfactory.shared.RequestObject;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.Violation;
import com.google.gwt.sample.dynatablerf.client.events.EditPersonEvent;
import com.google.gwt.sample.dynatablerf.client.widgets.PersonEditor;
@@ -105,7 +105,7 @@
@UiHandler("save")
void onSave(@SuppressWarnings("unused") ClickEvent e) {
// MOVE TO ACTIVITY END
- final RequestObject<Void> request = editorDriver.<Void> flush();
+ final Request<Void> request = editorDriver.<Void> flush();
if (editorDriver.hasErrors()) {
dialog.setText("Errors detected locally");
return;
diff --git a/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/DynaTableRequestFactory.java b/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/DynaTableRequestFactory.java
index a6700fe..c76996c 100644
--- a/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/DynaTableRequestFactory.java
+++ b/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/DynaTableRequestFactory.java
@@ -19,8 +19,8 @@
import com.google.gwt.requestfactory.shared.LoggingRequest;
import com.google.gwt.requestfactory.shared.ProxyListRequest;
import com.google.gwt.requestfactory.shared.ProxyRequest;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.RequestFactory;
-import com.google.gwt.requestfactory.shared.RequestObject;
import com.google.gwt.requestfactory.shared.Service;
import com.google.gwt.sample.dynatablerf.domain.Address;
import com.google.gwt.sample.dynatablerf.domain.Person;
@@ -40,7 +40,7 @@
ProxyRequest<AddressProxy> findAddress(String id);
@Instance
- RequestObject<Void> persist(AddressProxy person);
+ Request<Void> persist(AddressProxy person);
}
/**
@@ -51,7 +51,7 @@
ProxyRequest<PersonProxy> findPerson(String id);
@Instance
- RequestObject<Void> persist(PersonProxy person);
+ Request<Void> persist(PersonProxy person);
}
/**
@@ -59,7 +59,7 @@
*/
@Service(SchoolCalendarService.class)
interface SchoolCalendarRequest {
- // TODO(amitmanjhi, cromwellian) RequestObject<List<PersonProxy>>
+ // TODO(amitmanjhi, cromwellian) Request<List<PersonProxy>>
ProxyListRequest<PersonProxy> getPeople(int startIndex, int maxCount);
}
diff --git a/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseDetails.java b/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseDetails.java
index 51fd6f0..783f24d 100644
--- a/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseDetails.java
+++ b/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseDetails.java
@@ -43,7 +43,7 @@
import com.google.gwt.requestfactory.shared.EntityProxyChange;
import com.google.gwt.requestfactory.shared.EntityProxyId;
import com.google.gwt.requestfactory.shared.Receiver;
-import com.google.gwt.requestfactory.shared.RequestObject;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.safehtml.client.SafeHtmlTemplates;
import com.google.gwt.safehtml.shared.SafeHtml;
@@ -947,7 +947,7 @@
setNotesEditState(false, true, pendingNotes);
// Submit the delta.
- RequestObject<Void> editRequest = expensesRequestFactory.reportRequest().persist(
+ Request<Void> editRequest = expensesRequestFactory.reportRequest().persist(
report);
ReportProxy editableReport = editRequest.edit(report);
editableReport.setNotes(pendingNotes);
@@ -1027,7 +1027,7 @@
}
// Create a delta and sync with the value store.
- RequestObject<Void> editRequest = expensesRequestFactory.expenseRequest().persist(
+ Request<Void> editRequest = expensesRequestFactory.expenseRequest().persist(
record);
ExpenseProxy editableRecord = editRequest.edit(record);
editableRecord.setApproval(approval);
diff --git a/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileExpenseEntry.java b/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileExpenseEntry.java
index a4ad739..00004a5 100644
--- a/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileExpenseEntry.java
+++ b/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileExpenseEntry.java
@@ -18,9 +18,8 @@
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
-import com.google.gwt.requestfactory.shared.ProxyListRequest;
import com.google.gwt.requestfactory.shared.Receiver;
-import com.google.gwt.requestfactory.shared.RequestObject;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.sample.expenses.client.request.ExpenseProxy;
import com.google.gwt.sample.expenses.client.request.ExpensesRequestFactory;
import com.google.gwt.sample.expenses.client.request.ReportProxy;
@@ -55,7 +54,7 @@
private ExpenseProxy expense;
private final ExpensesRequestFactory requestFactory;
private final Listener listener;
- private RequestObject<Void> requestObject;
+ private Request<Void> Request;
public MobileExpenseEntry(Listener listener,
ExpensesRequestFactory requestFactory) {
@@ -75,8 +74,8 @@
public void create(ReportProxy report) {
expense = requestFactory.create(ExpenseProxy.class);
- requestObject = requestFactory.expenseRequest().persist(expense);
- ExpenseProxy editableExpense = requestObject.edit(expense);
+ Request = requestFactory.expenseRequest().persist(expense);
+ ExpenseProxy editableExpense = Request.edit(expense);
editableExpense.setReport(report);
displayExpense();
}
@@ -102,8 +101,8 @@
@SuppressWarnings("deprecation")
public void onCustom() {
- requestObject = requestFactory.expenseRequest().persist(expense);
- ExpenseProxy editableExpense = requestObject.edit(expense);
+ Request = requestFactory.expenseRequest().persist(expense);
+ ExpenseProxy editableExpense = Request.edit(expense);
editableExpense.setDescription(nameText.getText());
editableExpense.setCategory(categoryText.getText());
@@ -121,7 +120,7 @@
editableExpense.setCreated(date);
// TODO: wait throbber
- requestObject.fire(new Receiver<Void>() {
+ Request.fire(new Receiver<Void>() {
@Override
public void onSuccess(Void ignore) {
}
diff --git a/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileReportEntry.java b/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileReportEntry.java
index 3ec2fae..a359b4c 100644
--- a/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileReportEntry.java
+++ b/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileReportEntry.java
@@ -19,7 +19,7 @@
import com.google.gwt.dom.client.Element;
import com.google.gwt.requestfactory.shared.Receiver;
-import com.google.gwt.requestfactory.shared.RequestObject;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.sample.expenses.client.request.EmployeeProxy;
import com.google.gwt.sample.expenses.client.request.ExpensesRequestFactory;
import com.google.gwt.sample.expenses.client.request.ReportProxy;
@@ -59,7 +59,7 @@
private ReportProxy report;
private final ExpensesRequestFactory requestFactory;
private final Listener listener;
- private RequestObject<Void> requestObject;
+ private Request<Void> Request;
public MobileReportEntry(Listener listener,
ExpensesRequestFactory requestFactory) {
@@ -83,8 +83,8 @@
public void create(EmployeeProxy reporter) {
report = requestFactory.create(ReportProxy.class);
- requestObject = requestFactory.reportRequest().persist(report);
- ReportProxy editableReport = requestObject.edit(report);
+ Request = requestFactory.reportRequest().persist(report);
+ ReportProxy editableReport = Request.edit(report);
editableReport.setReporter(reporter);
displayReport();
}
@@ -110,7 +110,7 @@
@SuppressWarnings("deprecation")
public void onCustom() {
- ReportProxy editableReport = requestObject.edit(report);
+ ReportProxy editableReport = Request.edit(report);
editableReport.setPurpose(purposeText.getText());
editableReport.setNotes(notesText.getText());
editableReport.setDepartment(departmentList.getValue(departmentList.getSelectedIndex()));
@@ -121,7 +121,7 @@
editableReport.setCreated(date);
// TODO: wait throbber
- requestObject.fire(new Receiver<Void>() {
+ Request.fire(new Receiver<Void>() {
@Override
public void onSuccess(Void ignore) {
}
diff --git a/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/EmployeeRequest.java b/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/EmployeeRequest.java
index 2a9a13d..cc3afaf 100644
--- a/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/EmployeeRequest.java
+++ b/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/EmployeeRequest.java
@@ -19,7 +19,7 @@
import com.google.gwt.requestfactory.shared.ProxyListRequest;
import com.google.gwt.requestfactory.shared.ProxyRequest;
-import com.google.gwt.requestfactory.shared.RequestObject;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.Service;
import com.google.gwt.sample.expenses.server.domain.Employee;
@@ -36,12 +36,12 @@
/**
* @return a request object
*/
- RequestObject<Long> countEmployees();
+ Request<Long> countEmployees();
/**
* @return a request object
*/
- RequestObject<Long> countEmployeesByDepartment(
+ Request<Long> countEmployeesByDepartment(
String department);
/**
@@ -70,11 +70,11 @@
* @return a request object
*/
@Instance
- RequestObject<Void> persist(EmployeeProxy record);
+ Request<Void> persist(EmployeeProxy record);
/**
* @return a request object
*/
@Instance
- RequestObject<Void> remove(EmployeeProxy record);
+ Request<Void> remove(EmployeeProxy record);
}
diff --git a/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ExpenseRequest.java b/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ExpenseRequest.java
index 6b1b7d6..76da8a1 100644
--- a/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ExpenseRequest.java
+++ b/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ExpenseRequest.java
@@ -18,7 +18,7 @@
import com.google.gwt.requestfactory.shared.Instance;
import com.google.gwt.requestfactory.shared.ProxyListRequest;
import com.google.gwt.requestfactory.shared.ProxyRequest;
-import com.google.gwt.requestfactory.shared.RequestObject;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.Service;
import com.google.gwt.sample.expenses.server.domain.Expense;
@@ -51,12 +51,12 @@
* @return a request object
*/
@Instance
- RequestObject<Void> persist(ExpenseProxy record);
+ Request<Void> persist(ExpenseProxy record);
/**
* @return a request object
*/
@Instance
- RequestObject<Void> remove(ExpenseProxy record);
+ Request<Void> remove(ExpenseProxy record);
}
diff --git a/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ReportRequest.java b/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ReportRequest.java
index 62c4c78..4c8acee 100644
--- a/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ReportRequest.java
+++ b/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ReportRequest.java
@@ -18,7 +18,7 @@
import com.google.gwt.requestfactory.shared.Instance;
import com.google.gwt.requestfactory.shared.ProxyListRequest;
import com.google.gwt.requestfactory.shared.ProxyRequest;
-import com.google.gwt.requestfactory.shared.RequestObject;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.Service;
import com.google.gwt.sample.expenses.server.domain.Report;
@@ -35,12 +35,12 @@
/**
* @return a request object
*/
- RequestObject<Long> countReports();
+ Request<Long> countReports();
/**
* @return a request object
*/
- RequestObject<Long> countReportsBySearch(Long employeeId,
+ Request<Long> countReportsBySearch(Long employeeId,
String department, String startsWith);
/**
@@ -75,11 +75,11 @@
* @return a request object
*/
@Instance
- RequestObject<Void> persist(ReportProxy record);
+ Request<Void> persist(ReportProxy record);
/**
* @return a request object
*/
@Instance
- RequestObject<Void> remove(ReportProxy record);
+ Request<Void> remove(ReportProxy record);
}
diff --git a/user/src/com/google/gwt/app/place/AbstractProxyEditActivity.java b/user/src/com/google/gwt/app/place/AbstractProxyEditActivity.java
index 99d6678..aa98381 100644
--- a/user/src/com/google/gwt/app/place/AbstractProxyEditActivity.java
+++ b/user/src/com/google/gwt/app/place/AbstractProxyEditActivity.java
@@ -21,8 +21,8 @@
import com.google.gwt.requestfactory.shared.EntityProxyId;
import com.google.gwt.requestfactory.shared.ProxyRequest;
import com.google.gwt.requestfactory.shared.Receiver;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.RequestFactory;
-import com.google.gwt.requestfactory.shared.RequestObject;
import com.google.gwt.requestfactory.shared.ServerFailure;
import com.google.gwt.requestfactory.shared.Violation;
import com.google.gwt.user.client.Window;
@@ -45,7 +45,7 @@
public abstract class AbstractProxyEditActivity<P extends EntityProxy>
implements Activity, ProxyEditView.Delegate {
- private RequestObject<Void> requestObject;
+ private Request<Void> request;
private final boolean creating;
private final ProxyEditView<P> view;
@@ -73,7 +73,7 @@
String unsavedChangesWarning = mayStop();
if ((unsavedChangesWarning == null)
|| Window.confirm(unsavedChangesWarning)) {
- requestObject = null;
+ request = null;
exit(false);
}
}
@@ -87,7 +87,7 @@
}
public String mayStop() {
- if (requestObject != null && requestObject.isChanged()) {
+ if (request != null && request.isChanged()) {
return "Are you sure you want to abandon your changes?";
}
@@ -103,13 +103,13 @@
}
public void saveClicked() {
- assert requestObject != null;
- if (!requestObject.isChanged()) {
+ assert request != null;
+ if (!request.isChanged()) {
return;
}
view.setEnabled(false);
- requestObject.fire(new Receiver<Void>() {
+ request.fire(new Receiver<Void>() {
@Override
public void onFailure(ServerFailure error) {
view.setEnabled(true);
@@ -177,7 +177,7 @@
}
}
- protected abstract RequestObject<Void> getPersistRequest(P record);
+ protected abstract Request<Void> getPersistRequest(P record);
@SuppressWarnings("unchecked")
private EntityProxyId<P> cast(EntityProxyId<?> stableId) {
@@ -185,8 +185,8 @@
}
private void doStart(final AcceptsOneWidget display, P record) {
- requestObject = getPersistRequest(record);
- P editableRecord = requestObject.edit(record);
+ request = getPersistRequest(record);
+ P editableRecord = request.edit(record);
view.setEnabled(true);
view.setValue(editableRecord);
view.showErrors(null);
diff --git a/user/src/com/google/gwt/requestfactory/client/RequestFactoryEditorDriver.java b/user/src/com/google/gwt/requestfactory/client/RequestFactoryEditorDriver.java
index 76d629f..0a9d48e 100644
--- a/user/src/com/google/gwt/requestfactory/client/RequestFactoryEditorDriver.java
+++ b/user/src/com/google/gwt/requestfactory/client/RequestFactoryEditorDriver.java
@@ -18,8 +18,8 @@
import com.google.gwt.editor.client.Editor;
import com.google.gwt.editor.client.EditorError;
import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.RequestFactory;
-import com.google.gwt.requestfactory.shared.RequestObject;
import com.google.gwt.requestfactory.shared.Violation;
import java.util.List;
@@ -39,7 +39,7 @@
* MyRFED instance = GWT.create(MyRFED.class);
* {
* instance.initialize(.....);
- * myRequestObject.with(instance.getPaths());
+ * myRequest.with(instance.getPaths());
*
* // Fire the request, in the callback
* instance.edit(retrievedRecord);
@@ -61,18 +61,18 @@
/**
* Initialize the Editor and its sub-editors with data.
*/
- void edit(P proxy, RequestObject<?> saveRequest);
+ void edit(P proxy, Request<?> saveRequest);
/**
* Ensures that the Editor passed into {@link #initialize} and its
* sub-editors, if any, have synced their UI state by invoking flushing them
* in a depth-first manner.
*
- * @return the RequestObject passed into {@link #edit}
- * @throws IllegalStateException if {@link #edit(Object, RequestObject)} has
- * not been called with a non-null {@link RequestObject}
+ * @return the Request passed into {@link #edit}
+ * @throws IllegalStateException if {@link #edit(Object, Request)} has
+ * not been called with a non-null {@link Request}
*/
- <T> RequestObject<T> flush();
+ <T> Request<T> flush();
/**
* Returns any unconsumed EditorErrors from the last call to {@link #flush()}.
@@ -99,7 +99,7 @@
/**
* This or {@link #initialize(EventBus, RequestFactory, Editor)} must be
- * called before {@link #edit(Object, RequestObject)}.
+ * called before {@link #edit(Object, Request)}.
*/
void initialize(RequestFactory requestFactory, E editor);
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractBigDecimalRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractBigDecimalRequest.java
index 4dde8b1..ae36e6e 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractBigDecimalRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractBigDecimalRequest.java
@@ -24,8 +24,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestFactory.RequestObject
- * RequestFactory.RequestObject} for requests that return BigDecimal.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return BigDecimal.
*/
public abstract class AbstractBigDecimalRequest extends
AbstractPrimitiveRequest<BigDecimal, AbstractBigDecimalRequest> {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractBigIntegerRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractBigIntegerRequest.java
index 7a5b80e..8792711 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractBigIntegerRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractBigIntegerRequest.java
@@ -25,8 +25,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestFactory.RequestObject
- * RequestFactory.RequestObject} for requests that return BigInteger.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return BigInteger.
*/
public abstract class AbstractBigIntegerRequest extends
AbstractPrimitiveRequest<BigInteger, AbstractBigIntegerRequest> {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractBooleanRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractBooleanRequest.java
index 7008629..6b35b2f 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractBooleanRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractBooleanRequest.java
@@ -22,8 +22,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestFactory.RequestObject
- * RequestFactory.RequestObject} for requests that return Boolean.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return Boolean.
*/
public abstract class AbstractBooleanRequest extends
AbstractPrimitiveRequest<Boolean, AbstractBooleanRequest> {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractByteRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractByteRequest.java
index 273c0b8..4573d21 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractByteRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractByteRequest.java
@@ -22,8 +22,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestFactory.RequestObject
- * RequestFactory.RequestObject} for requests that return Byte.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return Byte.
*/
public abstract class AbstractByteRequest extends
AbstractPrimitiveRequest<Byte, AbstractByteRequest> {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractCharacterRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractCharacterRequest.java
index 3769a93..ff0943d 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractCharacterRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractCharacterRequest.java
@@ -22,8 +22,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestFactory.RequestObject
- * RequestFactory.RequestObject} for requests that return Character.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return Character.
*/
public abstract class AbstractCharacterRequest extends
AbstractPrimitiveRequest<Character, AbstractCharacterRequest> {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractDateRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractDateRequest.java
index 8d2bc8c..f5dd561 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractDateRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractDateRequest.java
@@ -24,8 +24,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestFactory.RequestObject
- * RequestFactory.RequestObject} for requests that return Date.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return Date.
*/
public abstract class AbstractDateRequest extends
AbstractPrimitiveRequest<Date, AbstractDateRequest> {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractDoubleRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractDoubleRequest.java
index 64c8598..f200f72 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractDoubleRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractDoubleRequest.java
@@ -22,8 +22,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestObject
- * RequestFactory.RequestObject} for requests that return Double.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return Double.
*/
public abstract class AbstractDoubleRequest extends
AbstractPrimitiveRequest<Double, AbstractDoubleRequest> {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractEnumRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractEnumRequest.java
index 58f66bf..6c672d4 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractEnumRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractEnumRequest.java
@@ -22,8 +22,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestFactory.RequestObject
- * RequestFactory.RequestObject} for requests that return Enum types.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return Enum types.
*
* @param <E> an enum type
*/
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractFloatRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractFloatRequest.java
index ee5dd7c..85932c0 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractFloatRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractFloatRequest.java
@@ -22,8 +22,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestFactory.RequestObject
- * RequestFactory.RequestObject} for requests that return Float.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return Float.
*/
public abstract class AbstractFloatRequest extends
AbstractPrimitiveRequest<Float, AbstractFloatRequest> {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractIntegerRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractIntegerRequest.java
index d3f62bd..bc2d96b 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractIntegerRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractIntegerRequest.java
@@ -22,8 +22,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestObject
- * RequestFactory.RequestObject} for requests that return Integer.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return Integer.
*/
public abstract class AbstractIntegerRequest extends
AbstractPrimitiveRequest<Integer, AbstractIntegerRequest> {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonListRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonListRequest.java
index 5529107..43e604d 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonListRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonListRequest.java
@@ -30,9 +30,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestObject
- * RequestFactory.RequestObject} for requests that return lists of
- * {@link EntityProxy}.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return lists of {@link EntityProxy}.
*
* @param <T> the type of entities returned
* @param <R> this request type
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonObjectRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonObjectRequest.java
index 74822e6..90b5412 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonObjectRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonObjectRequest.java
@@ -20,12 +20,15 @@
import com.google.gwt.requestfactory.shared.ProxyRequest;
/**
- * <p> <span style="color:red">Experimental API: This class is still under rapid
+ * <p>
+ * <span style="color:red">Experimental API: This class is still under rapid
* development, and is very likely to be deleted. Use it at your own risk.
- * </span> </p> Abstract implementation of {@link com.google.gwt.requestfactory.shared.RequestObject
- * RequestFactory.RequestObject} for requests that return single instances of
- * {@link EntityProxy}.
- *
+ * </span>
+ * </p>
+ * Abstract implementation of
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return single instances of {@link EntityProxy}.
+ *
* @param <T> the type of entities returned
* @param <R> this request type
*/
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonValueListRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonValueListRequest.java
index 38b2905..8752153 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonValueListRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractJsonValueListRequest.java
@@ -18,7 +18,7 @@
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
-import com.google.gwt.requestfactory.shared.RequestObject;
+import com.google.gwt.requestfactory.shared.Request;
import java.math.BigDecimal;
import java.math.BigInteger;
@@ -39,7 +39,7 @@
public abstract class //
AbstractJsonValueListRequest<T> //
extends AbstractRequest<Collection<T>, AbstractJsonValueListRequest<T>>
- implements RequestObject<Collection<T>> {
+ implements Request<Collection<T>> {
static Object decodeValueType(Class<?> valueType, String value,
Enum[] enumValues) {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractLongRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractLongRequest.java
index 8d4a075..01d1483 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractLongRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractLongRequest.java
@@ -22,8 +22,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestObject
- * RequestFactory.RequestObject} for requests that return Long.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return Long.
*/
public abstract class AbstractLongRequest extends
AbstractPrimitiveRequest<Long, AbstractLongRequest> {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractPrimitiveRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractPrimitiveRequest.java
index cb01886..5a22473 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractPrimitiveRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractPrimitiveRequest.java
@@ -22,8 +22,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestFactory.RequestObject
- * RequestFactory.RequestObject} for requests that return non-record types.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return non-record types.
*
* @param <T> return type
* @param <R> type of this request object
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractRequest.java
index e69398d..1c9a93f 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractRequest.java
@@ -22,7 +22,7 @@
import com.google.gwt.requestfactory.shared.EntityProxy;
import com.google.gwt.requestfactory.shared.EntityProxyId;
import com.google.gwt.requestfactory.shared.Receiver;
-import com.google.gwt.requestfactory.shared.RequestObject;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.ServerFailure;
import com.google.gwt.requestfactory.shared.Violation;
import com.google.gwt.requestfactory.shared.impl.Property;
@@ -41,14 +41,14 @@
* development, and is very likely to be deleted. Use it at your own risk.
* </span>
* </p>
- * Abstract implementation of {@link RequestObject}. Each request stores a
+ * Abstract implementation of {@link Request}. Each request stores a
* {@link DeltaValueStoreJsonImpl}.
*
* @param <T> return type
* @param <R> type of this request object
*/
public abstract class AbstractRequest<T, R extends AbstractRequest<T, R>>
- implements RequestObject<T> {
+ implements Request<T> {
protected final RequestFactoryJsonImpl requestFactory;
protected DeltaValueStoreJsonImpl deltaValueStore;
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractRequestFactoryEditorDriver.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractRequestFactoryEditorDriver.java
index 9f65da8..bd6ff87 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractRequestFactoryEditorDriver.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractRequestFactoryEditorDriver.java
@@ -22,8 +22,8 @@
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.requestfactory.client.RequestFactoryEditorDriver;
import com.google.gwt.requestfactory.shared.EntityProxy;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.RequestFactory;
-import com.google.gwt.requestfactory.shared.RequestObject;
import com.google.gwt.requestfactory.shared.Violation;
import java.util.ArrayList;
@@ -54,13 +54,13 @@
private List<EditorError> errors;
private List<String> paths = new ArrayList<String>();
private RequestFactory requestFactory;
- private RequestObject<?> saveRequest;
+ private Request<?> saveRequest;
public void display(R object) {
edit(object, null);
}
- public void edit(R object, RequestObject<?> saveRequest) {
+ public void edit(R object, Request<?> saveRequest) {
checkEditor();
this.saveRequest = saveRequest;
delegate = createDelegate();
@@ -69,14 +69,14 @@
delegateMap.put(object, delegate);
}
- public <T> RequestObject<T> flush() {
+ public <T> Request<T> flush() {
checkDelegate();
checkSaveRequest();
errors = new ArrayList<EditorError>();
delegate.flush(errors);
@SuppressWarnings("unchecked")
- RequestObject<T> toReturn = (RequestObject<T>) saveRequest;
+ Request<T> toReturn = (Request<T>) saveRequest;
return toReturn;
}
@@ -172,7 +172,7 @@
private void checkSaveRequest() {
if (saveRequest == null) {
throw new IllegalStateException(
- "edit() was called with a null RequestObject");
+ "edit() was called with a null Request");
}
}
}
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractShortRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractShortRequest.java
index de9b64d..fb35900 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractShortRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractShortRequest.java
@@ -22,8 +22,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestFactory.RequestObject
- * RequestFactory.RequestObject} for requests that return Short.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return Short.
*/
public abstract class AbstractShortRequest extends
AbstractPrimitiveRequest<Short, AbstractShortRequest> {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractStringRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractStringRequest.java
index 71fd807..9fa993b 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractStringRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractStringRequest.java
@@ -22,8 +22,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestFactory.RequestObject
- * RequestFactory.RequestObject} for requests that return String.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return String.
*/
public abstract class AbstractStringRequest extends
AbstractPrimitiveRequest<String, AbstractStringRequest> {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/AbstractVoidRequest.java b/user/src/com/google/gwt/requestfactory/client/impl/AbstractVoidRequest.java
index 214138a..679537c 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/AbstractVoidRequest.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/AbstractVoidRequest.java
@@ -22,8 +22,8 @@
* </span>
* </p>
* Abstract implementation of
- * {@link com.google.gwt.requestfactory.shared.RequestObject
- * RequestFactory.RequestObject} for requests that return Void.
+ * {@link com.google.gwt.requestfactory.shared.Request Request} for requests
+ * that return Void.
*/
public abstract class AbstractVoidRequest extends
AbstractPrimitiveRequest<Void, AbstractVoidRequest> {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/ClientRequestHelper.java b/user/src/com/google/gwt/requestfactory/client/impl/ClientRequestHelper.java
index 49c1823..0a1305e 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/ClientRequestHelper.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/ClientRequestHelper.java
@@ -56,10 +56,10 @@
}
public static String getRequestString(Map<String, String> requestData) {
- MyJSO requestObject = MyJSO.create();
+ MyJSO request = MyJSO.create();
for (String key : requestData.keySet()) {
- requestObject.put(key, requestData.get(key));
+ request.put(key, requestData.get(key));
}
- return requestObject.toJsonString();
+ return request.toJsonString();
}
}
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImpl.java b/user/src/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImpl.java
index 26e864a..fb58077 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImpl.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImpl.java
@@ -35,7 +35,7 @@
* </span>
* </p>
* Accumulates the local edits, made in the context of a
- * {@link com.google.gwt.requestfactory.shared.RequestObject}.
+ * {@link com.google.gwt.requestfactory.shared.Request}.
*
*/
class DeltaValueStoreJsonImpl {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/FindRequestObjectImpl.java b/user/src/com/google/gwt/requestfactory/client/impl/FindRequestObjectImpl.java
index 68707a0..9cff83f 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/FindRequestObjectImpl.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/FindRequestObjectImpl.java
@@ -19,7 +19,7 @@
import com.google.gwt.requestfactory.shared.EntityProxyId;
/**
- * Abstract implementation of {@link AbstractJsonRequestObject} for special find
+ * Abstract implementation of {@link AbstractJsonObjectRequest} for special find
* methods that return single instances of {@link EntityProxy}.
*/
public abstract class FindRequestObjectImpl extends
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/ProxyImpl.java b/user/src/com/google/gwt/requestfactory/client/impl/ProxyImpl.java
index 9e1d0f8..3f4d24b 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/ProxyImpl.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/ProxyImpl.java
@@ -70,6 +70,10 @@
return jso;
}
+ public String encodedId() {
+ return jso.encodedId();
+ }
+
/**
* Get this proxy's value for the given property. Behavior is undefined if
* the proxy has no such property, or if the property has never been set. It
@@ -80,10 +84,6 @@
* @param property the property to fetch
* @return the value
*/
- public String encodedId() {
- return jso.encodedId();
- }
-
@SuppressWarnings("unchecked")
public <V> V get(Property<V> property) {
if (property instanceof CollectionProperty) {
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryEditorDelegate.java b/user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryEditorDelegate.java
index b7a5741..43ae59a 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryEditorDelegate.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryEditorDelegate.java
@@ -24,8 +24,8 @@
import com.google.gwt.requestfactory.shared.EntityProxyChange;
import com.google.gwt.requestfactory.shared.EntityProxyId;
import com.google.gwt.requestfactory.shared.Receiver;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.RequestFactory;
-import com.google.gwt.requestfactory.shared.RequestObject;
import com.google.gwt.requestfactory.shared.WriteOperation;
import java.util.ArrayList;
@@ -74,12 +74,12 @@
protected EventBus eventBus;
protected RequestFactory factory;
- protected RequestObject<?> request;
+ protected Request<?> request;
@Override
public P ensureMutable(P object) {
if (request == null) {
- throw new IllegalStateException("No RequestObject");
+ throw new IllegalStateException("No Request");
} else if (object instanceof EntityProxy) {
@SuppressWarnings("unchecked")
P toReturn = (P) request.edit(((EntityProxy) object));
@@ -92,7 +92,7 @@
public void initialize(EventBus eventBus, RequestFactory factory,
String pathSoFar, P object, E editor, DelegateMap delegateMap,
- RequestObject<?> editRequest) {
+ Request<?> editRequest) {
this.eventBus = eventBus;
this.factory = factory;
this.request = editRequest;
diff --git a/user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryJsonImpl.java b/user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryJsonImpl.java
index 4e542a9..4fa03b3 100644
--- a/user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryJsonImpl.java
+++ b/user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryJsonImpl.java
@@ -20,8 +20,8 @@
import com.google.gwt.requestfactory.shared.EntityProxy;
import com.google.gwt.requestfactory.shared.EntityProxyId;
import com.google.gwt.requestfactory.shared.ProxyRequest;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.RequestFactory;
-import com.google.gwt.requestfactory.shared.RequestObject;
import com.google.gwt.requestfactory.shared.RequestTransport;
import com.google.gwt.requestfactory.shared.ServerFailure;
import com.google.gwt.requestfactory.shared.WriteOperation;
@@ -105,7 +105,7 @@
return findRequest().find(proxyId);
}
- public void fire(RequestObject<?> requestObject) {
+ public void fire(Request<?> requestObject) {
final AbstractRequest<?, ?> abstractRequest = (AbstractRequest<?, ?>) requestObject;
RequestData requestData = ((AbstractRequest<?, ?>) requestObject).getRequestData();
Map<String, String> requestMap = requestData.getRequestMap(abstractRequest.deltaValueStore.toJson());
diff --git a/user/src/com/google/gwt/requestfactory/client/testing/MockRequestFactoryEditorDriver.java b/user/src/com/google/gwt/requestfactory/client/testing/MockRequestFactoryEditorDriver.java
index cc5b6a9..b93c716 100644
--- a/user/src/com/google/gwt/requestfactory/client/testing/MockRequestFactoryEditorDriver.java
+++ b/user/src/com/google/gwt/requestfactory/client/testing/MockRequestFactoryEditorDriver.java
@@ -19,8 +19,8 @@
import com.google.gwt.editor.client.EditorError;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.requestfactory.client.RequestFactoryEditorDriver;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.RequestFactory;
-import com.google.gwt.requestfactory.shared.RequestObject;
import com.google.gwt.requestfactory.shared.Violation;
import java.util.Collections;
@@ -40,7 +40,7 @@
private EventBus eventBus;
private E editor;
private P proxy;
- private RequestObject<?> saveRequest;
+ private Request<?> saveRequest;
private RequestFactory requestFactory;
/**
@@ -53,7 +53,7 @@
/**
* Records its arguments.
*/
- public void edit(P proxy, RequestObject<?> saveRequest) {
+ public void edit(P proxy, Request<?> saveRequest) {
this.proxy = proxy;
this.saveRequest = saveRequest;
}
@@ -62,8 +62,8 @@
* Returns <code>null</code> or the last value recorded.
*/
@SuppressWarnings("unchecked")
- public <T> RequestObject<T> flush() {
- return (RequestObject<T>) saveRequest;
+ public <T> Request<T> flush() {
+ return (Request<T>) saveRequest;
}
/**
@@ -111,7 +111,7 @@
/**
* Returns <code>null</code> or the last value recorded.
*/
- public RequestObject<?> getSaveRequest() {
+ public Request<?> getSaveRequest() {
return saveRequest;
}
diff --git a/user/src/com/google/gwt/requestfactory/server/ReflectionBasedOperationRegistry.java b/user/src/com/google/gwt/requestfactory/server/ReflectionBasedOperationRegistry.java
index 8398f08..f485425 100644
--- a/user/src/com/google/gwt/requestfactory/server/ReflectionBasedOperationRegistry.java
+++ b/user/src/com/google/gwt/requestfactory/server/ReflectionBasedOperationRegistry.java
@@ -18,7 +18,7 @@
import com.google.gwt.requestfactory.shared.ProxyFor;
import com.google.gwt.requestfactory.shared.Instance;
import com.google.gwt.requestfactory.shared.EntityProxy;
-import com.google.gwt.requestfactory.shared.RequestObject;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.Service;
import java.lang.reflect.Method;
@@ -123,7 +123,7 @@
ParameterizedType pType = (ParameterizedType) type;
Class<?> rawType = (Class<?>) pType.getRawType();
if (List.class.isAssignableFrom(rawType)
- || RequestObject.class.isAssignableFrom(rawType)) {
+ || Request.class.isAssignableFrom(rawType)) {
Class<?> rType = getTypeArgument(pType);
if (rType != null) {
if (List.class.isAssignableFrom(rType)) {
@@ -135,7 +135,7 @@
"Bad or missing type arguments for "
+ "List return type on method " + method);
} else if (Set.class.isAssignableFrom(rawType)
- || RequestObject.class.isAssignableFrom(rawType)) {
+ || Request.class.isAssignableFrom(rawType)) {
Class<?> rType = getTypeArgument(pType);
if (rType != null) {
if (Set.class.isAssignableFrom(rType)) {
@@ -200,8 +200,8 @@
Class<?> domainClass = domainClassAnnotation.value();
Method requestMethod = findMethod(requestClass, domainMethodName);
Method domainMethod = findMethod(domainClass, domainMethodName);
- boolean isInstance = (requestMethod.getAnnotation(Instance.class) != null);
if (requestMethod != null && domainMethod != null) {
+ boolean isInstance = (requestMethod.getAnnotation(Instance.class) != null);
if (isInstance == Modifier.isStatic(domainMethod.getModifiers())) {
throw new IllegalArgumentException("domain method " + domainMethod
+ " and interface method " + requestMethod
diff --git a/user/src/com/google/gwt/requestfactory/server/SampleDataPopulator.java b/user/src/com/google/gwt/requestfactory/server/SampleDataPopulator.java
index 5885b8f..01ce4b1 100644
--- a/user/src/com/google/gwt/requestfactory/server/SampleDataPopulator.java
+++ b/user/src/com/google/gwt/requestfactory/server/SampleDataPopulator.java
@@ -86,8 +86,8 @@
}
@SuppressWarnings("deprecation")
- private void postJsonFile(JSONObject contentData) throws HttpException,
- IOException, JSONException {
+ private void postJsonFile(JSONObject contentData) throws IOException,
+ JSONException {
HttpPost post = new HttpPost(url);
JSONObject request = new JSONObject();
request.put(RequestData.OPERATION_TOKEN, "DOESNT_WORK");
diff --git a/user/src/com/google/gwt/requestfactory/shared/EntityProxy.java b/user/src/com/google/gwt/requestfactory/shared/EntityProxy.java
index c633ec4..7d9a824 100644
--- a/user/src/com/google/gwt/requestfactory/shared/EntityProxy.java
+++ b/user/src/com/google/gwt/requestfactory/shared/EntityProxy.java
@@ -31,8 +31,9 @@
Integer getVersion();
/**
- * Subtypes should override to declare they return a stable id of their own type,
- * to allow type safe use of the request objects returned by {@link RequestFactory#find(EntityProxyId)}
+ * Subtypes should override to declare they return a stable id of their own
+ * type, to allow type safe use of the request objects returned by
+ * {@link RequestFactory#find(EntityProxyId)}.
*
* @return {@link EntityProxyId} that is stable across changes.
*/
diff --git a/user/src/com/google/gwt/requestfactory/shared/LoggingRequest.java b/user/src/com/google/gwt/requestfactory/shared/LoggingRequest.java
index 4c3ea33..49cb8e1 100644
--- a/user/src/com/google/gwt/requestfactory/shared/LoggingRequest.java
+++ b/user/src/com/google/gwt/requestfactory/shared/LoggingRequest.java
@@ -31,6 +31,6 @@
* Log a message on the server. Will return empty string if there is no error
* or an error message if there is a problem.
*/
- RequestObject<String> logMessage(String serializedLogRecordString);
+ Request<String> logMessage(String serializedLogRecordString);
}
diff --git a/user/src/com/google/gwt/requestfactory/shared/ProxyListRequest.java b/user/src/com/google/gwt/requestfactory/shared/ProxyListRequest.java
index dc16bf5..cc2fdcf 100644
--- a/user/src/com/google/gwt/requestfactory/shared/ProxyListRequest.java
+++ b/user/src/com/google/gwt/requestfactory/shared/ProxyListRequest.java
@@ -20,13 +20,13 @@
/**
* <p> <span style="color:red">Experimental API: This class is still under rapid
* development, and is very likely to be deleted. Use it at your own risk.
- * </span> </p> Implemented by RequestObjects for service methods that return
+ * </span> </p> Implemented by Request objects for service methods that return
* lists of records.
*
* @param <P> The type held by the returned list
*/
public interface ProxyListRequest<P extends EntityProxy>
- extends RequestObject<List<P>> {
+ extends Request<List<P>> {
ProxyListRequest<P> with(String... propertyRefs);
}
diff --git a/user/src/com/google/gwt/requestfactory/shared/ProxyRequest.java b/user/src/com/google/gwt/requestfactory/shared/ProxyRequest.java
index 87b1d0d..e0b8e59 100644
--- a/user/src/com/google/gwt/requestfactory/shared/ProxyRequest.java
+++ b/user/src/com/google/gwt/requestfactory/shared/ProxyRequest.java
@@ -27,7 +27,5 @@
* @param <P> return type
*/
public interface ProxyRequest<P extends EntityProxy> extends
- RequestObject<P> {
-
- ProxyRequest<P> with(String... propertyRefs);
+ Request<P> {
}
diff --git a/user/src/com/google/gwt/requestfactory/shared/ProxySetRequest.java b/user/src/com/google/gwt/requestfactory/shared/ProxySetRequest.java
index 2b42fa3..6def4a9 100644
--- a/user/src/com/google/gwt/requestfactory/shared/ProxySetRequest.java
+++ b/user/src/com/google/gwt/requestfactory/shared/ProxySetRequest.java
@@ -26,7 +26,5 @@
* @param <P> The type held by the returned Set
*/
public interface ProxySetRequest<P extends EntityProxy>
- extends RequestObject<Set<P>> {
-
- ProxySetRequest<P> with(String... propertyRefs);
+ extends Request<Set<P>> {
}
diff --git a/user/src/com/google/gwt/requestfactory/shared/Receiver.java b/user/src/com/google/gwt/requestfactory/shared/Receiver.java
index 8e031d8..7d89ca4 100644
--- a/user/src/com/google/gwt/requestfactory/shared/Receiver.java
+++ b/user/src/com/google/gwt/requestfactory/shared/Receiver.java
@@ -43,7 +43,7 @@
}
/**
- * Called when a RequestObject has been successfully executed on the server.
+ * Called when a Request has been successfully executed on the server.
*/
public abstract void onSuccess(V response);
diff --git a/user/src/com/google/gwt/requestfactory/shared/RequestObject.java b/user/src/com/google/gwt/requestfactory/shared/Request.java
similarity index 94%
rename from user/src/com/google/gwt/requestfactory/shared/RequestObject.java
rename to user/src/com/google/gwt/requestfactory/shared/Request.java
index 5c31f92..b18b8ae 100644
--- a/user/src/com/google/gwt/requestfactory/shared/RequestObject.java
+++ b/user/src/com/google/gwt/requestfactory/shared/Request.java
@@ -25,7 +25,7 @@
*
* @param <T> The return type of objects in the corresponding response.
*/
-public interface RequestObject<T> {
+public interface Request<T> {
/**
* @return an editable version of the given {@link EntityProxy}
@@ -43,4 +43,6 @@
* after a request using it has been fired.
*/
boolean isChanged();
+
+ Request<T> with(String... propertyRefs);
}
diff --git a/user/src/com/google/gwt/requestfactory/shared/impl/CollectionProperty.java b/user/src/com/google/gwt/requestfactory/shared/impl/CollectionProperty.java
index d8ad50b..69ca68b 100644
--- a/user/src/com/google/gwt/requestfactory/shared/impl/CollectionProperty.java
+++ b/user/src/com/google/gwt/requestfactory/shared/impl/CollectionProperty.java
@@ -26,7 +26,7 @@
* @param <C> the type of the Container, must be List or Set
* @param <E> the type of the element the container contains
*/
-public class CollectionProperty<C extends Collection, E> extends Property<C> {
+public class CollectionProperty<C extends Collection<?>, E> extends Property<C> {
private Class<E> leafType;
diff --git a/user/src/com/google/gwt/requestfactory/shared/impl/Property.java b/user/src/com/google/gwt/requestfactory/shared/impl/Property.java
index 82c3fe8..e81adf3 100644
--- a/user/src/com/google/gwt/requestfactory/shared/impl/Property.java
+++ b/user/src/com/google/gwt/requestfactory/shared/impl/Property.java
@@ -51,15 +51,19 @@
@Override
public boolean equals(Object o) {
- if (this == o)
+ if (this == o) {
return true;
- if (!(o instanceof Property))
+ }
+ if (!(o instanceof Property<?>)) {
return false;
- Property property = (Property) o;
- if (name != null ? !name.equals(property.name) : property.name != null)
+ }
+ Property<?> property = (Property<?>) o;
+ if (name != null ? !name.equals(property.name) : property.name != null) {
return false;
- if (type != null ? !type.equals(property.type) : property.type != null)
+ }
+ if (type != null ? !type.equals(property.type) : property.type != null) {
return false;
+ }
return true;
}
@@ -74,4 +78,11 @@
public Class<V> getType() {
return type;
}
+
+ @Override
+ public int hashCode() {
+ int nameHash = name == null ? 0 : name.hashCode();
+ int typeHash = type == null ? 0 : type.hashCode();
+ return (nameHash * 31) ^ typeHash;
+ }
}
diff --git a/user/src/com/google/gwt/requestfactory/shared/impl/RequestData.java b/user/src/com/google/gwt/requestfactory/shared/impl/RequestData.java
index 1d26333..7ebf74e 100644
--- a/user/src/com/google/gwt/requestfactory/shared/impl/RequestData.java
+++ b/user/src/com/google/gwt/requestfactory/shared/impl/RequestData.java
@@ -50,10 +50,9 @@
public static final String ENCODED_ID_PROPERTY = "!id";
/**
- * Id property that server entity objects are required to define
+ * Id property that server entity objects are required to define.
*/
public static final String ENTITY_ID_PROPERTY = "id";
-
// TODO: non-final is a hack for now.
private final String operation;
diff --git a/user/src/com/google/gwt/validation/rebind/ValidatorCreator.java b/user/src/com/google/gwt/validation/rebind/ValidatorCreator.java
index e70ea59..e64949c 100644
--- a/user/src/com/google/gwt/validation/rebind/ValidatorCreator.java
+++ b/user/src/com/google/gwt/validation/rebind/ValidatorCreator.java
@@ -46,6 +46,7 @@
// stash the map in a ThreadLocal, since each GWT module lives in its own
// thread in DevMode
private static final ThreadLocal<Map<JClassType, BeanHelper>> threadLocalHelperMap = new ThreadLocal<Map<JClassType, BeanHelper>>() {
+ @Override
protected synchronized Map<JClassType, BeanHelper> initialValue() {
return new HashMap<JClassType, BeanHelper>();
}
diff --git a/user/test/com/google/gwt/app/place/impl/PlaceHistoryMapperGeneratorTest.java b/user/test/com/google/gwt/app/place/impl/PlaceHistoryMapperGeneratorTest.java
index 51ba94e..c85a244 100644
--- a/user/test/com/google/gwt/app/place/impl/PlaceHistoryMapperGeneratorTest.java
+++ b/user/test/com/google/gwt/app/place/impl/PlaceHistoryMapperGeneratorTest.java
@@ -37,7 +37,7 @@
* Functional test of PlaceHistoryMapperGenerator.
*/
public class PlaceHistoryMapperGeneratorTest extends GWTTestCase {
- @WithTokenizers( {
+ @WithTokenizers({
Place1.Tokenizer.class, Tokenizer2.class, Tokenizer3.class,
Tokenizer4.class})
interface LocalNoFactory extends PlaceHistoryMapper {
diff --git a/user/test/com/google/gwt/app/place/testplacemappers/NoFactory.java b/user/test/com/google/gwt/app/place/testplacemappers/NoFactory.java
index 9a7f803..6c36148 100644
--- a/user/test/com/google/gwt/app/place/testplacemappers/NoFactory.java
+++ b/user/test/com/google/gwt/app/place/testplacemappers/NoFactory.java
@@ -25,7 +25,7 @@
/**
* Used by tests of {@link com.google.gwt.app.rebind.PlaceHistoryMapperGenerator}.
*/
-@WithTokenizers( {
+@WithTokenizers({
Place1.Tokenizer.class, Tokenizer2.class, Tokenizer3.class,
Tokenizer4.class})
public interface NoFactory extends PlaceHistoryMapper {
diff --git a/user/test/com/google/gwt/editor/rebind/model/EditorModelTest.java b/user/test/com/google/gwt/editor/rebind/model/EditorModelTest.java
index bdb1139..b5b360e 100644
--- a/user/test/com/google/gwt/editor/rebind/model/EditorModelTest.java
+++ b/user/test/com/google/gwt/editor/rebind/model/EditorModelTest.java
@@ -39,8 +39,8 @@
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.requestfactory.client.RequestFactoryEditorDriver;
import com.google.gwt.requestfactory.shared.EntityProxy;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.RequestFactory;
-import com.google.gwt.requestfactory.shared.RequestObject;
import com.google.gwt.requestfactory.shared.Violation;
import com.google.gwt.requestfactory.shared.impl.Property;
import com.google.gwt.user.client.TakesValue;
@@ -777,7 +777,7 @@
new EmptyMockJavaResource(EntityProxy.class),
new EmptyMockJavaResource(RequestFactory.class),
new RealJavaResource(RequestFactoryEditorDriver.class),
- new EmptyMockJavaResource(RequestObject.class),
+ new EmptyMockJavaResource(Request.class),
new RealJavaResource(SimpleEditor.class),
new RealJavaResource(TakesValue.class),
new EmptyMockJavaResource(ValueAwareEditor.class),
diff --git a/user/test/com/google/gwt/requestfactory/client/FindServiceTest.java b/user/test/com/google/gwt/requestfactory/client/FindServiceTest.java
index 41eee52..0a59821 100644
--- a/user/test/com/google/gwt/requestfactory/client/FindServiceTest.java
+++ b/user/test/com/google/gwt/requestfactory/client/FindServiceTest.java
@@ -20,7 +20,6 @@
import com.google.gwt.requestfactory.shared.SimpleBarProxy;
import com.google.gwt.requestfactory.shared.SimpleFooProxy;
-
/**
* Tests for {@link com.google.gwt.requestfactory.shared.RequestFactory}.
*/
diff --git a/user/test/com/google/gwt/requestfactory/client/RequestFactoryExceptionHandlerTest.java b/user/test/com/google/gwt/requestfactory/client/RequestFactoryExceptionHandlerTest.java
index 93976f9..ef2f6fb 100644
--- a/user/test/com/google/gwt/requestfactory/client/RequestFactoryExceptionHandlerTest.java
+++ b/user/test/com/google/gwt/requestfactory/client/RequestFactoryExceptionHandlerTest.java
@@ -16,7 +16,7 @@
package com.google.gwt.requestfactory.client;
import com.google.gwt.requestfactory.shared.Receiver;
-import com.google.gwt.requestfactory.shared.RequestObject;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.ServerFailure;
import com.google.gwt.requestfactory.shared.SimpleFooProxy;
import com.google.gwt.requestfactory.shared.Violation;
@@ -39,7 +39,7 @@
delayTestFinish(5000);
SimpleFooProxy rayFoo = req.create(SimpleFooProxy.class);
- final RequestObject<SimpleFooProxy> persistRay = req.simpleFooRequest().persistAndReturnSelf(
+ final Request<SimpleFooProxy> persistRay = req.simpleFooRequest().persistAndReturnSelf(
rayFoo);
rayFoo = persistRay.edit(rayFoo);
// 42 is the crash causing magic number
@@ -60,6 +60,7 @@
fail("Failure expected but onViolation() was called");
}
+ @Override
public void onSuccess(SimpleFooProxy response) {
fail("Failure expected but onSuccess() was called");
}
diff --git a/user/test/com/google/gwt/requestfactory/client/RequestFactoryStringTest.java b/user/test/com/google/gwt/requestfactory/client/RequestFactoryStringTest.java
index 18aaa45..0471e02 100644
--- a/user/test/com/google/gwt/requestfactory/client/RequestFactoryStringTest.java
+++ b/user/test/com/google/gwt/requestfactory/client/RequestFactoryStringTest.java
@@ -17,7 +17,7 @@
import com.google.gwt.requestfactory.client.impl.ProxyImpl;
import com.google.gwt.requestfactory.shared.Receiver;
-import com.google.gwt.requestfactory.shared.RequestObject;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.ServerFailure;
import com.google.gwt.requestfactory.shared.SimpleBarProxy;
import com.google.gwt.requestfactory.shared.SimpleFooStringProxy;
@@ -37,10 +37,10 @@
private class FailFixAndRefire<T> extends Receiver<T> {
private final SimpleFooStringProxy proxy;
- private final RequestObject<T> request;
+ private final Request<T> request;
private boolean voidReturnExpected;
- FailFixAndRefire(SimpleFooStringProxy proxy, RequestObject<T> request) {
+ FailFixAndRefire(SimpleFooStringProxy proxy, Request<T> request) {
this.proxy = request.edit(proxy);
this.request = request;
}
@@ -110,7 +110,7 @@
Object futureId = foo.getId();
assertEquals(futureId, foo.getId());
assertTrue(((ProxyImpl) foo).isFuture());
- RequestObject<SimpleFooStringProxy> fooReq = req.simpleFooStringRequest().persistAndReturnSelf(
+ Request<SimpleFooStringProxy> fooReq = req.simpleFooStringRequest().persistAndReturnSelf(
foo);
fooReq.fire(new Receiver<SimpleFooStringProxy>() {
@@ -133,7 +133,7 @@
Object futureId = foo.getId();
assertEquals(futureId, foo.getId());
assertTrue(((ProxyImpl) foo).isFuture());
- RequestObject<SimpleBarProxy> fooReq = req.simpleBarRequest().persistAndReturnSelf(
+ Request<SimpleBarProxy> fooReq = req.simpleBarRequest().persistAndReturnSelf(
foo);
fooReq.fire(new Receiver<SimpleBarProxy>() {
@@ -234,7 +234,7 @@
@Override
public void onSuccess(SimpleFooStringProxy newFoo) {
- final RequestObject<Long> mutateRequest = req.simpleFooStringRequest().countSimpleFooWithUserNameSideEffect(
+ final Request<Long> mutateRequest = req.simpleFooStringRequest().countSimpleFooWithUserNameSideEffect(
newFoo);
newFoo = mutateRequest.edit(newFoo);
newFoo.setUserName("Ray");
@@ -284,7 +284,7 @@
new Receiver<SimpleFooStringProxy>() {
@Override
public void onSuccess(SimpleFooStringProxy fooProxy) {
- RequestObject<Void> updReq = req.simpleFooStringRequest().persist(
+ Request<Void> updReq = req.simpleFooStringRequest().persist(
fooProxy);
fooProxy = updReq.edit(fooProxy);
fooProxy.setBarField(barProxy);
@@ -309,7 +309,7 @@
// Make a new bar
SimpleBarProxy makeABar = req.create(SimpleBarProxy.class);
- RequestObject<SimpleBarProxy> persistRequest = req.simpleBarRequest().persistAndReturnSelf(
+ Request<SimpleBarProxy> persistRequest = req.simpleBarRequest().persistAndReturnSelf(
makeABar);
makeABar = persistRequest.edit(makeABar);
makeABar.setUserName("Amit");
@@ -325,7 +325,7 @@
public void onSuccess(SimpleFooStringProxy response) {
// Found the foo, edit it
- RequestObject<Void> fooReq = req.simpleFooStringRequest().persist(
+ Request<Void> fooReq = req.simpleFooStringRequest().persist(
response);
response = fooReq.edit(response);
response.setBarField(persistedBar);
@@ -362,7 +362,7 @@
delayTestFinish(5000);
SimpleFooStringProxy newFoo = req.create(SimpleFooStringProxy.class);
- final RequestObject<Void> fooReq = req.simpleFooStringRequest().persist(newFoo);
+ final Request<Void> fooReq = req.simpleFooStringRequest().persist(newFoo);
newFoo = fooReq.edit(newFoo);
newFoo.setUserName("Ray");
@@ -401,13 +401,13 @@
SimpleFooStringProxy newFoo = req.create(SimpleFooStringProxy.class);
SimpleBarProxy newBar = req.create(SimpleBarProxy.class);
- final RequestObject<SimpleFooStringProxy> fooReq = req.simpleFooStringRequest().persistAndReturnSelf(
+ final Request<SimpleFooStringProxy> fooReq = req.simpleFooStringRequest().persistAndReturnSelf(
newFoo);
newFoo = fooReq.edit(newFoo);
newFoo.setUserName("Ray");
- final RequestObject<SimpleBarProxy> barReq = req.simpleBarRequest().persistAndReturnSelf(
+ final Request<SimpleBarProxy> barReq = req.simpleBarRequest().persistAndReturnSelf(
newBar);
newBar = barReq.edit(newBar);
newBar.setUserName("Amit");
@@ -419,7 +419,7 @@
@Override
public void onSuccess(final SimpleBarProxy persistedBar) {
assertEquals("Ray", persistedFoo.getUserName());
- final RequestObject<Void> fooReq2 = req.simpleFooStringRequest().persist(
+ final Request<Void> fooReq2 = req.simpleFooStringRequest().persist(
persistedFoo);
SimpleFooStringProxy editablePersistedFoo = fooReq2.edit(persistedFoo);
editablePersistedFoo.setBarField(persistedBar);
@@ -447,7 +447,7 @@
delayTestFinish(5000);
SimpleFooStringProxy rayFoo = req.create(SimpleFooStringProxy.class);
- final RequestObject<SimpleFooStringProxy> persistRay = req.simpleFooStringRequest().persistAndReturnSelf(
+ final Request<SimpleFooStringProxy> persistRay = req.simpleFooStringRequest().persistAndReturnSelf(
rayFoo);
rayFoo = persistRay.edit(rayFoo);
rayFoo.setUserName("Ray");
@@ -464,7 +464,7 @@
delayTestFinish(5000);
SimpleFooStringProxy rayFoo = req.create(SimpleFooStringProxy.class);
- final RequestObject<SimpleFooStringProxy> persistRay = req.simpleFooStringRequest().persistAndReturnSelf(
+ final Request<SimpleFooStringProxy> persistRay = req.simpleFooStringRequest().persistAndReturnSelf(
rayFoo);
rayFoo = persistRay.edit(rayFoo);
rayFoo.setUserName("Ray");
@@ -473,7 +473,7 @@
@Override
public void onSuccess(final SimpleFooStringProxy persistedRay) {
SimpleBarProxy amitBar = req.create(SimpleBarProxy.class);
- final RequestObject<SimpleBarProxy> persistAmit = req.simpleBarRequest().persistAndReturnSelf(
+ final Request<SimpleBarProxy> persistAmit = req.simpleBarRequest().persistAndReturnSelf(
amitBar);
amitBar = persistAmit.edit(amitBar);
amitBar.setUserName("Amit");
@@ -482,7 +482,7 @@
@Override
public void onSuccess(SimpleBarProxy persistedAmit) {
- final RequestObject<SimpleFooStringProxy> persistRelationship = req.simpleFooStringRequest().persistAndReturnSelf(
+ final Request<SimpleFooStringProxy> persistRelationship = req.simpleFooStringRequest().persistAndReturnSelf(
persistedRay).with("barField");
SimpleFooStringProxy newRec = persistRelationship.edit(persistedRay);
newRec.setBarField(persistedAmit);
@@ -507,7 +507,7 @@
@Override
public void onSuccess(SimpleFooStringProxy response) {
SimpleBarProxy bar = req.create(SimpleBarProxy.class);
- RequestObject<String> helloReq = req.simpleFooStringRequest().hello(
+ Request<String> helloReq = req.simpleFooStringRequest().hello(
response, bar);
bar = helloReq.edit(bar);
bar.setUserName("BAR");
@@ -526,7 +526,7 @@
delayTestFinish(5000);
SimpleFooStringProxy newFoo = req.create(SimpleFooStringProxy.class);
- final RequestObject<SimpleFooStringProxy> persistRequest = req.simpleFooStringRequest().persistAndReturnSelf(
+ final Request<SimpleFooStringProxy> persistRequest = req.simpleFooStringRequest().persistAndReturnSelf(
newFoo);
final SimpleFooStringProxy mutableFoo = persistRequest.edit(newFoo);
@@ -552,6 +552,7 @@
});
}
+ @Override
public void onSuccess(SimpleFooStringProxy response) {
fail("Failure expected but onSuccess() was called");
}
@@ -569,7 +570,7 @@
final SimpleFooStringProxy foo = req.create(SimpleFooStringProxy.class);
final Object futureId = foo.getId();
assertTrue(((ProxyImpl) foo).isFuture());
- RequestObject<SimpleFooStringProxy> fooReq = req.simpleFooStringRequest().persistAndReturnSelf(
+ Request<SimpleFooStringProxy> fooReq = req.simpleFooStringRequest().persistAndReturnSelf(
foo);
final SimpleFooStringProxy newFoo = fooReq.edit(foo);
@@ -593,7 +594,7 @@
checkStableIdEquals(foo, returned);
checkStableIdEquals(newFoo, returned);
- RequestObject<SimpleFooStringProxy> editRequest = req.simpleFooStringRequest().persistAndReturnSelf(
+ Request<SimpleFooStringProxy> editRequest = req.simpleFooStringRequest().persistAndReturnSelf(
returned);
final SimpleFooStringProxy editableFoo = editRequest.edit(returned);
editableFoo.setUserName("GWT power user");
@@ -614,7 +615,7 @@
delayTestFinish(5000);
SimpleFooStringProxy newFoo = req.create(SimpleFooStringProxy.class);
- final RequestObject<Void> fooReq = req.simpleFooStringRequest().persist(newFoo);
+ final Request<Void> fooReq = req.simpleFooStringRequest().persist(newFoo);
newFoo = fooReq.edit(newFoo);
newFoo.setUserName("Amit"); // will not cause violation.
@@ -631,7 +632,7 @@
delayTestFinish(5000);
SimpleFooStringProxy newFoo = req.create(SimpleFooStringProxy.class);
- final RequestObject<SimpleFooStringProxy> create = req.simpleFooStringRequest().persistAndReturnSelf(
+ final Request<SimpleFooStringProxy> create = req.simpleFooStringRequest().persistAndReturnSelf(
newFoo);
new FailFixAndRefire<SimpleFooStringProxy>(newFoo, create).doTest();
}
@@ -640,7 +641,7 @@
delayTestFinish(5000);
SimpleFooStringProxy newFoo = req.create(SimpleFooStringProxy.class);
- final RequestObject<Void> create = req.simpleFooStringRequest().persist(newFoo);
+ final Request<Void> create = req.simpleFooStringRequest().persist(newFoo);
new FailFixAndRefire<Void>(newFoo, create).doVoidTest();
}
@@ -650,7 +651,7 @@
fooCreationRequest().fire(new Receiver<SimpleFooStringProxy>() {
@Override
public void onSuccess(SimpleFooStringProxy returned) {
- RequestObject<SimpleFooStringProxy> editRequest = req.simpleFooStringRequest().persistAndReturnSelf(
+ Request<SimpleFooStringProxy> editRequest = req.simpleFooStringRequest().persistAndReturnSelf(
returned);
new FailFixAndRefire<SimpleFooStringProxy>(returned, editRequest).doTest();
}
@@ -663,16 +664,17 @@
fooCreationRequest().fire(new Receiver<SimpleFooStringProxy>() {
@Override
public void onSuccess(SimpleFooStringProxy returned) {
- RequestObject<Void> editRequest = req.simpleFooStringRequest().persist(
+ Request<Void> editRequest = req.simpleFooStringRequest().persist(
returned);
new FailFixAndRefire<Void>(returned, editRequest).doVoidTest();
}
});
}
- private void assertCannotFire(final RequestObject<Long> mutateRequest) {
+ private void assertCannotFire(final Request<Long> mutateRequest) {
try {
mutateRequest.fire(new Receiver<Long>() {
+ @Override
public void onSuccess(Long response) {
fail("Should not be called");
}
@@ -683,9 +685,9 @@
}
}
- private RequestObject<SimpleFooStringProxy> fooCreationRequest() {
+ private Request<SimpleFooStringProxy> fooCreationRequest() {
SimpleFooStringProxy originalFoo = req.create(SimpleFooStringProxy.class);
- final RequestObject<SimpleFooStringProxy> fooReq = req.simpleFooStringRequest().persistAndReturnSelf(
+ final Request<SimpleFooStringProxy> fooReq = req.simpleFooStringRequest().persistAndReturnSelf(
originalFoo);
originalFoo = fooReq.edit(originalFoo);
originalFoo.setUserName("GWT User");
diff --git a/user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java b/user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java
index bba1180..1793b46 100644
--- a/user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java
+++ b/user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java
@@ -18,7 +18,7 @@
import com.google.gwt.requestfactory.client.impl.ProxyImpl;
import com.google.gwt.requestfactory.shared.EntityProxy;
import com.google.gwt.requestfactory.shared.Receiver;
-import com.google.gwt.requestfactory.shared.RequestObject;
+import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.ServerFailure;
import com.google.gwt.requestfactory.shared.SimpleBarProxy;
import com.google.gwt.requestfactory.shared.SimpleFooProxy;
@@ -41,10 +41,10 @@
private class FailFixAndRefire<T> extends Receiver<T> {
private final SimpleFooProxy proxy;
- private final RequestObject<T> request;
+ private final Request<T> request;
private boolean voidReturnExpected;
- FailFixAndRefire(SimpleFooProxy proxy, RequestObject<T> request) {
+ FailFixAndRefire(SimpleFooProxy proxy, Request<T> request) {
this.proxy = request.edit(proxy);
this.request = request;
}
@@ -131,7 +131,7 @@
Object futureId = foo.getId();
assertEquals(futureId, foo.getId());
assertTrue(((ProxyImpl) foo).isFuture());
- RequestObject<SimpleFooProxy> fooReq = req.simpleFooRequest().persistAndReturnSelf(
+ Request<SimpleFooProxy> fooReq = req.simpleFooRequest().persistAndReturnSelf(
foo);
fooReq.fire(new Receiver<SimpleFooProxy>() {
@@ -154,7 +154,7 @@
Object futureId = foo.getId();
assertEquals(futureId, foo.getId());
assertTrue(((ProxyImpl) foo).isFuture());
- RequestObject<SimpleBarProxy> fooReq = req.simpleBarRequest().persistAndReturnSelf(
+ Request<SimpleBarProxy> fooReq = req.simpleBarRequest().persistAndReturnSelf(
foo);
fooReq.fire(new Receiver<SimpleBarProxy>() {
@@ -284,7 +284,7 @@
@Override
public void onSuccess(SimpleFooProxy newFoo) {
- final RequestObject<Long> mutateRequest = req.simpleFooRequest().countSimpleFooWithUserNameSideEffect(
+ final Request<Long> mutateRequest = req.simpleFooRequest().countSimpleFooWithUserNameSideEffect(
newFoo);
newFoo = mutateRequest.edit(newFoo);
newFoo.setUserName("Ray");
@@ -334,7 +334,7 @@
new Receiver<SimpleFooProxy>() {
@Override
public void onSuccess(SimpleFooProxy fooProxy) {
- RequestObject<Void> updReq = req.simpleFooRequest().persist(
+ Request<Void> updReq = req.simpleFooRequest().persist(
fooProxy);
fooProxy = updReq.edit(fooProxy);
fooProxy.setBarField(barProxy);
@@ -358,7 +358,7 @@
delayTestFinish(5000);
// Make a new bar
SimpleBarProxy makeABar = req.create(SimpleBarProxy.class);
- RequestObject<SimpleBarProxy> persistRequest = req.simpleBarRequest().persistAndReturnSelf(
+ Request<SimpleBarProxy> persistRequest = req.simpleBarRequest().persistAndReturnSelf(
makeABar);
makeABar = persistRequest.edit(makeABar);
makeABar.setUserName("Amit");
@@ -374,7 +374,7 @@
public void onSuccess(SimpleFooProxy response) {
// Found the foo, edit it
- RequestObject<Void> fooReq = req.simpleFooRequest().persist(
+ Request<Void> fooReq = req.simpleFooRequest().persist(
response);
response = fooReq.edit(response);
response.setBarField(persistedBar);
@@ -411,7 +411,7 @@
delayTestFinish(5000);
SimpleFooProxy newFoo = req.create(SimpleFooProxy.class);
- final RequestObject<Void> fooReq = req.simpleFooRequest().persist(newFoo);
+ final Request<Void> fooReq = req.simpleFooRequest().persist(newFoo);
newFoo = fooReq.edit(newFoo);
newFoo.setUserName("Ray");
@@ -450,13 +450,13 @@
SimpleFooProxy newFoo = req.create(SimpleFooProxy.class);
SimpleBarProxy newBar = req.create(SimpleBarProxy.class);
- final RequestObject<SimpleFooProxy> fooReq = req.simpleFooRequest().persistAndReturnSelf(
+ final Request<SimpleFooProxy> fooReq = req.simpleFooRequest().persistAndReturnSelf(
newFoo);
newFoo = fooReq.edit(newFoo);
newFoo.setUserName("Ray");
- final RequestObject<SimpleBarProxy> barReq = req.simpleBarRequest().persistAndReturnSelf(
+ final Request<SimpleBarProxy> barReq = req.simpleBarRequest().persistAndReturnSelf(
newBar);
newBar = barReq.edit(newBar);
newBar.setUserName("Amit");
@@ -468,7 +468,7 @@
@Override
public void onSuccess(final SimpleBarProxy persistedBar) {
assertEquals("Ray", persistedFoo.getUserName());
- final RequestObject<Void> fooReq2 = req.simpleFooRequest().persist(
+ final Request<Void> fooReq2 = req.simpleFooRequest().persist(
persistedFoo);
SimpleFooProxy editablePersistedFoo = fooReq2.edit(persistedFoo);
editablePersistedFoo.setBarField(persistedBar);
@@ -501,11 +501,13 @@
req.simpleBarRequest().findSimpleBarById("999L").fire(
new Receiver<SimpleBarProxy>() {
+ @Override
public void onSuccess(final SimpleBarProxy barProxy) {
req.simpleFooRequest().findSimpleFooById(999L).with("oneToManyField").fire(
new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy fooProxy) {
- RequestObject<SimpleFooProxy> updReq =
+ Request<SimpleFooProxy> updReq =
req.simpleFooRequest().persistAndReturnSelf(
fooProxy).with("oneToManyField");
fooProxy = updReq.edit(fooProxy);
@@ -515,6 +517,7 @@
final int listCount = barProxyList.size();
barProxyList.add(barProxy);
updReq.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy response) {
assertEquals(response.getOneToManyField().size(),
listCount + 1);
@@ -532,7 +535,7 @@
delayTestFinish(5000);
SimpleFooProxy rayFoo = req.create(SimpleFooProxy.class);
- final RequestObject<SimpleFooProxy> persistRay = req.simpleFooRequest().persistAndReturnSelf(
+ final Request<SimpleFooProxy> persistRay = req.simpleFooRequest().persistAndReturnSelf(
rayFoo);
rayFoo = persistRay.edit(rayFoo);
rayFoo.setUserName("Ray");
@@ -549,7 +552,7 @@
delayTestFinish(5000);
SimpleFooProxy rayFoo = req.create(SimpleFooProxy.class);
- final RequestObject<SimpleFooProxy> persistRay = req.simpleFooRequest()
+ final Request<SimpleFooProxy> persistRay = req.simpleFooRequest()
.persistAndReturnSelf(rayFoo);
rayFoo = persistRay.edit(rayFoo);
rayFoo.setUserName("Ray");
@@ -558,7 +561,7 @@
@Override
public void onSuccess(final SimpleFooProxy persistedRay) {
SimpleBarProxy amitBar = req.create(SimpleBarProxy.class);
- final RequestObject<SimpleBarProxy> persistAmit = req.simpleBarRequest()
+ final Request<SimpleBarProxy> persistAmit = req.simpleBarRequest()
.persistAndReturnSelf(amitBar);
amitBar = persistAmit.edit(amitBar);
amitBar.setUserName("Amit");
@@ -567,7 +570,7 @@
@Override
public void onSuccess(SimpleBarProxy persistedAmit) {
- final RequestObject<SimpleFooProxy> persistRelationship = req
+ final Request<SimpleFooProxy> persistRelationship = req
.simpleFooRequest().persistAndReturnSelf(persistedRay)
.with("barField");
SimpleFooProxy newRec = persistRelationship.edit(persistedRay);
@@ -596,8 +599,9 @@
req.simpleFooRequest().findSimpleFooById(999L).with("selfOneToManyField")
.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy fooProxy) {
- RequestObject<SimpleFooProxy> updReq =
+ Request<SimpleFooProxy> updReq =
req.simpleFooRequest().persistAndReturnSelf(fooProxy).with(
"selfOneToManyField");
fooProxy = updReq.edit(fooProxy);
@@ -605,6 +609,7 @@
final int listCount = fooProxyList.size();
fooProxyList.add(fooProxy);
updReq.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy response) {
assertEquals(response.getSelfOneToManyField().size(),
listCount + 1);
@@ -625,12 +630,14 @@
delayTestFinish(5000);
req.simpleFooRequest().findSimpleFooById(999L)
.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy fooProxy) {
- RequestObject<SimpleFooProxy> updReq =
+ Request<SimpleFooProxy> updReq =
req.simpleFooRequest().persistAndReturnSelf(fooProxy);
fooProxy = updReq.edit(fooProxy);
fooProxy.getNumberListField().add(100);
updReq.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy response) {
assertTrue(response.getNumberListField().contains(100));
finishTestAndReset();
@@ -648,13 +655,15 @@
delayTestFinish(500000);
req.simpleFooRequest().findSimpleFooById(999L)
.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy fooProxy) {
- RequestObject<SimpleFooProxy> updReq =
+ Request<SimpleFooProxy> updReq =
req.simpleFooRequest().persistAndReturnSelf(fooProxy);
fooProxy = updReq.edit(fooProxy);
fooProxy.setNumberListField(null);
updReq.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy response) {
List<Integer> list = response.getNumberListField();
assertNull(list);
@@ -673,12 +682,14 @@
delayTestFinish(5000);
req.simpleFooRequest().findSimpleFooById(999L)
.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy fooProxy) {
- RequestObject<SimpleFooProxy> updReq =
+ Request<SimpleFooProxy> updReq =
req.simpleFooRequest().persistAndReturnSelf(fooProxy);
fooProxy = updReq.edit(fooProxy);
final int oldValue = fooProxy.getNumberListField().remove(0);
updReq.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy response) {
assertFalse(response.getNumberListField().contains(oldValue));
finishTestAndReset();
@@ -696,8 +707,9 @@
delayTestFinish(5000);
req.simpleFooRequest().findSimpleFooById(999L)
.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy fooProxy) {
- RequestObject<SimpleFooProxy> updReq =
+ Request<SimpleFooProxy> updReq =
req.simpleFooRequest().persistAndReturnSelf(fooProxy);
fooProxy = updReq.edit(fooProxy);
final ArrayList<Integer> al = new ArrayList<Integer>();
@@ -706,6 +718,7 @@
al.add(13);
fooProxy.setNumberListField(al);
updReq.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy response) {
List<Integer> list = response.getNumberListField();
assertEquals(5, (int) list.get(0));
@@ -726,8 +739,9 @@
delayTestFinish(5000);
req.simpleFooRequest().findSimpleFooById(999L)
.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy fooProxy) {
- RequestObject<SimpleFooProxy> updReq =
+ Request<SimpleFooProxy> updReq =
req.simpleFooRequest().persistAndReturnSelf(fooProxy);
fooProxy = updReq.edit(fooProxy);
final ArrayList<Integer> al = new ArrayList<Integer>();
@@ -735,6 +749,7 @@
al.addAll(listField);
Collections.reverse(listField);
updReq.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy response) {
Collections.reverse(al);
assertTrue(response.getNumberListField().equals(al));
@@ -753,12 +768,14 @@
delayTestFinish(5000);
req.simpleFooRequest().findSimpleFooById(999L)
.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy fooProxy) {
- RequestObject<SimpleFooProxy> updReq =
+ Request<SimpleFooProxy> updReq =
req.simpleFooRequest().persistAndReturnSelf(fooProxy);
fooProxy = updReq.edit(fooProxy);
fooProxy.getNumberListField().set(0, 10);
updReq.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy response) {
assertTrue(response.getNumberListField().get(0) == 10);
finishTestAndReset();
@@ -777,11 +794,13 @@
req.simpleBarRequest().findSimpleBarById("1L").fire(
new Receiver<SimpleBarProxy>() {
+ @Override
public void onSuccess(final SimpleBarProxy barProxy) {
req.simpleFooRequest().findSimpleFooById(999L).with("oneToManySetField").fire(
new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy fooProxy) {
- RequestObject<SimpleFooProxy> updReq =
+ Request<SimpleFooProxy> updReq =
req.simpleFooRequest().persistAndReturnSelf(
fooProxy).with("oneToManySetField");
fooProxy = updReq.edit(fooProxy);
@@ -792,6 +811,7 @@
assertContains(setField, barProxy);
setField.add(barProxy);
updReq.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy response) {
assertEquals(response.getOneToManySetField().size(),
listCount);
@@ -816,11 +836,13 @@
req.simpleBarRequest().persistAndReturnSelf(newBar).fire(
new Receiver<SimpleBarProxy>() {
+ @Override
public void onSuccess(final SimpleBarProxy barProxy) {
req.simpleFooRequest().findSimpleFooById(999L).with("oneToManySetField").fire(
new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy fooProxy) {
- RequestObject<SimpleFooProxy> updReq =
+ Request<SimpleFooProxy> updReq =
req.simpleFooRequest().persistAndReturnSelf(
fooProxy).with("oneToManySetField");
fooProxy = updReq.edit(fooProxy);
@@ -830,6 +852,7 @@
final int listCount = setField.size();
setField.add(barProxy);
updReq.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy response) {
assertEquals(listCount + 1,
response.getOneToManySetField().size());
@@ -853,11 +876,13 @@
req.simpleBarRequest().findSimpleBarById("1L").fire(
new Receiver<SimpleBarProxy>() {
+ @Override
public void onSuccess(final SimpleBarProxy barProxy) {
req.simpleFooRequest().findSimpleFooById(999L).with("oneToManySetField").fire(
new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy fooProxy) {
- RequestObject<SimpleFooProxy> updReq =
+ Request<SimpleFooProxy> updReq =
req.simpleFooRequest().persistAndReturnSelf(
fooProxy).with("oneToManySetField");
fooProxy = updReq.edit(fooProxy);
@@ -869,6 +894,7 @@
setField.remove(barProxy);
assertNotContains(setField, barProxy);
updReq.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy response) {
assertEquals(listCount - 1,
response.getOneToManySetField().size());
@@ -885,8 +911,9 @@
public void testPrimitiveList() {
delayTestFinish(5000);
- final RequestObject<List<Integer>> fooReq = req.simpleFooRequest().getNumberList();
+ final Request<List<Integer>> fooReq = req.simpleFooRequest().getNumberList();
fooReq.fire(new Receiver<List<Integer>>() {
+ @Override
public void onSuccess(List<Integer> response) {
assertEquals(3, response.size());
assertEquals(1, (int) response.get(0));
@@ -899,8 +926,9 @@
public void testPrimitiveSet() {
delayTestFinish(5000);
- final RequestObject<Set<Integer>> fooReq = req.simpleFooRequest().getNumberSet();
+ final Request<Set<Integer>> fooReq = req.simpleFooRequest().getNumberSet();
fooReq.fire(new Receiver<Set<Integer>>() {
+ @Override
public void onSuccess(Set<Integer> response) {
assertEquals(3, response.size());
assertTrue(response.contains(1));
@@ -913,8 +941,9 @@
public void testProxyList() {
delayTestFinish(5000);
- final RequestObject<SimpleFooProxy> fooReq = req.simpleFooRequest().findSimpleFooById(999L).with("oneToManyField");
+ final Request<SimpleFooProxy> fooReq = req.simpleFooRequest().findSimpleFooById(999L).with("oneToManyField");
fooReq.fire(new Receiver<SimpleFooProxy>() {
+ @Override
public void onSuccess(SimpleFooProxy response) {
assertEquals(2, response.getOneToManyField().size());
finishTestAndReset();
@@ -929,7 +958,7 @@
@Override
public void onSuccess(SimpleFooProxy response) {
SimpleBarProxy bar = req.create(SimpleBarProxy.class);
- RequestObject<String> helloReq = req.simpleFooRequest().hello(
+ Request<String> helloReq = req.simpleFooRequest().hello(
response, bar);
bar = helloReq.edit(bar);
bar.setUserName("BAR");
@@ -948,7 +977,7 @@
delayTestFinish(5000);
SimpleFooProxy newFoo = req.create(SimpleFooProxy.class);
- final RequestObject<SimpleFooProxy> persistRequest = req.simpleFooRequest().persistAndReturnSelf(
+ final Request<SimpleFooProxy> persistRequest = req.simpleFooRequest().persistAndReturnSelf(
newFoo);
final SimpleFooProxy mutableFoo = persistRequest.edit(newFoo);
@@ -974,6 +1003,7 @@
});
}
+ @Override
public void onSuccess(SimpleFooProxy response) {
fail("Failure expected but onSuccess() was called");
}
@@ -991,7 +1021,7 @@
final SimpleFooProxy foo = req.create(SimpleFooProxy.class);
final Object futureId = foo.getId();
assertTrue(((ProxyImpl) foo).isFuture());
- RequestObject<SimpleFooProxy> fooReq = req.simpleFooRequest().persistAndReturnSelf(
+ Request<SimpleFooProxy> fooReq = req.simpleFooRequest().persistAndReturnSelf(
foo);
final SimpleFooProxy newFoo = fooReq.edit(foo);
@@ -1014,7 +1044,7 @@
checkStableIdEquals(foo, returned);
checkStableIdEquals(newFoo, returned);
- RequestObject<SimpleFooProxy> editRequest = req.simpleFooRequest().persistAndReturnSelf(
+ Request<SimpleFooProxy> editRequest = req.simpleFooRequest().persistAndReturnSelf(
returned);
final SimpleFooProxy editableFoo = editRequest.edit(returned);
editableFoo.setUserName("GWT power user");
@@ -1035,7 +1065,7 @@
delayTestFinish(5000);
SimpleFooProxy newFoo = req.create(SimpleFooProxy.class);
- final RequestObject<Void> fooReq = req.simpleFooRequest().persist(newFoo);
+ final Request<Void> fooReq = req.simpleFooRequest().persist(newFoo);
newFoo = fooReq.edit(newFoo);
newFoo.setUserName("Amit"); // will not cause violation.
@@ -1052,7 +1082,7 @@
delayTestFinish(5000);
SimpleFooProxy newFoo = req.create(SimpleFooProxy.class);
- final RequestObject<SimpleFooProxy> create = req.simpleFooRequest().persistAndReturnSelf(
+ final Request<SimpleFooProxy> create = req.simpleFooRequest().persistAndReturnSelf(
newFoo);
new FailFixAndRefire<SimpleFooProxy>(newFoo, create).doTest();
}
@@ -1061,7 +1091,7 @@
delayTestFinish(5000);
SimpleFooProxy newFoo = req.create(SimpleFooProxy.class);
- final RequestObject<Void> create = req.simpleFooRequest().persist(newFoo);
+ final Request<Void> create = req.simpleFooRequest().persist(newFoo);
new FailFixAndRefire<Void>(newFoo, create).doVoidTest();
}
@@ -1071,7 +1101,7 @@
fooCreationRequest().fire(new Receiver<SimpleFooProxy>() {
@Override
public void onSuccess(SimpleFooProxy returned) {
- RequestObject<SimpleFooProxy> editRequest = req.simpleFooRequest().persistAndReturnSelf(
+ Request<SimpleFooProxy> editRequest = req.simpleFooRequest().persistAndReturnSelf(
returned);
new FailFixAndRefire<SimpleFooProxy>(returned, editRequest).doTest();
}
@@ -1084,16 +1114,17 @@
fooCreationRequest().fire(new Receiver<SimpleFooProxy>() {
@Override
public void onSuccess(SimpleFooProxy returned) {
- RequestObject<Void> editRequest = req.simpleFooRequest().persist(
+ Request<Void> editRequest = req.simpleFooRequest().persist(
returned);
new FailFixAndRefire<Void>(returned, editRequest).doVoidTest();
}
});
}
- private void assertCannotFire(final RequestObject<Long> mutateRequest) {
+ private void assertCannotFire(final Request<Long> mutateRequest) {
try {
mutateRequest.fire(new Receiver<Long>() {
+ @Override
public void onSuccess(Long response) {
fail("Should not be called");
}
@@ -1104,9 +1135,9 @@
}
}
- private RequestObject<SimpleFooProxy> fooCreationRequest() {
+ private Request<SimpleFooProxy> fooCreationRequest() {
SimpleFooProxy originalFoo = req.create(SimpleFooProxy.class);
- final RequestObject<SimpleFooProxy> fooReq = req.simpleFooRequest().persistAndReturnSelf(
+ final Request<SimpleFooProxy> fooReq = req.simpleFooRequest().persistAndReturnSelf(
originalFoo);
originalFoo = fooReq.edit(originalFoo);
originalFoo.setUserName("GWT User");
diff --git a/user/test/com/google/gwt/requestfactory/client/RequestFactoryTestBase.java b/user/test/com/google/gwt/requestfactory/client/RequestFactoryTestBase.java
index 9e13ef7..5be994b 100644
--- a/user/test/com/google/gwt/requestfactory/client/RequestFactoryTestBase.java
+++ b/user/test/com/google/gwt/requestfactory/client/RequestFactoryTestBase.java
@@ -44,6 +44,7 @@
protected void finishTestAndReset() {
final boolean[] reallyDone = {false, false, false};
req.simpleFooRequest().reset().fire(new Receiver<Void>() {
+ @Override
public void onSuccess(Void response) {
reallyDone[0] = true;
if (reallyDone[0] && reallyDone[1] && reallyDone[2]) {
@@ -52,6 +53,7 @@
}
});
req.simpleFooStringRequest().reset().fire(new Receiver<Void>() {
+ @Override
public void onSuccess(Void response) {
reallyDone[1] = true;
if (reallyDone[0] && reallyDone[1] && reallyDone[2]) {
@@ -60,6 +62,7 @@
}
});
req.simpleBarRequest().reset().fire(new Receiver<Void>() {
+ @Override
public void onSuccess(Void response) {
reallyDone[2] = true;
if (reallyDone[0] && reallyDone[1] && reallyDone[2]) {
diff --git a/user/test/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImplTest.java b/user/test/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImplTest.java
index 35b23f5..8ec80b5 100644
--- a/user/test/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImplTest.java
+++ b/user/test/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImplTest.java
@@ -77,7 +77,7 @@
public void testCreate() {
EntityProxy created = requestFactory.create(SimpleFooProxy.class);
- assertNotNull(((ProxyImpl)created).encodedId());
+ assertNotNull(((ProxyImpl) created).encodedId());
assertNotNull(created.getVersion());
DeltaValueStoreJsonImpl deltaValueStore = new DeltaValueStoreJsonImpl(
@@ -102,7 +102,7 @@
public void testCreateWithSet() {
EntityProxy created = requestFactory.create(SimpleFooProxy.class);
- assertNotNull(((ProxyImpl)created).encodedId());
+ assertNotNull(((ProxyImpl) created).encodedId());
assertNotNull(created.getVersion());
DeltaValueStoreJsonImpl deltaValueStore = new DeltaValueStoreJsonImpl(
diff --git a/user/test/com/google/gwt/requestfactory/server/JsonRequestProcessorTest.java b/user/test/com/google/gwt/requestfactory/server/JsonRequestProcessorTest.java
index a5301ee..e7f2cb8 100644
--- a/user/test/com/google/gwt/requestfactory/server/JsonRequestProcessorTest.java
+++ b/user/test/com/google/gwt/requestfactory/server/JsonRequestProcessorTest.java
@@ -309,7 +309,6 @@
return foo;
}
-
public void testPrimitiveListAsParameter() throws JSONException,
NoSuchMethodException, IllegalAccessException, InvocationTargetException,
ClassNotFoundException, SecurityException, InstantiationException {
diff --git a/user/test/com/google/gwt/requestfactory/shared/SimpleBarRequest.java b/user/test/com/google/gwt/requestfactory/shared/SimpleBarRequest.java
index 0c646c2..19888eb 100644
--- a/user/test/com/google/gwt/requestfactory/shared/SimpleBarRequest.java
+++ b/user/test/com/google/gwt/requestfactory/shared/SimpleBarRequest.java
@@ -21,7 +21,7 @@
@Service(com.google.gwt.requestfactory.server.SimpleBar.class)
public interface SimpleBarRequest {
- RequestObject<Long> countSimpleBar();
+ Request<Long> countSimpleBar();
ProxyListRequest<SimpleBarProxy> findAll();
@@ -30,10 +30,10 @@
ProxyRequest<SimpleBarProxy> findSimpleBarById(String id);
@Instance
- RequestObject<Void> persist(SimpleBarProxy proxy);
+ Request<Void> persist(SimpleBarProxy proxy);
@Instance
ProxyRequest<SimpleBarProxy> persistAndReturnSelf(SimpleBarProxy proxy);
- RequestObject<Void> reset();
+ Request<Void> reset();
}
diff --git a/user/test/com/google/gwt/requestfactory/shared/SimpleFooRequest.java b/user/test/com/google/gwt/requestfactory/shared/SimpleFooRequest.java
index 2633677..c9b6788 100644
--- a/user/test/com/google/gwt/requestfactory/shared/SimpleFooRequest.java
+++ b/user/test/com/google/gwt/requestfactory/shared/SimpleFooRequest.java
@@ -23,35 +23,35 @@
*/
@Service(com.google.gwt.requestfactory.server.SimpleFoo.class)
public interface SimpleFooRequest {
- RequestObject<Long> countSimpleFoo();
+ Request<Long> countSimpleFoo();
@Instance
- RequestObject<Long> countSimpleFooWithUserNameSideEffect(SimpleFooProxy proxy);
+ Request<Long> countSimpleFooWithUserNameSideEffect(SimpleFooProxy proxy);
ProxyListRequest<SimpleFooProxy> findAll();
ProxyRequest<SimpleFooProxy> findSimpleFooById(Long id);
- RequestObject<Integer> privateMethod();
+ Request<Integer> privateMethod();
- RequestObject<List<Integer>> getNumberList();
+ Request<List<Integer>> getNumberList();
- RequestObject<Set<Integer>> getNumberSet();
+ Request<Set<Integer>> getNumberSet();
@Instance
- RequestObject<Void> persist(SimpleFooProxy proxy);
+ Request<Void> persist(SimpleFooProxy proxy);
@Instance
ProxyRequest<SimpleFooProxy> persistAndReturnSelf(SimpleFooProxy proxy);
- RequestObject<Void> reset();
+ Request<Void> reset();
@Instance
- RequestObject<String> hello(SimpleFooProxy instance, SimpleBarProxy proxy);
+ Request<String> hello(SimpleFooProxy instance, SimpleBarProxy proxy);
@Instance
- RequestObject<Integer> sum(SimpleFooProxy instance, List<Integer> values);
+ Request<Integer> sum(SimpleFooProxy instance, List<Integer> values);
@Instance
- RequestObject<String> processList(SimpleFooProxy instance, List<SimpleFooProxy> values);
+ Request<String> processList(SimpleFooProxy instance, List<SimpleFooProxy> values);
}
diff --git a/user/test/com/google/gwt/requestfactory/shared/SimpleFooStringRequest.java b/user/test/com/google/gwt/requestfactory/shared/SimpleFooStringRequest.java
index 3851341..56e7d13 100644
--- a/user/test/com/google/gwt/requestfactory/shared/SimpleFooStringRequest.java
+++ b/user/test/com/google/gwt/requestfactory/shared/SimpleFooStringRequest.java
@@ -20,25 +20,25 @@
*/
@Service(com.google.gwt.requestfactory.server.SimpleFooString.class)
public interface SimpleFooStringRequest {
- RequestObject<Long> countSimpleFoo();
+ Request<Long> countSimpleFoo();
@Instance
- RequestObject<Long> countSimpleFooWithUserNameSideEffect(SimpleFooStringProxy proxy);
+ Request<Long> countSimpleFooWithUserNameSideEffect(SimpleFooStringProxy proxy);
ProxyListRequest<SimpleFooStringProxy> findAll();
ProxyRequest<SimpleFooStringProxy> findSimpleFooStringById(String id);
- RequestObject<Integer> privateMethod();
+ Request<Integer> privateMethod();
@Instance
- RequestObject<Void> persist(SimpleFooStringProxy proxy);
+ Request<Void> persist(SimpleFooStringProxy proxy);
@Instance
ProxyRequest<SimpleFooStringProxy> persistAndReturnSelf(SimpleFooStringProxy proxy);
- RequestObject<Void> reset();
+ Request<Void> reset();
@Instance
- RequestObject<String> hello(SimpleFooStringProxy instance, SimpleBarProxy proxy);
+ Request<String> hello(SimpleFooStringProxy instance, SimpleBarProxy proxy);
}