RequestFactory error management

41 views
Skip to first unread message

ungarida

unread,
Sep 26, 2011, 10:28:13 AM9/26/11
to google-we...@googlegroups.com
Hi all,
the scenario is:
- I have an ententy with its requestfatory, which manages correctly constraints violations.
- I want also to catch an "SQLException" for a duplicate key and send an error message to the client.

From documentation is specified that onFailure callback "receives general failure notifications".

So I tought that the solution could be to use onSuccess callback putting the entity inside a wrapper RequestResult object.

But Requests can be parameterized with the following types:
  • Built-in value types: BigDecimal, BigInteger, Boolean, Byte, Enum, Character, Date, Double, Float, Integer, Long, Short, String, Void
  • Custom value types: any subclass of ValueProxy
  • Entity types: any subclass of EntityProxy
  • Collections: List<T> or Set<T>, where T is one of the above value or entity types

So my RequestResult should have a proxy interface which extends ValueProxy.

At this point I lost some piece because it seems to be too complicated.

Any ideas? 


Reply all
Reply to author
Forward
0 new messages