ObjectDB Database Search

101-150 of 200 results

Setting and Tuning of JPA Queries

because the setter methods in Query and TypedQuery support method chaining by returning the query object on which they were invoked. Flush mode (setFlushMode) Changes made to a database by using an EntityManager ... execution is much more complex. Therefore, before a query is executed, any uncommitted database changes

Chapter 1 - Quick Tour

instructions on how to start using JPA in your IDE with the ObjectDB object database . Because ObjectDB ... ObjectDB databases and perform basic CRUD (Create, Retrieve, Update, and Delete) operations. The example program in this chapter manages a simple database that contains points in the plane. Each point

What are the main benefits of using ObjectDB?

performance. Reducing Development Time and Costs ObjectDB makes database programming easier and faster. The ability to store ordinary objects in the database directly can simplify the code significantly ... fields can be stored by ObjectDB simply as part of the containing object . Relational databases lack

JPA Query API

, which retrieves all Country objects from the database , is represented by both q1 and q2 . When you build ... is Object . When a more specific result type is expected, use the TypedQuery interface. The TypedQuery ... and TypedQuery objects : Query q1 = em. createQuery ("SELECT c FROM Country c"); TypedQuery q2 = em. createQuery

About Us

ObjectDB Software develops, markets and supports the ObjectDB Object -Oriented Database Management ... persistence solution for Java, based on the Java Persistence API (JPA) and the Java Data Objects (JDO) standards, since ObjectDB is the first object oriented database with built in support of JPA and JDO

JPA ORM Mapping Annotations

Jakarta Persistence (JPA) provides a comprehensive set of annotations and enums for mapping object models to relational database schemas. These metadata elements define how entities, attributes ... and schema definitions Use the following annotations to map entities to database tables and define

JPA Shared (L2) Entity Cache

several server-side caches: Cache of database file pages . Cache of query programs . Cache of query execution results . The scope of these server-side caches is wider because they exist per database and are shared by all EntityManagerFactory and EntityManager instances for that database

UPDATE SET Queries in JPA/JPQL

. Apply the changes to the database by calling the commit method. JPQL UPDATE queries provide ... specified entities directly in the database without retrieving them first. Using an UPDATE query ... because bypassing the EntityManager can disrupt its synchronization with the database . For example

Query Parameters in JPA

