ObjectDB Database Search

1-50 of 200 results

Retrieving JPA Entities

The Java Persistence API (JPA) provides various ways to retrieve objects from the database. The retrieval of objects does not require an active transaction because it does not change the content of the database. The persistence context serves as a cache of retrieved entity objects. If a requested

JPA Shared (L2) Entity Cache

that it manages. The persistence context serves as a first level cache. An attempt to retrieve ... : On retrieval - shared cache is used for entity objects that are not in the persistence context. If an entity object is not available also in the shared cache - it is retrieved from the database and added

Managing JPA Entities

requires using entity objects for many operations, including storing, retrieving , updating and deleting ... are provided in the Storing Entities section. Entity objects retrieved from the database by an EntityManager are also in the Managed state. Object retrieval is discussed in more detail in the Retrieving

JPA Persistable Types

require separate space allocation and separate store and retrieval operations. Therefore, using ... has several benefits: It saves space in the database. It is more efficient (storage and retrieval are faster ... map type is used, ObjectDB will switch to a similar supported type when the data is retrieved from

JPA Optimistic and Pessimistic Locking

(using another EntityManager ) since it was retrieved by the current updater. Optimistic locking ... for a specific retrieval operation or query . Releasing a Pessimistic Lock Pessimistic locks ... with OPTIMISTIC_FORCE_INCREMENT) . Locking during Retrieval JPA 2 provides various methods for locking entity

JPA Metamodel API

The JPA Metamodel API provides the ability to examine the persistent object model and retrieve ... . Three methods can be used to retrieve sets of types: // Get all the managed classes: // (entity classes ... methods can be used to retrieve a specific type by its Class instance: // Get a managed type (entity

JPA Entity Fields

after retrieval by a special automatic query. Note : Navigation through inverse fields is much less efficient ... when a Department entity is retrieved from the database. ObjectDB accomplishes this by effectively running ... Map . For an inverse list field, the order of the retrieved owner entities can be set by the OrderBy

DELETE Queries in JPA/JPQL

: Retrieving the entity objects into an EntityManager . Removing these objects from the EntityManager   ... , which are used to retrieve data from the database, DELETE queries do not retrieve data from ... from the database using a DELETE query may be slightly more efficient than retrieving entity objects

UPDATE SET Queries in JPA/JPQL

Existing entity objects can be updated, as explained in chapter 2 , by: Retrieving ... to retrieve data from the database, UPDATE queries do not retrieve data from the database ... the database using an UPDATE query may be slightly more efficient than retrieving entity objects

JPA Primary Key

the database is uniquely identified (and can be retrieved from the database) by the combination of its type ... have to be retrieved by their primary key as shown in the Retrieving Entities section. Embedded Primary Key ... time, sensor ID and additional details. Suppose that queries that retrieve all the events

SELECT clause (JPQL / Criteria API)

The ability to retrieve managed entity objects is a major advantage of JPQL. For example ... query retrieves the name of the capital city of a specified country: SELECT c.capital.name FROM ... that are retrieved directly by a result path expression are not associated with an EntityManager and changes

FROM clause (JPQL / Criteria API)

the following INNER JOIN query that retrieves pairs of (country name, capital name): SELECT c.name, p ... , since the referenced  Capital objects are retrieved one at a time, i.e. the number of round trips ... objects because it eliminates the need for retrieving the associated Capital objects separately

Logical Operators in JPQL and Criteria API

query retrieves countries whose population and area (both) exceed specified limits: SELECT c FROM ... The following query retrieves countries whose population or area exceeds a specified limit: SELECT c ... The following query retrieves all the countries whose population does not exceed a specified limit: SELECT

JPA Query Structure (JPQL / Criteria)

classes and objects. For example, a JPQL query can retrieve and return entity objects ... ...]] [ORDER BY ...] The first two clauses, SELECT and FROM are required in every retrieval query ... Query The following query retrieves all the Country objects in the database: SELECT c FROM Country

WHERE clause (JPQL / Criteria API)

JPQL query that retrieves selective objects from the database. Out of the four optional clauses ... The following query retrieves only countries with a population size above a population size p ... them to the SELECT clause. For example, the following query retrieves all the countries with population size

JPA Criteria Queries

Build top-level retrieval queries using the main criteria query interface: Use this interface ... functionality through their common parent: This base interface defines the common structure of retrieval ... : UPDATE and DELETE Queries CriteriaQuery is designed exclusively for data retrieval . Bulk data

Running JPA Queries

Query Execution (with getResultList) The following query retrieves all the Country objects in ... the country names, a query using projection and retrieving country names directly instead of retrieving the entire Country instances would be more efficient. Single Result Query Execution

jakarta.persistence.StoredProcedureQuery

have been exhausted, results returned through INOUT and OUT parameters can be retrieved . The getOutputParameterValue methods are used to retrieve the values passed back from the procedure ... should be exhausted before calling getResultList to retrieve the result set. Alternatively, the REF_CURSOR

Setting and Tuning of JPA Queries

number ( 0 for the first page), the following expression retrieves the results for a specified page ... on all the result objects that the query retrieves . For example, the following query execution sets

