ObjectDB Database Search

1-50 of 200 results

SELECT clause (JPQL / Criteria API)

query = em. createQuery (" SELECT c FROM Country c", Country.class); List results = query ... expression in SELECT clauses. Specifying the required query results more precisely can improve ... must always be specified explicitly. JPQL does not support the the SELECT * expression, which is common in SQL

jakarta.persistence.criteria.Selection

Jakarta Persistence (JPA) Interface jakarta.persistence.criteria. Selection Type Parameters: - the type of the selection item Super Interfaces: TupleElement The Selection interface defines an item that is to be returned in a query result. Since: Jakarta Persistence (JPA) 2.0 The SELECT clause (JPQL

jakarta.persistence.criteria.CriteriaBuilder.tuple(Selection...)

tuple (    Selection ... selections ) Create a tuple-valued selection item. Parameters: selections - selection items Returns: tuple-valued compound selection . Throws: IllegalArgumentException - if an argument is a tuple- or array-valued selection item. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.array(Selection...)

array (    Selection ... selections ) Create an array-valued selection item. Parameters: selections - selection items Returns: array-valued compound selection . Throws: IllegalArgumentException - if an argument is a tuple- or array-valued selection item. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.construct(Class,Selection...)

construct (    Class resultClass ,    Selection ... selections ) Create a selection item corresponding to a constructor. This method is used to specify a constructor ... entities will be in the new state after the query is executed. Parameters: selections - arguments

jakarta.persistence.criteria.Selection.getCompoundSelectionItems()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. Selection List getCompoundSelectionItems() Return the selection items composing a compound selection . Modifications to the list do not affect the query. Returns: list of selection items. Throws: IllegalStateException - if selection

jakarta.persistence.criteria.Selection.alias(String)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. Selection Selection alias (    String name ) Assigns an alias to the selection item. Once assigned, an alias cannot be changed or reassigned. Returns the same selection item. Parameters: name - alias Returns: selection item. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.Selection.isCompoundSelection()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. Selection boolean isCompoundSelection() Whether the selection item is a compound selection . Returns: boolean indicating whether the selection is a compound selection . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.Subquery.select(Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.Subquery Subquery select (    Expression expression ) Specify the item that is to be returned as the subquery result. Replaces the previously specified selection , if any. Parameters: expression - expression specifying

jakarta.persistence.SharedCacheMode.ENABLE_SELECTIVE

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence.SharedCacheMode ENABLE_ SELECTIVE Caching is enabled for all entities for which Cacheable(true) is specified. All other entities are not cached. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.SharedCacheMode.DISABLE_SELECTIVE

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence.SharedCacheMode DISABLE_ SELECTIVE Caching is enabled for all entities except those for which Cacheable(false) is specified. Entities for which Cacheable(false) is specified are not cached. Since: Jakarta Persistence (JPA) 1.0

FROM clause (JPQL / Criteria API)

the following query, c iterates over all the Country objects in the database: SELECT c FROM Country AS c The AS keyword is optional, and the same query can also be written as follows: SELECT c FROM Country c ... . For example, the following query returns all pairs of countries that share a common border: SELECT c1

WHERE clause (JPQL / Criteria API)

The WHERE clause adds filtering capabilities to the SELECT -FROM statement. It is essential ... retrieves only countries with a population greater than the value of the parameter p : SELECT c ... to the SELECT clause to be collected as query results, the WHERE clause acts as a filter. The boolean

JPA Query Structure (JPQL / Criteria)

and easier to use in Java applications. JPQL Query Structure Like SQL, a JPQL SELECT query consists of up to six clauses in the following format: SELECT ... FROM ... [WHERE ...] [GROUP BY ... [HAVING ...]] [ORDER BY ...] The SELECT and FROM clauses are required in every query that retrieves data; update

JPA Criteria Queries

easier refactoring. It defines a structured hierarchy of interfaces for SELECT , UPDATE, and DELETE ... of CriteriaBuilder  as mutable empty objects, and then defined using setter methods. All query types ( SELECT ... for restricting query scope using parameters and subqueries across all query types. SELECT Queries

Running JPA Queries

The Query interface defines two methods for running SELECT queries: Query.getSingleResult () : Use ... to run this query, as it can return multiple objects: TypedQuery query = em. createQuery (" SELECT c FROM ... . createQuery (" SELECT c FROM Country c"); List results = query. getResultList (); Casting

Index Definition

them to accelerate query execution. Indexes are especially efficient for lookup and range queries: SELECT p FROM Point p WHERE p.x = 100 SELECT p FROM Point p WHERE p.x BETWEEN 50 AND 80 SELECT p FROM Point p ... . ObjectDB also uses indexes for sorting results and for projection: SELECT MIN(p.x) FROM Point p WHERE p.x

JPA Queries

with full type safety. General query objects Execute SELECT , UPDATE and DELETE queries in JPA using ... (" SELECT ... FROM ... WHERE ..."); or Criteria query objects, as described below. For detailed usage ... that represent the query structure itself ( SELECT , UPDATE, or DELETE) and provide methods for refining

JPA Named Queries

=" SELECT c FROM Country c") The @NamedQuery annotation has four elements: two required ... @NamedQuery ( name ="Country.findAll", query =" SELECT c FROM Country c") public class Country ... : @Entity @NamedQueries({ @NamedQuery ( name ="Country.findAll", query =" SELECT c FROM Country c

Query Parameters in JPA

, String name) { TypedQuery query = em. createQuery ( " SELECT c FROM Country c WHERE c.name = :name ... ( EntityManager em, String name) { TypedQuery query = em. createQuery ( " SELECT c FROM Country c WHERE c.name ... string, assuming you select meaningful names. For this reason, named parameters are preferred

JPA Criteria Query Expressions

and selections , enabling the construction of dynamic, type-safe queries. These interfaces represent ... interfaces is structured as follows: Selection # Base interface for result items └─ Expression # Base ... , representing any typed value, calculation, or path within the query. Extends Selection  

Logical Operators in JPQL and Criteria API

and area exceed specified limits: SELECT c FROM Country c WHERE c.population :population AND c.area ... a specified limit: SELECT c FROM Country c WHERE c.population :population OR c.area :area Valid operands ... The following query retrieves all countries whose population does not exceed a specified limit: SELECT c FROM

DELETE Queries in JPA/JPQL

an alternative way to delete entities. Unlike SELECT queries, which retrieve data from the database ... . Selective deletion The structure of DELETE queries is simpler than that of SELECT queries. DELETE queries

jakarta.persistence.criteria.CriteriaBuilder

criteria queries, compound selections , expressions, predicates, orderings. Note that Predicate ... . Since: Jakarta Persistence (JPA) 1.0 CompoundSelection array ( Selection ... selections ) Create an array-valued selection item. Parameters: selections - selection items Returns: array-valued compound selection

jakarta.persistence.criteria.CriteriaQuery

Persistence (JPA) 1.0 Selection getSelection () Return the selection of the query, or null if no selection has been set. Inherited from AbstractQuery Returns: selection item. Since: Jakarta Persistence ... must be eliminated. Since: Jakarta Persistence (JPA) 1.0 CriteriaQuery multiselect ( Selection ... selections

JPA Entity Fields

the following query, where :d represents the Department entity: SELECT e FROM Employee e WHERE e.department ... this case, the employees field is populated with the results of the following query: SELECT e FROM

[ODB1] Chapter 9 - ObjectDB Explorer

the equivalent toolbar button) and in the Open dialog box select the desired local database file and click ... the "Browse" button that opens the "Remote File Selection " dialog box. Closing the Database Use the "File ... . You can select a class from the list of classes at the top of this window and see all its persistent fields

Spring MVC JPA Tutorial - IntelliJ Project

zip file: Spring MVC JPA - Maven Project (8KB) Open the project in IntelliJ IDEA: Select   File Open Project... . Select the  guestbook-spring directory and click  OK . Define the Server: Select   File Settings Application Servers . Add Tomcat 6 Server if not set already (Tomcat

Step 1: Install BIRT and ObjectDB Driver

selecting Help Install New Software... In the [Work with] field enter the BIRT update site url. http ... /update-site/4.6  (Eclipse Neon, Oxygen) and press ENTER. Click the Select All button to select ... ] dialog box by selecting Help Install New Software... In the [Work with] field enter the ObjectDB

Step 2: Entity Class and Persistence Unit

) and selecting   New Class . Enter  guest as the package name - use  exactly that case ... node (in the [Project Explorer] window) and selecting New Folder (or  New Other... General Folder and clicking Next ). Select the project src folder as a parent folder, enter META-INF as a new

Java EE 6 JPA Tutorial - Eclipse Project

Eclipse: Select   File Import... Maven Existing Maven Projects and click  Next . Select the  guestbook-jee6 directory as Root Directory and press  ENTER . Select the project and click  Finish . Run the project in Eclipse: Right click the project node and select   Run As Run

Spring MVC JPA Tutorial - Eclipse Project

the project zip file: Spring MVC JPA - Maven Project (8KB) Open the Maven project in Eclipse: Select   File Import... Maven Existing Maven Projects and click  Next . Select the  guestbook-spring directory as Root Directory and press  ENTER . Select the project and click  Finish

Step 2: Entity Class and Persistence Unit

the project node (in the [Package Explorer] window), select   New Source Folder ... right clicking the new source directory node (in the [Package Explorer] window) and selecting   ... the [Project Explorer]) and select   New Folder. The parent folder should be resources. Enter META

Getting Started with JPA - NetBeans Project

NetBeans: Select File Open Project... . Select the points-console directory and click Open Project . Run the project in NetBeans: Select Run Run Main Project... (or F6 ). Click Select Main Class .

Getting Started with JPA - IntelliJ Project

IntelliJ IDEA: Select File Open Project... . Select the points-console directory and click Open Project . Run the project in IntelliJ IDEA: Select Run Run Main Project... (or F6 ). Click Select Main Class .

JPA Web App Tutorial - Eclipse Project

and extract the project zip file: JPA Web App - Maven Project (6KB) Open the Maven project in Eclipse: Select   File Import... Maven Existing Maven Projects and click  Next . Select the  guestbook-web directory as Root Directory and press  ENTER . Select the project and click  Finish

Step 1: Create a Java EE Web Project

] dialog box, e.g. by using File New Project... Select Java Web Web Application and click Next . Choose a Project Name (e.g. Guestbook ) and click Next . Select GlassFish Server 3 (or above)  ... ] window and select Add Jar/Folder... Select the objectdb.jar file from the bin subdirectory

JPA Web App Tutorial - NetBeans Project

: 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

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

Step 7: Run the Spring Web App

), selecting   Run As Run on Server , selecting the Tomcat 6.0 server and clicking Finish ... Maven Jetty plugin: Right click the project node and select Run As Maven Build... Enter 

Step 5: Design a BIRT Report Chart

In this step we will add a simple chart to the report: Open the [New Chart] dialog box by dragging a  Chart from the [Palette] window and dropping it on the report design (.rptdesign) layout. In the [ Select Chart Type] tab select Tube as the chart type and click Next . In the [ Select Data

Java EE 6 JPA Tutorial - NetBeans Project

project in NetBeans: Select   File Open Project... . Select the  guestbook-jee6 directory and click  Open Project . Run the project: Select   Run Run Main Project... (or  F6

Step 6: Set the Spring XML

editor (by right clicking and selecting   Open With Text Editor or by double click ... that file: Right click the WEB-INF node in the [Package Explorer] window, select   New Other... XML

Step 4: Add a Servlet Class

In this step we will add a servlet to manage guestbook web requests: Open the [Create Servlet] dialog box by right clicking the guest package node (in the [Package Explorer] window),  selecting ... of guests: List guestList = em.createQuery( " SELECT g FROM Guest g", Guest.class).getResultList

Step 3: Add a Context Listener Class

by right clicking the guest package node (in the [Package Explorer] window), selecting New ... the class name - use exactly that case sensitive class name. Click Next and then Select All to enable

Step 1: Create a Maven Web Project

We start by creating a new Maven-WTP dynamic web project in Eclipse: Open the [New Project] dialog box, e.g. by using  File New Project... Select   Maven Maven Project and click  ... ; maven-archetype-webapp as a filter, select   maven-archetype-webapp in the artifact list and click

Step 6: Set the Spring XML

clicking and selecting Edit or by double click and then moving to the XML tab in the editor window ... , select New Other... and then choose the XML category, XML Document and click Next . Enter spring

Step 1: Create a Maven Web Project

We start by creating a new Maven web project in NetBeans: Open the [New Project] dialog box, e.g. by using File New Project... Select Maven Maven Web Application and click Next . Choose a Project Name (e.g. Guestbook ) and select Java EE 5. Enter Maven Group Id (e.g. com.objectdb.tutorial.spring

Step 1: Create a Java EE 6 Web Project

We start by creating a new Java EE dynamic web project in Eclipse: Open the [New Project] dialog box, e.g. by using File New Project... Select Web Dynamic Web Project and click Next . Choose a Project Name (e.g. Guestbook ). Select GlassFish Server Open Source Edition 3 (Java EE 6) as the Target

Step 2: Entity Class and Persistence Unit

) and selecting New Entity Class ... (or New Other... Persistence Entity Class and clicking Next ). Enter ... clicking and selecting Edit or by double click and then moving to the Source or XML tab in