<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Hibernate Annotations in JPA Project
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/dgeraskov">Dmitry Geraskov</a> in <i>JBoss Tools</i> - <a href="http://community.jboss.org/docs/DOC-15772">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p class="MsoNormal">Hibernate extends Dail JPA functionality.</p><p class="MsoNormal">There are some hibernate annotations which have support in jpa projects. All the annotations are from &ldquo;org.hibernate.annotations&#8221; package. The support of annotation is a ui representation, validation or both. See the list of supported hibernate annotations:</p><p class="MsoNormal"><a class="jive-link-external-small" href="http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/DiscriminatorFormula.html">@DiscriminatorFormula</a> (<a class="jive-link-external-small" href="https://jira.jboss.org/browse/JBIDE-4663">JBIDE-4663</a>)</p><p class="MsoNormal">There is a ui representation for the annotation:</p><p class="MsoNormal"> <a href="http://community.jboss.org/servlet/JiveServlet/showImage/5579/discr_formula.PNG"><span> http://community.jboss.org/servlet/JiveServlet/downloadImage/5579/450-251/discr_formula.PNG </span></a></p><p class="MsoNormal"><a class="jive-link-external-small" href="http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/ForeignKey.html">@ForeignKey</a> (<a class="jive-link-external-small" href="https://jira.jboss.org/browse/JBIDE-4664">JBIDE-4664</a>)</p><p class="MsoNormal">There is no ui representation. Plugins validates foreign key name&#160; for OneToOne, ManToOne, ManyToMany and Entity mappings.</p><p class="MsoNormal"><a class="jive-link-external-small" href="http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/Generated.html">@Generated</a> (<a class="jive-link-external-small" href="https://jira.jboss.org/browse/JBIDE-4665">JBIDE-4665</a>)</p><p class="MsoNormal">There is a ui representation for the annotation:</p><p class="MsoNormal"> <a href="http://community.jboss.org/servlet/JiveServlet/showImage/5580/generated.PNG"><span> http://community.jboss.org/servlet/JiveServlet/downloadImage/5580/450-171/generated.PNG </span></a></p><p class="MsoNormal">The ui representation is implemented only for default mapping. See &#8230;</p><p class="MsoNormal"><a class="jive-link-external-small" href="http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/GenericGenerator.html">@GenericGenerator</a> (<a class="jive-link-external-small" href="https://jira.jboss.org/browse/JBIDE-4527">JBIDE-4527</a>)</p><p class="MsoNormal">The annotation is not supported for package-level as Dali plug-ins doesn&rsquo;t support package-level annotations. See this <a class="jive-link-external-small" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=265087">bug</a></p><p class="MsoNormal">Except ui representation for this annotation also validation of generation strategy is supported. It either should be one of predefined strategy or the valid class name which implements <a class="jive-link-external-small" href="http://docs.jboss.org/hibernate/core/3.5/api/org/hibernate/id/class-use/IdentifierGenerator.html">org.hibernate.id.IdentifierGenerator</a>&#160; interface. Also all generators checked for preventing name duplicates (with @TableGenerator and @SequenceGenerator too).</p><p class="MsoNormal">There is a ui representation for the annotation:</p><p class="MsoNormal"> <a href="http://community.jboss.org/servlet/JiveServlet/showImage/5581/generic_generator.PNG"><span> http://community.jboss.org/servlet/JiveServlet/downloadImage/5581/450-358/generic_generator.PNG </span></a></p><p class="MsoNormal" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p class="MsoNormal"><a class="jive-link-external-small" href="http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/Index.html">@Index</a> (<a class="jive-link-external-small" href="https://jira.jboss.org/browse/JBIDE-4666">JBIDE-4666</a>)</p><p class="MsoNormal">There is only ui representation for the name of the index.</p><p class="MsoNormal">There is a ui representation for the annotation:</p><p class="MsoNormal" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><a href="http://community.jboss.org/servlet/JiveServlet/showImage/5582/index.PNG"><span> http://community.jboss.org/servlet/JiveServlet/downloadImage/5582/450-87/index.PNG </span></a></p><p class="MsoNormal" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p class="MsoNormal"><a class="jive-link-external-small" href="http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/NamedQuery.html">@NamedQuery</a> and <a class="jive-link-external-small" href="http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/NamedNativeQuery.html">@NamedNativeQuery</a> (<a class="jive-link-external-small" href="https://jira.jboss.org/browse/JBIDE-4521">JBIDE-4521</a>)</p><p class="MsoNormal">There is a ui representation for the annotations:</p><p class="MsoNormal" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p class="MsoNormal"> <a href="http://community.jboss.org/servlet/JiveServlet/showImage/5583/hibernate_query.PNG"><span> http://community.jboss.org/servlet/JiveServlet/downloadImage/5583/450-398/hibernate_query.PNG </span></a></p><p class="MsoNormal">All the hibernate annotations you could find <a class="jive-link-external-small" href="http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/package-summary.html">here</a>.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Comment by <a href="http://community.jboss.org/docs/DOC-15772">going to Community</a></p>

        <p style="margin: 0;">Create a new document in JBoss Tools at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2128">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>