About SELECT

61-70 of 200Refresh
Tutorial
13

Step 3: Add a Main Class [2011-02-11]

clicking the tutorial package node (in the [Package Explorer] window) and selecting New > Class ... (); // Find the number of Point objects in the database: Query q1 = em.createQuery("SELECT COUNT(p ... ()); // Find the average X value: Query q2 = em.createQuery("SELECT AVG(p.x) FROM Point p
Tutorial
13

Step 3: Add a Main Class

clicking the tutorial package node (in the [Package Explorer] window) and selecting New > Class ... (); // Find the number of Point objects in the database: Query q1 = em.createQuery("SELECT COUNT(p ... ()); // Find the average X value: Query q2 = em.createQuery("SELECT AVG(p.x) FROM Point p
Manual
13

Query Parameters in JPA [2011-04-01]

( "SELECT c FROM Country c WHERE c.name = :name", Country.class); return query.setParameter ... .createQuery( "SELECT c FROM Country c WHERE c.name = ?1", Country.class); return query ... (assuming that meaningful names are selected). Therefore, they are preferred over ordinal parameters
Manual
13

Query Parameters in JPA

( "SELECT c FROM Country c WHERE c.name = :name", Country.class); return query.setParameter ... .createQuery( "SELECT c FROM Country c WHERE c.name = ?1", Country.class); return query ... (assuming that meaningful names are selected). Therefore, they are preferred over ordinal parameters
JPA Doc
12

javax.persistence.criteria.CriteriaQuery

roots Since: JPA 2.0 Selection getSelection() Return the selection of the query, or null if no selection has been set. Return the selection of the query, or null if no selection has been set. Returns: selection item Since: JPA 2.0 AbstractQuery groupBy(List> grouping) Specify
Tutorial
11

JPA Web App Tutorial - NetBeans Project

the project zip file: JPA Web Application - Maven Project (6KB). Open the Maven project in NetBeans: Select File > Open Project.... Select the guestbook-web directory and click Open Project. Run the project: Select Run > Run Main Project... (or F6). Choose or define the server and click OK. If  a browser
Tutorial
11

Step 7: Run the Spring Web App

the [Project Explorer] window), selecting Run As > Run on Server, selecting the Tomcat 6.0 server ... the embedded Maven Jetty plugin: Right click the project node and select Run As > Maven Build... Enter
Tutorial
11

Spring MVC JPA Tutorial - NetBeans Project

To open and run the Spring MVC JPA tutorial project in NetBeans: Download and extract the project zip file: Spring MVC JPA - Maven Project (7KB). Open the Maven project in NetBeans: Select File > Open Project.... Select the guestbook-spring directory and click Open Project. Run the project: Select
Tutorial
11

Step 1: Create a Java Project

We start by creating a new NetBeans Project: Open the [New Project] dialog box, e.g. by using File > New Project... Select Java > Java Application and click Next. Choose a Project Name (e.g. Tutorial ... ] window and select Add Jar/Folder... Select the objectdb.jar file from the bin subdirectory
Manual
11

UPDATE SET Queries in JPA/JPQL

an alternative way for updating entity objects. Unlike SELECT queries, which are used to retrieve data from ... method returns the number of objects that have been modified by the query. Selective Update UPDATE ... , which is essential for updating selected entity objects, is supported. For example, the following query updates