<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I don't really like that idea, as it means that forge then becomes part of your build process.&nbsp;</div><div><br></div><div>With the @AutoHome it should not really matter about IDE auto completion, the idea is to just register a bean that allows you to lookup beans by ID from the EL.</div><div><br></div><div>The underlying bean would probably look like:</div><div><br></div><div>public class AutoHomeBean&lt;T,ID&gt; {</div><div><br></div><div>&nbsp; private ID id;&nbsp;</div><div>&nbsp; private T instance;&nbsp;</div><div>&nbsp; void setId(ID id) {</div><div>&nbsp; if(!this.id.equals(id) ) { //need NPE check as well</div><div>&nbsp; &nbsp;this.instance = null;</div><div>}</div><div>&nbsp; &nbsp;this.id = id;</div><div><br></div><div>&nbsp;}</div><div><br></div><div>&nbsp;ID getId() //getter;</div><div><br></div><div>&nbsp;public T getInstance() {</div><div>&nbsp; &nbsp;if(instance == null &amp;&amp; id != null) {</div><div>&nbsp; &nbsp; instance = em.find(...);</div><div>&nbsp; }</div><div>&nbsp; return instance&nbsp;</div><div>&nbsp;}</div><div>}</div><div><br></div><div>Then if you put the AutoHome annotation on MyEntity you would get a MyEntityHome bean being registered, and you could then do things like:</div><div><br></div><div>#{myEntityHome.setId(10)};</div><div><br></div><div>#{myEntityHome.instance.name}</div><div><br></div><div>Not sure how practical / useful it will be in practice, but that was the basic idea.</div><div><br></div><div>Stuart</div><br><div><div>On 22/09/2011, at 8:19 AM, Dan Allen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">True. I don't really see the problem with having an object that extends a base object, even if it has no additional methods.<div><br></div><div>...and if that is the solution, then the @AutoCrud could be a hint to forge to generate that class if it doesn't yet exist. Now that's an idea :)<br>

<div><div><br></div><div>-Dan<br><br><div class="gmail_quote">On Wed, Sep 21, 2011 at 18:17, Jason Porter <span dir="ltr">&lt;<a href="mailto:lightguard.jp@gmail.com">lightguard.jp@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

That's good at the runtime, but develop time that really doesn't help because it won't compile and you won't get IDE auto complete.<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Wed, Sep 21, 2011 at 16:10, Dan Allen <span dir="ltr">&lt;<a href="mailto:dan.j.allen@gmail.com" target="_blank">dan.j.allen@gmail.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Stuart,<div><br></div><div>You also previous mentioned...</div><div><span style="font-family:'Lucida Grande', Geneva, Verdana, Arial, sans-serif;font-size:12px;line-height:18px"><br>





</span></div><div><span style="font-family:'Lucida Grande', Geneva, Verdana, Arial, sans-serif;font-size:12px;line-height:18px"><font color="#333333">With portable extensions we could do something like:</font></span></div>





<div><span style="font-family:'Lucida Grande', Geneva, Verdana, Arial, sans-serif;font-size:12px"><font color="#333333"><pre style="background-color:rgb(245, 245, 245);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(170, 170, 170);border-right-color:rgb(170, 170, 170);border-bottom-color:rgb(170, 170, 170);border-left-color:rgb(170, 170, 170);padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;margin-top:10px;margin-right:10px;margin-bottom:10px;margin-left:10px;font-family:'Andale Mono', 'Courier New', monospace;font-size:11px;overflow-x:auto;max-width:950px">
@Entity
@AutoHome
public class MyEntity ....

</pre></font></span><span style="color:rgb(51, 51, 51);font-family:'Lucida Grande', Geneva, Verdana, Arial, sans-serif;font-size:12px;line-height:18px">and have a portable extension that registers a new home bean for every entity with the @AutoHome annotation.</span></div>





<div><br></div><div>I think we all agree that "Home" is a crappy name, so perhaps @Crud or @Dao would be a sufficient name.</div><div><br></div><font color="#888888"><div>-Dan</div></font><div><div></div><div>

