I second that. <div><br></div><div>Java folks is used to JPA @Id annotation. I&#39;m not saying we should introduce a dependency on JPA, but we could have our own: <a href="http://org.aerogear.android.persistence.Id">org.aerogear.android.persistence.Id</a></div>
<div><br></div><div>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. </div><div><br></div><div>- marko</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Nov 15, 2012 at 2:36 PM, Matthias Wessendorf <span dir="ltr">&lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-1 on interface - awful to force folks to implement things (hello EJB 2.1 :))<br>
<br>
I _guess_ an annotation would feel natural for java folks, instead of<br>
applying a &quot;config your pk&quot; :)<br>
<br>
-M<br>
<div><div class="h5"><br>
On Thu, Nov 15, 2012 at 2:29 PM, Daniel Passos &lt;<a href="mailto:daniel@passos.me">daniel@passos.me</a>&gt; wrote:<br>
&gt; Hey Guys,<br>
&gt;<br>
&gt; I&#39;m working on AEROGEAR-565 to make id configurable.<br>
&gt;<br>
&gt; I&#39;ve been taking a look at the JS and iOS and apis are very similar, both<br>
&gt; are getting a configuration parameter with the name of the field that<br>
&gt; represents the id. I like to see libraries close to but I don&#39;t know if this<br>
&gt; the best approach for the android.<br>
&gt;<br>
&gt; I&#39;m in doubt in what would be the best solution (for android)<br>
&gt;<br>
&gt; * Configuration<br>
&gt;<br>
&gt; # Pros<br>
&gt; It requires no change in entity/model<br>
&gt;<br>
&gt; # Cons<br>
&gt; Use reflections<br>
&gt;<br>
&gt; * Interfaces<br>
&gt;<br>
&gt; # Pros<br>
&gt; Typed paras<br>
&gt;<br>
&gt; # Cons<br>
&gt; Requires implement on entity/model<br>
&gt;<br>
&gt; * Annotation<br>
&gt;<br>
&gt; # Pros<br>
&gt; Clean configuration<br>
&gt;<br>
&gt; # Cons<br>
&gt; Use Scan/Reflection<br>
&gt;<br>
&gt; Anyone have any thoughts or see any other solution?<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; aerogear-dev mailing list<br>
&gt; <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
&gt;<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Matthias Wessendorf<br>
<br>
blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</font></span></blockquote></div><br></div>