Koszi. Igazabol most, hogy meg ketszer atolvastam amit irtal, plusz atolvastam ugyanazt a forrast amit a legelejen, valahogy osszeallt.<br><br>Mindenesetre ugy nez ki, a NetBeans-t is sikerult ravenni arra, hogy legyen kedves felparsolni ezeket a generalt forrasokat, hat meglatjuk, hogy tudok tovabb lepni.<br>

<br>Nagyon koszonom. Neha csak az kell, hogy megkapjam mas megfogalmazasban azt, amit mar egyszer olvastam... :-)<br><br clear="all">Garami Gábor<br>E-mail: <a href="mailto:gabor.garami@hron.me" target="_blank">gabor.garami@hron.me</a><br>

Tel: +36 20 235 9621<br>MSN: <a href="mailto:hrgy@vipmail.hu" target="_blank">hrgy@vipmail.hu</a><br>Skype: hron84<br><br>
<br><br><div class="gmail_quote">2012/3/15 Viczián István <span dir="ltr">&lt;<a href="mailto:viczian.istvan@gmail.com">viczian.istvan@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Szia!<br>
<br>
&quot;Apress - Pro JPA 2 Mastering the Java Persistence API (November 2009).pdf&quot;<br>
(Itt van a papíros is előttem, nem warez.)<br>
A könyvet minden JPA fejlesztőnek javaslom.<br>
270. oldal:<br>
<br>
<br>
Generating the Canonical Metamodel<br>
If you choose to use the generated metamodel in your queries, you<br>
should be aware of some of the<br>
details of the development process in case inconsistency or<br>
configuration issues crop up. The canonical<br>
metamodel classes will need to be updated or regenerated when certain<br>
changes to entities have<br>
occurred during development. For example, changing the name of a field<br>
or property, or changing its<br>
shape, would require an updated canonical metamodel class for that entity.<br>
The generation tools offered by providers may vary widely in function<br>
or in operation. Generation<br>
may involve reading the persistence.xml file, as well as accessing<br>
annotations on entities and XML<br>
mapping files to determine what the metamodel classes should look<br>
like. Since the specification does<br>
not require such tools to even exist, a provider may choose to not<br>
support it at all, expecting that if<br>
developers want to use the canonical metamodel classes they will<br>
handcode them. Most providers do<br>
offer some kind of generation tool, though; it&#39;s just a matter of<br>
understanding how that vendor-specific<br>
tool works. It might run statically as a separate command line tool,<br>
or it might use the compiler hook<br>
offered in Java SE 6 to look at the entities and generate the classes<br>
at compile-time. For example, to run<br>
the command line mode of the tool shipped with the EclipseLink<br>
Reference Implementation, you could<br>
set the javac &quot;-processor&quot; and &quot;-proc:only&quot; options. These two options<br>
indicate the EclipseLink<br>
code/annotation processor1<br>
 for the compiler to invoke, and instruct the compiler to call only the<br>
processor but not do any actual compilation.<br>
    javac -processor<br>
org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor<br>
             -proc:only<br>
             -classpath lib/*.jar;punit<br>
             *.java<br>
The options are on separate lines to make them easier to see. It is<br>
assumed that the lib directory<br>
contains the necessary EclipseLink JAR and JPA 2.0 interface JAR, and<br>
that the META-INF/persistence.xml<br>
is in the punit directory.<br>
Metamodel generation tools will also typically run in an IDE, and<br>
there will likely be IDE-specific<br>
configuration necessary to direct the incremental compiler to use the<br>
tool&#39;s annotation processor. In<br>
some IDEs, there must be an additional code/annotation processor JAR<br>
to configure. The generated<br>
metamodel classes will need to go in a specific directory and be on<br>
the build classpath so the criteria<br>
queries that reference them can compile. Consult the IDE help files on<br>
how annotation processors or<br>
APT is supported, as well as the provider documentation on what to<br>
configure in order to enable<br>
generation in a given IDE.<br>
<br>
--<br>
Viczián István<br>
<br>
<br>
<br>
2012/3/15 Gábor Garami &lt;<a href="mailto:gabor.garami@hron.me">gabor.garami@hron.me</a>&gt;:<br>
<div><div class="h5">&gt; Sziasztok,<br>
&gt;<br>
&gt; Valószínüleg megint valami alap dolgot nem értek.<br>
&gt;<br>
&gt; Olvasgatom a hivatalos JavaEE tutorialnak a Criteria API-ra vonatkozó<br>
&gt; részét, ezt ni: <a href="http://docs.oracle.com/javaee/6/tutorial/doc/gkjiv.html" target="_blank">http://docs.oracle.com/javaee/6/tutorial/doc/gkjiv.html</a><br>
&gt;<br>
&gt; Azt látom, hogy a tutorial kézzel generálta meg a Metamodel osztályt. Erre<br>
&gt; van valami mód, hogy automatikusan generáljam? Olvasgattam, hogy a<br>
&gt; Hibernate-hoz van ilyen cucc, meg kulon eclipselink-hez is, ez akkor azt<br>
&gt; jelenti, hogy minden ilyen JPA implementaciohoz a megfelelot kell hasznalni?<br>
&gt; Vagy van valami generikus is, csak nem talalom? Miben kulonboznek ezek<br>
&gt; egyaltalan egymastol? Mert ahogy elnezem, ez valami statikus kod,<br>
&gt; gyakorlatilag ha nagyon megeroltetem magamat, ossze tudok dobni egy<br>
&gt; scriptet, ami a megadott osztaly kodjabol nemi regexes varazslat<br>
&gt; segitsegevel legeneralja azt az osztalyt. Vagy van valami mas titkos dolog<br>
&gt; is, amit en nem latok?<br>
&gt;<br>
&gt; Elore is koszonom a segitseget.<br>
&gt;<br>
&gt; Udv,<br>
&gt;<br>
&gt; Garami Gábor<br>
&gt; E-mail: <a href="mailto:gabor.garami@hron.me">gabor.garami@hron.me</a><br>
&gt; Tel: <a href="tel:%2B36%2020%20235%209621" value="+36202359621">+36 20 235 9621</a><br>
&gt; MSN: <a href="mailto:hrgy@vipmail.hu">hrgy@vipmail.hu</a><br>
&gt; Skype: hron84<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Javalist mailing list<br>
&gt; <a href="mailto:Javalist@lists.javaforum.hu">Javalist@lists.javaforum.hu</a><br>
&gt; <a href="http://lists.javaforum.hu/mailman/listinfo/javalist" target="_blank">http://lists.javaforum.hu/mailman/listinfo/javalist</a><br>
&gt;<br>
_______________________________________________<br>
Javalist mailing list<br>
<a href="mailto:Javalist@lists.javaforum.hu">Javalist@lists.javaforum.hu</a><br>
<a href="http://lists.javaforum.hu/mailman/listinfo/javalist" target="_blank">http://lists.javaforum.hu/mailman/listinfo/javalist</a><br>
</blockquote></div><br>