I second that.
Java folks is used to JPA @Id annotation. I'm not saying we should
introduce a dependency on JPA, but we could have our own:
org.aerogear.android.persistence.Id
Checking for annotation is one tiny method, that will be hidden away from
the user. It can also be done smartly - you can cache the result of the
scan.
- marko
On Thu, Nov 15, 2012 at 2:36 PM, Matthias Wessendorf <matzew(a)apache.org>wrote:
-1 on interface - awful to force folks to implement things (hello EJB
2.1
:))
I _guess_ an annotation would feel natural for java folks, instead of
applying a "config your pk" :)
-M
On Thu, Nov 15, 2012 at 2:29 PM, Daniel Passos <daniel(a)passos.me> wrote:
> Hey Guys,
>
> I'm working on AEROGEAR-565 to make id configurable.
>
> I've been taking a look at the JS and iOS and apis are very similar, both
> are getting a configuration parameter with the name of the field that
> represents the id. I like to see libraries close to but I don't know if
this
> the best approach for the android.
>
> I'm in doubt in what would be the best solution (for android)
>
> * Configuration
>
> # Pros
> It requires no change in entity/model
>
> # Cons
> Use reflections
>
> * Interfaces
>
> # Pros
> Typed paras
>
> # Cons
> Requires implement on entity/model
>
> * Annotation
>
> # Pros
> Clean configuration
>
> # Cons
> Use Scan/Reflection
>
> Anyone have any thoughts or see any other solution?
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
--
Matthias Wessendorf
blog:
http://matthiaswessendorf.wordpress.com/
sessions:
http://www.slideshare.net/mwessendorf
twitter:
http://twitter.com/mwessendorf
_______________________________________________
aerogear-dev mailing list
aerogear-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev