[nbusers] Re: How to access @NamedQuery after Creating JSF JSP and Entity from DB

  • From: Scott < >
  • To:
  • Subject: [nbusers] Re: How to access @NamedQuery after Creating JSF JSP and Entity from DB
  • Date: Thu, 13 Dec 2012 18:02:09 -0500

You place the named query into the entity along with all the field definitions, etc.  Then you have a seperate class normally called a jpa controller or a facade which will declare a persistance context  for the entity manager and the code using the named query referenced in the link from Benno Markiewicz.  Your controller/facade will have to import the entity class and you will have to create a persistance.xml file to define which entitites to include for the persistance context.
hope this helps.


On Thu, Dec 13, 2012 at 3:17 AM, Benno Markiewicz < " target="_blank"> > wrote:

To execute the named query see the code sample inside of
http://docs.oracle.com/javaee/6/api/javax/persistence/NamedQuery.html

Greetings markiewb

Am 13.12.2012 08:46 schrieb "camileind" < " target="_blank"> >:

Hi, in new and i'm having a similar problem with jsf, my first problem was how to use the named querys, but that is answered, now my problem y where to put that code..in what class, i would be very grateful if you could help me

Thank you







[nbusers] How to access @NamedQuery after Creating JSF JSP and Entity from DB

camileind 12/13/2012

[nbusers] Re: How to access @NamedQuery after Creating JSF JSP and Entity from DB

Benno Markiewicz 12/13/2012

[nbusers] Re: How to access @NamedQuery after Creating JSF JSP and Entity from DB

Scott 12/13/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close