[jboss-user] [JBoss Tools] - Hibernate Annotations in JPA Project

Dmitry Geraskov do-not-reply at jboss.com
Thu Sep 2 07:19:02 EDT 2010


Dmitry Geraskov [http://community.jboss.org/people/dgeraskov] created the document:

"Hibernate Annotations in JPA Project"

To view the document, visit: http://community.jboss.org/docs/DOC-15772

--------------------------------------------------------------
Hibernate extends Dail JPA functionality.
There are some hibernate annotations which have support in jpa projects. All the annotations are from “org.hibernate.annotations” package. The support of annotation is a ui representation, validation or both. See the list of supported hibernate annotations:
 http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/DiscriminatorFormula.html @DiscriminatorFormula ( https://jira.jboss.org/browse/JBIDE-4663 JBIDE-4663)
There is a ui representation for the annotation:
  http://community.jboss.org/servlet/JiveServlet/showImage/5579/discr_formula.PNG  http://community.jboss.org/servlet/JiveServlet/downloadImage/5579/450-251/discr_formula.PNG 
 http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/ForeignKey.html @ForeignKey ( https://jira.jboss.org/browse/JBIDE-4664 JBIDE-4664)
There is no ui representation. Plugins validates foreign key name  for OneToOne, ManToOne, ManyToMany and Entity mappings.
 http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/Generated.html @Generated ( https://jira.jboss.org/browse/JBIDE-4665 JBIDE-4665)
There is a ui representation for the annotation:
  http://community.jboss.org/servlet/JiveServlet/showImage/5580/generated.PNG  http://community.jboss.org/servlet/JiveServlet/downloadImage/5580/450-171/generated.PNG 
The ui representation is implemented only for default mapping. See …
 http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/GenericGenerator.html @GenericGenerator ( https://jira.jboss.org/browse/JBIDE-4527 JBIDE-4527)
The annotation is not supported for package-level as Dali plug-ins doesn’t support package-level annotations. See this  https://bugs.eclipse.org/bugs/show_bug.cgi?id=265087 bug
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  http://docs.jboss.org/hibernate/core/3.5/api/org/hibernate/id/class-use/IdentifierGenerator.html org.hibernate.id.IdentifierGenerator  interface. Also all generators checked for preventing name duplicates (with @TableGenerator and @SequenceGenerator too).
There is a ui representation for the annotation:
  http://community.jboss.org/servlet/JiveServlet/showImage/5581/generic_generator.PNG  http://community.jboss.org/servlet/JiveServlet/downloadImage/5581/450-358/generic_generator.PNG 

 http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/Index.html @Index ( https://jira.jboss.org/browse/JBIDE-4666 JBIDE-4666)
There is only ui representation for the name of the index.
There is a ui representation for the annotation:

 http://community.jboss.org/servlet/JiveServlet/showImage/5582/index.PNG  http://community.jboss.org/servlet/JiveServlet/downloadImage/5582/450-87/index.PNG 

 http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/NamedQuery.html @NamedQuery and  http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/NamedNativeQuery.html @NamedNativeQuery ( https://jira.jboss.org/browse/JBIDE-4521 JBIDE-4521)
There is a ui representation for the annotations:

  http://community.jboss.org/servlet/JiveServlet/showImage/5583/hibernate_query.PNG  http://community.jboss.org/servlet/JiveServlet/downloadImage/5583/450-398/hibernate_query.PNG 
All the hibernate annotations you could find  http://docs.jboss.org/hibernate/stable/annotations/api/org/hibernate/annotations/package-summary.html here.
--------------------------------------------------------------

Comment by going to Community
[http://community.jboss.org/docs/DOC-15772]

Create a new document in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2128]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100902/7c6f18c1/attachment-0001.html 


More information about the jboss-user mailing list