a Country object from the database by its name: public Country getCountryByName( EntityManager em ... filters the query results to Country objects whose name field is equal to :name . The :name identifier ... , parameters and other query elements are represented by objects (of type ParameterExpression or

JPA Named Queries

" that retrieves all Country objects from the database : @NamedQuery ( name ="Country.findAll", query ... of named queries. However, because mapping files are mainly useful for Object -Relational Mapping (ORM ... all the managed classes that it is aware of, which includes all entity classes that have objects in

ObjectDB 2.9 Developer's Guide

ObjectDB. hows how to use JPA to store, retrieve, update and delete database objects . Explains ... Welcome to ObjectDB for Java/JPA Developer's Guide. Here you can learn how to develop database ... you productive with ObjectDB and JPA in a short time. Guide Structure Demonstrates basic database

JPA Connections and Transactions

A connection to a database is represented by an EntityManager instance, which also provides methods for performing database operations. Many applications require multiple database connections during their lifetime. For example, in a web application, it is common to establish a separate database

JPA Queries

Jakarta Persistence provides powerful APIs for executing database queries using JPQL strings or ... with full type safety. General query objects Execute SELECT, UPDATE and DELETE queries in JPA using ... EntityManager  methods such as createQuery to build  query objects using: Direct JPQL query strings

Index Definition

Querying without indexes requires sequential iteration over entities in the database . If many ... this full iteration, allowing complex queries over millions of objects to execute quickly ... files. When an entity is stored in the database , every indexed field must contain either null or a value

ObjectDB License Agreement [ver. 2.0.4]

and objects in a database file. The full edition of the Software (without the restrictions ... the ObjectDB Database Management System software ("The Software"), subject to the terms and provisions ... and only as part of the Customer's product ("The Product"). The Product is not a Database Management

Auto Generated Values

strategies. The AUTO strategy ObjectDB maintains a global number generator for each database . This generator creates automatic object IDs for entities that do not have defined primary key ... a primary key for each new entity. These generated values are unique at the database level

JPA Persistence Unit

the configuration object : EntityManagerFactory emf = Persistence.createEntityManagerFactory(config); Using  ... classes using .managedClass(). Set Properties:  Pass database credentials and provider ... the database URL, user name, and password, as demonstrated above. XML mapping metadata ObjectDB supports

JPA Metamodel and Graphs

object model at runtime. It allows developers to programmatically examine entities, embeddables ... repository for all managed types within a persistence unit (or an ObjectDB database ). It provides methods ... integration Integrate metamodel objects with the Criteria API using the following interface: Represents

JPA Annotations

engine manages objects and their database mappings. These annotations configure entity behavior ... specifically for Object -Relational Mapping (ORM) and native SQL execution; ObjectDB ignores these relational annotations: Annotations for mapping objects to relational tables, columns, and foreign keys

JPA Attributes Annotations

property as an attribute containing a collection of embedded objects . This is used for "one-to-many ... ): Specifies the database SQL type for a persistent field or property of type java.util.Date or java.util.Calendar . Specifies the database SQL type for a map key of type java.util.Date or java.util.Calendar

JPA Runtime Tuning & Configuration

every operation in that session. Query (definition): Settings applied to a Query object override session ... when the persistence context is synchronized with the database and when in-memory entity changes are written to the database . Available options are AUTO (flush before queries and at commit) and COMMIT (flush

Chapter 2 - JPA Entity Classes

Entity class is a user-defined class whose instances can be stored in a database . To store data in an ObjectDB database by using Jakarta Persistence (JPA), you define entity classes that represent your application's data object model. This chapter contains the following sections:

General Settings and Logging

results that contain millions of objects . The element specifies temporary file settings: The path ... a list of the most recently used database URLs for the Explorer tool. The size attribute specifies ... recently used databases in the Explorer easier. The element The element specifies general logging

JPA Extended API Reference Guide

for representing the persistent object model. Use these interfaces to inspect entity structures dynamically, build type-safe queries, and optimize database fetching. Lists additional dynamic configuration options for common JPA operations. Details the annotations used to define the persistent object

JPA Metamodel API

The JPA Metamodel API enables you to examine the persistent object model and retrieve details ... -defined persistable types (also known as managed types) in the persistent object model. Three methods ... all types whose instances are already stored in the database . Three additional methods retrieve

jakarta.persistence.criteria.CriteriaBuilder

( Class targetEntity ) Create a CriteriaDelete query object to perform a bulk delete operation. Parameters: targetEntity - target type for delete operation Returns: the query object . Since: Jakarta ... query object to perform a bulk update operation. Parameters: targetEntity - target type for update

jakarta.persistence.StoredProcedureQuery

and getSingleResult are called on a StoredProcedureQuery object , the provider calls execute ... is called on a StoredProcedureQuery object , the provider will call execute on an unexecuted stored ... of the first result the query object was set to retrieve. Returns 0 if setFirstResult was not

JPA Criteria FROM and JOIN

variables for iterating over data in the database that may be relevant to the query results. Query ... . FetchParent serves as the base for objects that can initiate these fetch operations, such as From

jakarta.persistence.Query

. Since: Jakarta Persistence (JPA) 3.2 int getFirstResult () The position of the first result the query object was set to retrieve. Returns 0 if setFirstResult was not applied to the query object . Returns ... for the query execution. If a flush mode has not been set for the query object , returns the flush mode in

jakarta.persistence.PersistenceUnitUtil

cannot be loaded from the database . Since: Jakarta Persistence (JPA) 3.2 Object getIdentifier ( Object ... : IllegalArgumentException - if the given object is not an instance of an entity class belonging to the persistence unit ... until after the database insert has occurred. Returns null if the entity does not yet have an id. Parameters: entity

Step 2: Define a JPA Entity Class

To store objects in an ObjectDB database using JPA we need to define an entity class: Open ... to create the new class. The new class should represent Guest objects in the database . Use copy ... ; The new class should represent Guest objects in the database . Besides the @Entity annotation

Step 3: Define a Spring DAO Component

Operations on the database will be performed by an instance of a Data Access Object (DAO ... ; Guest objects from the database . By using Spring components we can move some work from ... .transaction.annotation.Transactional; @Component public class GuestDao { // Injected database

Step 3: Add a Main Class

to store Point objects in the database and then retrieve them from the database . Use copy and paste ... .createEntityManager(); // Store 1000 Point objects in the database : em.getTransaction().begin(); for (int i = 0; i ... a database connection // (create a new database if it doesn't exist yet): EntityManagerFactory emf

Step 3: Define a Spring DAO Component

Operations on the database will be performed by an instance of a Data Access Object (DAO ... ; Guest objects from the database . By using Spring components we can move some work from ... .springframework.transaction.annotation.Transactional; @Component public class GuestDao { // Injected database

Step 2: Entity Class and Persistence Unit

To store objects in an ObjectDB database using JPA we need to define an entity class: Open ... objects in the database was created in the project (under Java Resources: src guest). Use copy ... + ")"; } } The Guest entity class will represents guests in the database . We also need to configure JPA by setting

Step 2: Entity Class and Persistence Unit

To store objects in an ObjectDB database using JPA we need to define an entity class: Open ... objects in the database was created in the project (under Source Packages guest). Use copy and paste ... the [Provider and Database ] step just click Finish to generate a default persistence.xml file

Step 2: Entity Class and Persistence Unit

To store objects in an ObjectDB database using JPA we need to define an entity class: Right click ...   Finish to create the new entity class. A new class that should represent  Guest objects in the database was created in the project (under Java Resources: src/main/java guest). Use  copy

Step 3: Add a Main Class

= emf.createEntityManager(); // Store 1000 Point objects in the database : em.getTransaction().begin(); for (int i = 0; i ... 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

Step 2: Entity Class and Persistence Unit

To store objects in an ObjectDB database using JPA we need to define an entity class: Open ... objects in the database was created in the project (under Source Packages guest). Use copy and paste ... entity class. In the [Provider and Database ] step click Finish to generate a default persistence.xml

Step 3: Define an EJB Session Bean

all the existing  Guest objects from the database . EJB classes are only supported by Java EE ... Operations on the database will be performed by an instance of a session bean (EJB) class ... { // Injected database connection: @PersistenceContext private EntityManager em; // Stores a new guest

Step 3: Define an EJB Session Bean

- for retrieving all the existing Guest objects from the database . EJB classes are only supported by ... Operations on the database will be performed by an instance of a session bean (EJB) class ... ; @Stateless public class GuestDao { // Injected database connection: @PersistenceContext private

Step 2: Define a JPA Entity Class

To store objects in an ObjectDB database using JPA we need to define an entity class: Open ... on " + signingDate + ")"; } } The new class should represent Guest objects in the database ... listener class that will manage a JPA's EntityManagerFactory representing the ObjectDB database .

Step 2: Define a JPA Entity Class

To store objects in an ObjectDB database using JPA we need to define an entity class: Right click on the project in the [Package Explorer] window and select New Class . Enter tutorial as the package ... should represent Point objects in the database . Apart from the @Entity annotation and the id field

Step 2: Define a JPA Entity Class

To store objects in an ObjectDB database using JPA we need to define an entity class: Open the [New Java Class] dialog box, e.g. by right clicking the tutorial package node (in the [Projects] window ... objects in the database . Besides the @Entity annotation and the id field (and its annotations

Step 4: Run the Application

, a new ObjectDB database file is generated in the db subdirectory under the ObjectDB installation directory. Running the application again will use the existing database file to store an additional 1,000 objects . You can view the content of the database file by opening it in the ObjectDB Explorer

Step 4: Run the Application

the existing database file to store an additional 1000 objects . You can view the content of the database file ... ) When you run the application for the first time, a new ObjectDB database file is generated in the db sub

JPA Tutorials

The following tutorials demonstrate how to develop database driven applications using JPA and the ObjectDB ODBMS ( Object Oriented Database Management System). Console JPA Tutorial The Quick Start tutorial demonstrates how to use ObjectDB and JPA in a console application: Quick Start with JPA

Step 4: Add a Controller Class

the next tutorial step) - a new Guest entity is constructed and stored in the database . Processing ... . The JSP uses the GuestDao component to display the existing Guest objects . The returned ModelAndView object defines a target JSP ( "guest.jsp" ) and passes the GuestDao component to the JSP as a request

Step 4: Add a Controller Class

is constructed and stored in the database . Processing is forwarded to a JSP page ... to display the existing Guest objects . The returned ModelAndView object defines a target JSP ( "guest

Getting Started with JPA

. That is one of the benefits of ObjectDB, which is the only Object Database with built in support of JPA