JPA Named Queries Annotations

). It is defined on an entity or mapped superclass and assigned a unique name for retrieval ... . Retrieve it by result type from EntityManagerFactory.getNamedQueries , and use it to get a TypedQuery instance via EntityManager.createQuery .

JPA Runtime Tuning & Configuration

Implements: FindOption , LockOption . Pass as a variable argument to find() and lock() . Cache retrieve mode ... EntityManagerFactory Set the PersistenceConfiguration.CACHE_ RETRIEVE _MODE property when you create

JPA Metamodel and Graphs

to retrieve entity and attribute information by class or name, similar to the reflection API in Java ... . It is the common super-interface of both EntityType and Attribute . Retrieval optimization with Graphs

Query Parameters in JPA

Query parameters enable the definition of reusable queries. Such queries can be executed with different parameter values to retrieve different results. Running the same query multiple times ... ) The following method retrieves a Country object from the database by its name: public Country

Updating JPA Entities

Once an entity object is retrieved from the database (no matter which way) it can simply be modified in memory ... when it is retrieved from the database and to compare that snapshot to the actual managed object

Chapter 1 - Quick Tour

ObjectDB databases and perform basic CRUD operations (Create/Store, Retrieve , Update and Delete ... storing, retrieving , updating and deleting Point objects. This chapter contains the following sections

JPA Exceptions

and locking exceptions Lock acquisition failures during updates or retrieval are indicated by: Thrown ... locking wait times. Query exceptions Exceptions specific to query execution and result retrieval

JPA Lifecycle Events

- after an entity has been retrieved from the database. @PreUpdate - when an entity is identified as modified by

Detached JPA Entities

). Retrieval by navigation from detached objects is not supported, so only persistent fields

JPA Attributes Annotations

. The persistence provider ignores transient fields when saving or retrieving the entity.  

JPA Extended API Reference Guide

, criteria queries, and JPQL for data retrieval and manipulation. Describes the metamodel and graph APIs

JPA Named Queries

whose name is  "Country.findAll" that retrieves all the  Country objects in the database

Literals in JPQL and Criteria Queries

to enable selective retrieval by type . In JPQL an entity type literal is written simply as the name

ObjectDB - JPA Object Database for Java

  Boost your application database performance. Database performance is critical as it is the bottleneck in most applications. ObjectDB is extremely fast and much faster than any other JPA solution. Using a relational database management system (RDBMS) to store and retrieve Java objects

Defining a JPA Entity Class

class, and accordingly, provides the ability to store Point objects in the database and retrieve

What is ObjectDB?

ObjectDB is an Object Oriented Database Management System (ODBMS). It provides all the standard database management services (storage and retrieval , transactions, lock management, query processing, etc.), but it uses an object oriented model to store and manage data. You can easily store ordinary

JPA Query API

which retrieves all the Country objects in the database is represented by both q1 and q2 . When building

Step 4: Add a Servlet Class

is retrieved from the application scope attribute, and then an EntityManager (representing a database ... entity objects are retrieved from the database and stored in the request's "guest" attribute

Step 3: Define an EJB Session Bean

: public void persist(Guest guest) { em.persist(guest); } // Retrieves all the guests: public List ... - for retrieving all the existing  Guest objects from the database. EJB classes are only supported by Java EE

Step 3: Define a Spring DAO Component

void persist(Guest guest) { em.persist(guest); } // Retrieves all the guests: public List getAllGuests ... - for storing a new  Guest entity object in the database. getAllGuests - for retrieving all the existing

Step 3: Define a Spring DAO Component

void persist(Guest guest) { em.persist(guest); } // Retrieves all the guests: public List ... - for storing a new  Guest entity object in the database. getAllGuests - for retrieving

Step 3: Define an EJB Session Bean

); } // Retrieves all the guests: public List getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM ... . getAllGuests - for retrieving all the existing Guest objects from the database. EJB classes

Step 4: Add a Servlet Class

on every http request: The EntityManagerFactory is retrieved from the application scope attribute ... is constructed and stored in the database. All the Guest entity objects are retrieved from the database

Step 5: Add a JSP Page

that have already signed (which are retrieved from the request's guestDao attribute that is set by

Step 2: Define a JPA Entity Class

 a Main class that stores and retrieves instances of the Point entity class.

Step 2: Define a JPA Entity Class

. The next step is adding a Main class that stores and retrieves instances of the Point entity class.

Step 3: Add a Context Listener Class

( contextInitialized ). Retrieves the EntityManagerFactory from the application scope attribute and closes

Getting Started with JPA and Eclipse

This is the Eclipse version of the Quick Start with JPA tutorial. It demonstrates how to create and run a simple JPA application in Eclipse. The demonstrated application uses JPA to store and retrieve simple Point entity objects, where each Point has two persistent fields: x and y

Step 5: Add a JSP Page

that have already signed (which are retrieved from the request's "guests" attribute that is set by the servlet in

Step 3: Add a Main Class

In this step we will add a main class to the project to store and retrieve Point objects from the database: Right click the tutorial package in the [Package Explorer] window and select New Class . The package name should be tutorial . Enter Main as the class name (case sensitive). Click Finish

Step 3: Add a Main Class

In this step we will add code to the Main class (that was generated with the project) in order to store Point objects in the database and then retrieve them from the database. Use copy and paste to replace the content of the Main class with the following content: package tutorial; import javax