Reviewers: rchandia,

Description:
A SupportValidation class  to make it easy to define a PRC method so
so Hibernate ConstraintViolations are allowed to be serialized.

Review by: [email protected]

Please review this at http://gwt-code-reviews.appspot.com/1443810/

Affected files:
  M user/src/org/hibernate/validator/HibernateValidator.gwt.xml
  A user/src/org/hibernate/validator/engine/ValidationSupport.java


Index: user/src/org/hibernate/validator/HibernateValidator.gwt.xml
===================================================================
--- user/src/org/hibernate/validator/HibernateValidator.gwt.xml (revision 10241) +++ user/src/org/hibernate/validator/HibernateValidator.gwt.xml (working copy)
@@ -11,6 +11,7 @@
   </source>
   <source path="engine">
     <include name="ConstraintViolationImpl*.java"/>
+    <include name="ValidationSupport.java"/>
     <include name="NodeImpl.java"/>
     <include name="PathImpl*.java"/>
   </source>
Index: user/src/org/hibernate/validator/engine/ValidationSupport.java
===================================================================
--- user/src/org/hibernate/validator/engine/ValidationSupport.java (revision 0) +++ user/src/org/hibernate/validator/engine/ValidationSupport.java (revision 0)
@@ -0,0 +1,36 @@
+// Copyright 2011 Google Inc. All Rights Reserved.
+
+package org.hibernate.validator.engine;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+import java.util.HashSet;
+
+/**
+ * Exposes Hibernate Validator Implementation Classes so they can be serialized.
+ * <p>
+ * Create a dummy method like the following in your RemoteService
+ *
+ * <pre>
+ * org.hibernate.validator.engine.ValidationSupport dummy();
+ * </pre>
+ *
+ * The following classes are included.
+ * <ul>
+ * <li>{@link ConstraintViolationImpl}</li>
+ * <li>{@link PathImpl}</li>
+ * <li>{@link HashSet}</li>
+ * </ul>
+ *
+ */
+public class ValidationSupport implements IsSerializable {
+
+  @SuppressWarnings("unused")
+  private ConstraintViolationImpl<?> constraintViolationImpl;
+
+  @SuppressWarnings("unused")
+  private PathImpl pathIpml;
+
+  @SuppressWarnings("unused")
+  private HashSet<?> hashSet;
+}


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to