<div><br><div class="gmail_quote">On Tue, Sep 20, 2011 at 22:15, Stuart Douglas <span dir="ltr">&lt;<a href="mailto:stuart.w.douglas@gmail.com" target="_blank">stuart.w.douglas@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>

  
    
    
  
  <div text="#000000" bgcolor="#ffffff">
    My original plan for EntityQuery was to use the ServiceHandler stuff
    in solder:<br>
    <br>
    @EntityQuery<br>
    public interface MyQuery {<br>
    <br>
    &nbsp; @Query("Select u from User u where type=:p1")<br>
    &nbsp; public List&lt;User&gt; users(String type);<br>
    <br>
    }<br>
    <br>
    Stuart<div><div></div><div><br>
    <br>
    On 09/21/2011 06:00 AM, José Rodolfo Freitas wrote:
    </div></div><blockquote type="cite"><div><div></div><div>Yeah, I agree that being declarative is the ideal.
      <div>let's say no to inheritance with generics! hehehe.<br>
        <br>
        <div class="gmail_quote">On Tue, Sep 20, 2011 at 4:41 PM, Dan
          Allen <span dir="ltr">&lt;<a href="mailto:dan.j.allen@gmail.com" target="_blank">dan.j.allen@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
            <div>On Tue, Sep 20, 2011 at 15:36, José Rodolfo
              Freitas <span dir="ltr">&lt;<a href="mailto:joserodolfo.freitas@gmail.com" target="_blank">joserodolfo.freitas@gmail.com</a>&gt;</span>
              wrote:<br>
            </div>
            <div class="gmail_quote">
              <div>
                <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
                  What I like most in CDI and Seam3 is that it's very
                  easy to keep things simple and that's something I
                  strongly advocate.&nbsp;</blockquote>
                <div><br>
                </div>
              </div>
              <div>+1</div>
              <div>
                <div>&nbsp;</div>
                <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
                  <div>Of course there're still boilerplate code, but I
                    think it's minimal (compared to the JEE generations
                    before), and that's something forge can create
                    without the need to satisfy a "framework". Yes, I
                    admitedly am afraid of that word.</div>
                </blockquote>
                <div><br>
                </div>
              </div>
              <div>That's fine, it doesn't have to be a framework. I do
                think there is room for having some common scaffolding,
                though. If we can do that by extending the programming
                model (annotations, generic beans or interfaces) so that
                it's declarative, that's probably ideal.</div>
              <div><br>
              </div>
              <div>I suggest that we brainstorm proposals using gists (<a href="http://gist.github.com/" target="_blank">http://gist.github.com</a>). That will
                get the ball rolling. We can start with the idea Jason
                posted, or feel free to take a different approach.</div>
              <div><br>
              </div>
              <font color="#888888">
                <div>-Dan</div>
                <div><br>
                </div>
              </font></div>
            <div>
              <div>-- <br>
                <div>Dan Allen</div>
                Principal Software Engineer, Red Hat | Author of Seam in
                Action<br>
                Registered Linux User #231597<br>
                <br>
                <div><a href="http://www.google.com/profiles/dan.j.allen#about" target="_blank">http://www.google.com/profiles/dan.j.allen#about</a><br>
                  <a href="http://mojavelinux.com/" target="_blank">http://mojavelinux.com</a><br>
                  <a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br>
                </div>
                <br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      </div></div><pre><fieldset></fieldset>
_______________________________________________
seam-dev mailing list
<div><a href="mailto:seam-dev@lists.jboss.org" target="_blank">seam-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a>
</div></pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Dan Allen</div>Principal Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br><br><div><a href="http://www.google.com/profiles/dan.j.allen#about" target="_blank">http://www.google.com/profiles/dan.j.allen#about</a><br>





<a href="http://mojavelinux.com/" target="_blank">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br></div><br>
</div>
</div></div><br>_______________________________________________<br>
seam-dev mailing list<br>
<a href="mailto:seam-dev@lists.jboss.org" target="_blank">seam-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br></div></div><div><div></div><div class="h5">Jason Porter<br><a href="http://lightguard-jp.blogspot.com/" target="_blank">http://lightguard-jp.blogspot.com</a><br>

<a href="http://twitter.com/lightguardjp" target="_blank">http://twitter.com/lightguardjp</a><br>

<br>Software Engineer<br>Open Source Advocate<br>Author of Seam Catch - Next Generation Java Exception Handling<br><br>PGP key id: 926CCFF5<br>PGP key available at: <a href="http://keyserver.net/" target="_blank">keyserver.net</a>, <a href="http://pgp.mit.edu/" target="_blank">pgp.mit.edu</a><br>




</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Dan Allen</div>Principal Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br><br><div><a href="http://www.google.com/profiles/dan.j.allen#about" target="_blank">http://www.google.com/profiles/dan.j.allen#about</a><br>

<a href="http://mojavelinux.com/" target="_blank">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br></div><br>
</div></div></div>
</blockquote></div><br></body></html>