views:

79

answers:

1

I write a RIA application and my JPA beans must be decoded to push it in Store. My decisions are:

  1. Brute Force. If I have property 'aProp' in bean (and getter/setter for it) i create RecordDef, then Record, then Recrod.set('aProp', bean.getAProp()) and so on.. (it is terrible)

  2. I can write generator for creating a Factory of Records (it is my desision and i write it). For example:

    RecordFactory<User> factory = GWT.create(User.class); //User is entity

  3. I now that i need a reflection, BUT GWT have no implementation of reflection (some libraries emulates this, but they builds on generators)

Exists the best way?

Thanks, Den Bardadym.

A: 

I go with method 1) but generate it. I know, it's ugly - but it's easy, proven and it works.

AlexJReid