ObjectDB Database Search

101-150 of 200 results

Optimization of Map Queries

.get(..) result(s) once to not query the map again and again for each test in my query ? 2) Is there anything I could do for shortening the query string? I guess there's no such thing as a "temporary" variable for being used in the query .. I am creating the query using criteriabuilder, then I am converting

how to query by properties of onetomany relations? (Error 990)

a variable that will iterate over the collection elements. This specific query should be rewritten ... variable , so this should be taken into consideration (since the meaning of the above JPQL queries ... - it should be replaced by a more descriptive error message in future versions. However, this query

query on calendar class

Hello!   I'm looking for help to build query on calendar class. I need to get objects ... ; @Temporal(TemporalType.TIMESTAMP) private Calendar start; I tested: Query query =em.createQuery("SELECT c FROM Cdr c where c.start.DAY_OF_WEEK = ?1",Cdr.class); query .setParameter(1,Calendar.FRIDAY

Query all objects that implements a given interface - is that possible?

Hi, I am trying query one of my DB - for all object types that implement a given interface.     TypedQuery query =         em.createQuery ... variable ('bk') of type Signals.Signal_Interface (error 737) at com.objectdb.jpa.JpaQuery

locks on pure query activities

that are just doing simple queries (just selects, no update or delete ...) show locks like these (question ... on separate disks you may be able to refer read only queries to replicated slaves. support Support ... We can see that the more threads are doing exactly the same query we step into more and more situations

Query to find object from element of a contained collection

a multi variable query with JOIN . support Support Thank you for the fast support ... elements by OrderData.items.itemId. I cant get a proper query with MEMBER OF or IN. Does anyone have an idea on how i could formulate that as Typed or CriteriaBuilder query ? Thanks.   @Entity

Query in JPA2 with LEFT JOIN on INNER JOIN

How write a query in JPA2 with LEFT JOIN on INNER JOIN? select a.description, a.id, p1.description ... ; JOIN close is invalid in JPQL. Instead of ON you may  include all the variables in ... the WHERE clause. But actually your query may indicate that you model is not optimized for JPA. Instead

Database Management Settings

, which modify the database. For debugging query failures, you might need to record "all" operations to reproduce ... can use the new indexes to accelerate relevant queries . The element The element specifies settings for the two query cache mechanisms that ObjectDB manages: The results attribute specifies the size

jakarta.persistence.Entity

with no parameters, and have no final methods or persistent instance variables . An enum, record, or ... of the entity class. This name is used to refer to the entity in queries . The name must not be a reserved literal in the Jakarta Persistence query language. Default: "" Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.Path

the use of Path variables . For example: CriteriaQuery q = cb.createQuery(Person.class); Root p = q.from ... the selection items composing a compound selection. Modifications to the list do not affect the query

JPA Entity Fields

an automatic query when the entity is retrieved. Note : Navigation through inverse fields is much less efficient than navigation through ordinary persistent fields because it requires running queries ... the following query , where :d represents the Department entity: SELECT e FROM Employee e WHERE e.department

Retrieving JPA Entities

its persistence context, it returns the existing managed object without querying the database. Otherwise, JPA ... , getReference might return a hollow object instead of querying the database immediately. It never returns null ... an entity and another for checking a persistent field of an entity. Retrieval by query The Query

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 ... lastName; Address address; : } Indexes in queries ObjectDB manages a B-tree for every index. A B-tree

jakarta.persistence.EntityManager

their primary key, and execute queries which range over entity types. An entity may be disassociated from ... must also be flushed before execution of any query whose result set would be affected by unflushed modifications ... accepts LockOption s. See Also: Query TypedQuery CriteriaQuery PersistenceContext

Online Backup

You can start an online backup by executing a special query on an EntityManager ( em ) instance ... ").getSingleResult(); The backup query string is always "objectdb backup" . The backup is created in the backup ... a custom backup root directory by setting the target parameter before you execute the backup query

JPA Exceptions

locking wait times. Query exceptions Exceptions specific to query execution and result retrieval: Thrown by Query .getSingleResult() when the query returns no results. Thrown by Query .getSingleResult() when the query returns more than one result. Thrown when a query exceeds the specified timeout limit

jakarta.persistence.criteria.CriteriaQuery

, CommonAbstractCriteria The CriteriaQuery interface defines functionality that is specific to top-level queries . Since: Jakarta Persistence (JPA) 2.0 The JPA Criteria API Queries article explains how to use ... query results are eliminated. A true value will cause duplicates to be eliminated. A false value

Is ObjectDB a NoSQL Database?

of NoSQL technology, which are weak query capabilities and lack of ACID (atomicity, consistency, isolation, durability). Unlike other NoSQL solutions, ObjectDB provides full support of rich complex queries , using two standard Java query languages: JPQL (Java Persistence Query Language) and JDOQL (JDO

Is ObjectDB better than competing object databases?

do not support aggregate queries (max, min, count, sum and avg). ObjectDB supports rich queries , including aggregate queries , as part of its support of JPQL (JPA Query Language) and JDOQL (JDO Query Language). ObjectDB is faster than other products.

Updating JPA Entities

and provide better support for automatic change tracking. UPDATE queries UPDATE queries provide an alternative way to update entities in the database. Using an UPDATE query is useful, especially when you must modify many entities in a single operation. The UPDATE Queries in JPA/JPQL section in Chapter 4 explains how to use JPA UPDATE queries .

JPA Extended API Reference Guide

, query facilities, metamodel details, configuration options, annotations, and exception information ... the fundamental classes and interfaces for entity management and persistence operations. Covers the query API, criteria queries , and JPQL for data retrieval and manipulation. Describes the metamodel and graph APIs

What are the main benefits of using ObjectDB?

processes JPQL (JPA Query Language) and JDOQL (JDO Query Language) queries directly, where ORM tools first convert these queries to SQL and then transition the SQL to the DBMS for execution through a JDBC

JPA Shared (L2) Entity Cache

several server-side caches: Cache of database file pages . Cache of query programs . Cache of query execution ... for a specific retrieval operation: // Before executing a query : query . setHint ("jakarta.persistence.cache

jakarta.persistence.criteria.AbstractQuery

functionality that is common to both top-level queries and subqueries. It is not intended to be used directly in query construction. All queries must have: a set of root entities (which may in turn own joins). All queries may have: a conjunction of restrictions. Since: Jakarta Persistence (JPA) 2.0

jakarta.persistence.criteria.Subquery

a subquery root correlated to a root of the enclosing query . Parameters: parentRoot - a root of the containing query Returns: subquery root. Since: Jakarta Persistence (JPA) 1.0 Join correlate ( Join parentJoin ) Create a subquery join object correlated to a join object of the enclosing query

jakarta.persistence.criteria.CriteriaBuilder

criteria queries , compound selections, expressions, predicates, orderings. Note that Predicate ... compatible with varags. Since: Jakarta Persistence (JPA) 2.0 The JPA Criteria API Queries article ... to specify a constructor that is applied to the results of the query execution. If the constructor

Deleting JPA Entities

the database. DELETE Queries DELETE queries provide an alternative way to remove entities from the database. They are especially useful for deleting many entities in a single operation. For more information, see DELETE Queries in JPA/JPQL .

Posting Sample Code

; em.getTransaction().commit();         Query query = em.createQuery("SELECT e FROM MyEntity e");         List resultList = query

Comparison in JPQL and Criteria API

Most JPQL queries use at least one comparison operator in their WHERE clause. Comparison operators ... (the JDO Query Language). ObjectDB supports both forms. In addition to the different notation ... these examples, :min and :max are query parameters : x BETWEEN :min AND :max x = :min AND x ) Predicate gt1 = cb

JPA Optimistic and Pessimistic Locking

query . Releasing a Pessimistic Lock Pessimistic locks are automatically released at the end ... mode can also be set for a query to lock all the query result objects. When a retrieval operation

JPA Primary Key

efficiently in the database. This technique is especially useful for queries that return large result ... , and other details. Suppose that queries to retrieve all events from a specific sensor in a specific ... can significantly improve query performance: @Entity public class Event { @EmbeddedId EventId id

Multiple MEMBER OF query

your query   item.label  appears twice,  but the same synthetic variable  for iterating ... OF item.labels But when I search for an item that have two specific labels, the following query ... .labels Is it a bug or JPQL query is wrong? Best regards, Pablo. Pablo Berra Pablo Berra

queries under 2.7.6_4 significantly slower than under 2.7.6

indicating deep query plan checks and an overall significant performance loss in all queries ... since version 2.7.6 that could possibly effect query execution. Could you please explain or post some of these logs that show deep query plan checks (and are new in 2.7.6_04)? In addition

combined index not used

plan that processes the query variables in a specific order. The order of variables above follows ... we have a query like this: SELECT a.endDate,a.objectsInCharge.nodePath,a.objectsInCharge ... .properties.doubleValue In the class Action we have a combined index (see attachment) but in the query plan

jakarta.persistence.EntityManagerFactory

, may be obtained by calling getCache , the CriteriaBuilder , used to define criteria queries , may be obtained by ... entityGraph - entity graph Since: Jakarta Persistence (JPA) 2.1 void addNamedQuery ( String name , Query query ) Define the query , typed query , or stored procedure query as a named query such that future query

JPA Fetch Plan Graphs

Jakarta Persistence (JPA) Entity Graphs optimize query performance by specifying which attributes should be loaded eagerly. Graph definitions Use the following interfaces to define ... as a template for a query or find operation, allowing you to override the default fetch strategies

JPA Connections and Transactions

the EntityManager . An EntityManager instance also functions as a factory for Query instances, which are used to execute database queries . Every JPA implementation provides classes that implement

BIRT/ODA ObjectDB Driver

The ObjectDB BIRT/ODA driver is an extension for the open-source Business Intelligence and Reporting Tools (BIRT). It adds support for ObjectDB as a data source and JPQL as a data set query language ... ) and click Next . Enter a JPQL or a JDOQL query and click Finish . See the Report Generation with BIRT and JPA tutorial for more detailed instructions.

JPA Annotations

behavior. Declare static, reusable JPQL queries directly on the entity class. Optimize data retrieval by ... . Annotations for defining Native SQL queries and result set mappings.

JPA Persistence Unit

that use annotations to define generators and named queries . Otherwise, these generators and named queries are available only after their containing classes become known to ObjectDB--for example, when the first instance of a class is stored in the database.

ObjectDB Overview

all the standard database management services (storage and retrieval, transactions, lock management, query ... . Advanced querying and indexing capabilities. Effective in heavy loaded multi-user environments

jakarta.persistence.criteria.CriteriaUpdate

Methods Root from ( Class entityClass ) Create and add a query root corresponding to the entity ... that is being updated. Parameters: entityClass - the entity class Returns: query root corresponding to the given entity. Since: Jakarta Persistence (JPA) 1.0 Root from ( EntityType entity ) Create and add a query root

jakarta.persistence.NamedQuery

: Annotation Target: Type Declares a named query written in the Jakarta Persistence query language. Query names are scoped to the persistence unit. A named query may be executed by calling EntityManager.createNamedQuery . The following is an example of the definition of a named query written in

jakarta.persistence.Embeddable

methods or persistent instance variables . An enum or interface may not be designated as

jakarta.persistence.Basic

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.Basic Implemented Interfaces: Annotation Target: Method, Field The simplest type of mapping of a persistent field or property to a single database column. The Basic annotation may be applied to a property or instance variable whose type

Step 4: Create an ObjectDB Data Set

Queries against the database are represented in BIRT as data sets. To create the data set: Open ... this tutorial contains Point entities. We will use a simple JPQL query that retrieves points with x value in ... and paste to enter the above query and click Finish . When the data set is created successfully

Step 3: Define an EJB Session Bean

getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return query .getResultList(); } } The  GuestDao session bean (EJB) class defines two methods

Step 3: Define a Spring DAO Component

() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return query .getResultList(); } } The GuestDao Spring component class defines two methods: persist

Step 3: Define a Spring DAO Component

getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return query .getResultList(); } } The GuestDao Spring component class defines two methods: persist

Step 3: Define an EJB Session Bean

); } // Retrieves all the guests: public List getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return query .getResultList(); } } The GuestDao session bean (EJB