<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.6.4">
</HEAD>
<BODY>
+1 ID generation by hand provides more flexibility. <BR>
<BR>
btw the same result could be achieved by using uuid2 generator instead of uuid which is currently used and org.hibernate.id.uuid.StandardRandomStrategy. This way the UUID values are produced using java.util.UUID randomUUID. but I agree that removing odd annotations is a good idea<BR>
<BR>
On Thu, 2013-11-07 at 12:38 +0100, Matthias Wessendorf wrote:
<BLOCKQUOTE TYPE=CITE>
    Hello,&nbsp;<BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    today the PushApplicationID ([1]) and VariantID (iOS example: [2]) are generated w/in the RESTful endpoint class. I'd like to move that into the actual entity - similar to what we today already do with the (master)secret (e.g. [3] or [4]).
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Thoughts?
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    While on it - I'd like to do similar to the PK all ALL entities... Today we have an (odd) Hibernate dependency (see [5]), simple b/c of JPA being lame and not providing &quot;propper&quot; UUID support.... &nbsp;So idea is to
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    * remove the odd annotation
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    * do the ID generation &quot;by hand&quot; (like we do on the secret (see above...))
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Thoughts?<BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Sure, this (both items of this mail) might lead to some more re-usable code (and better tests)
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    -Matthias
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    [1] <A HREF="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/PushApplicationEndpoint.java#L76">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/PushApplicationEndpoint.java#L76</A>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    [2] <A HREF="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/iOSVariantEndpoint.java#L105">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/iOSVariantEndpoint.java#L105</A>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    [3] <A HREF="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/model/PushApplication.java#L38">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/model/PushApplication.java#L38</A>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    [4] <A HREF="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/model/AbstractVariant.java#L49">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/model/AbstractVariant.java#L49</A>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    [5] <A HREF="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/jpa/PersistentObject.java#L34">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/jpa/PersistentObject.java#L34</A>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    -- <BR>
    Matthias Wessendorf <BR>
    <BR>
    blog: <A HREF="http://matthiaswessendorf.wordpress.com/">http://matthiaswessendorf.wordpress.com/</A><BR>
    sessions: <A HREF="http://www.slideshare.net/mwessendorf">http://www.slideshare.net/mwessendorf</A><BR>
    twitter: <A HREF="http://twitter.com/mwessendorf">http://twitter.com/mwessendorf</A>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<PRE>
_______________________________________________
aerogear-dev mailing list
<A HREF="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</A>
<A HREF="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</A>
</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>