ObjectDB Database Search

1-50 of 200 results

Criteria Query Selection and Results

and for representing query results as tuples. SELECT Clause Elements The content of the SELECT ... ;for more details and examples. Query Results as Tuples JPA 2 introduces a new way to represent multi selection results (i.e. results of a query with multiple expressions in the SELECT clause) using

SELECT clause (JPQL / Criteria API)

= em. createQuery ("SELECT c FROM Country c", Country.class); List results = query. getResultList (); Because the results are managed entity objects they have all the support that JPA provides ... detection , support for delete , etc. Query results are not limited to entity objects. JPA 2 adds

Setting and Tuning of JPA Queries

. Result Range (setFirstResult, setMaxResults) The setFirstResult and  setMaxResults methods enable defining a result window that exposes a portion of a large query result list (hiding anything outside that window). The setFirstResult method is used to specify where the result window begins, i.e

Running JPA Queries

- for use when exactly one  result object is expected. Query.getResultList - for general use in any ... .getSingleResult - for use when exactly one  result object is expected. TypedQuery.getResultList ... results = query. getResultList (); Both Query and TypedQuery define a getResultList method

ORDER BY clause (JPQL / Criteria API)

The ORDER BY clause specifies a required order for the query results . Any JPQL query that does not include an ORDER BY clause produces results in an undefined and non-deterministic order. ORDER BY ... produces objects for examination and the WHERE clause selects which objects to collect as results

FROM clause (JPQL / Criteria API)

of countries that do not share a border, returning as results only neighboring countries. Caution ... part of any iterated pair and is therefore excluded from the query results . INNER JOIN simply skips any ... could also cause performance problems. For example, let's look at the following query execution and result

Logical Operators in JPQL and Criteria API

the result is FALSE , because one FALSE operand is sufficient for a FALSE result . If one operand is NULL and the other operand is either TRUE or NULL , the result is NULL (unknown). ObjectDB supports ... the result is TRUE , because one TRUE operand is sufficient for a TRUE result . If one operand is NULL

JPA Query API

should be used mainly when the query result type is unknown or when a query returns polymorphic results and the lowest known common denominator of all the result objects is Object . When a more specific result type is expected queries should usually use the TypedQuery interface. It is easier to run

jakarta.persistence.StoredProcedureQuery

procedure query, followed by getUpdateCount . The results of executeUpdate will be those of getUpdateCount . The execute method supports both the simple case where scalar results are passed back only via INOUT and OUT parameters as well as the most general case (multiple result sets and/or update

Database Management Settings

of the two cache mechanisms that ObjectDB manages for queries: The results attribute specifies the size of the query result cache. Caching results is very useful for recurring queries with identical arguments. As long as the relevant data in the database is unchanged cached results can be returned instead

Database Explorer

the result range. Check [Disable Cache] to bypass query program and result caches. Click the Execute ... with the query results , and the size of the result collection and the query execution time ... for the results . On the bottom of the query window there is a log panel that displays the selected

JPA Named Queries

rather than embedding literals dynamically into the query string and results in more efficient queries. @NamedQuery ... receives a query name and a result type and returns a TypedQuery instance: TypedQuery query = em. createNamedQuery ("Country.findAll", Country.class); List results = query. getResultList

ObjectDB Object Database Features

fast - much faster than any other JPA solution. General Highly optimized code (as a result of many profiling sessions). Unique data structures and algorithms (as a result of years of R&D). Outperforms ... . Query program cache (for repeating queries with different arguments). Query result cache (for repeating

JPA Criteria API Queries

clause. Finally, the range variable, c , is also used in the SELECT clause as the query result expression. CriteriaQuery TypedQuery TypedQuery TypedQuery query = em. createQuery (q); List results ... =      em. createQuery ("SELECT c FROM Country c", Country.class); List results

jakarta.persistence.criteria.MapJoin

The MapJoin interface is the type of the result of joining to a collection over an association or element ... : may result in a runtime failure. Inherited from Expression Parameters: type - intended type ... expression object. Unlike Expression.as , this method does result in a runtime type conversion

jakarta.persistence.criteria.SetJoin

of the result of joining to a collection over an association or element collection ... cause type conversion: the runtime type is not changed. Warning: may result in a runtime failure ... Expression.as , this method does result in a runtime type conversion. Providers are required to support

jakarta.persistence.criteria.CollectionJoin

interface is the type of the result of joining to a collection over an association or element collection ... : may result in a runtime failure. Inherited from Expression Parameters: type - intended type ... expression object. Unlike Expression.as , this method does result in a runtime type conversion

jakarta.persistence.criteria.ListJoin

of the result of joining to a collection over an association or element collection ... not cause type conversion: the runtime type is not changed. Warning: may result in a runtime failure ... Expression.as , this method does result in a runtime type conversion. Providers are required

jakarta.persistence.criteria.PluralJoin

does not cause type conversion: the runtime type is not changed. Warning: may result in a runtime ... . Unlike Expression.as , this method does result in a runtime type conversion. Providers are required ... FetchParent Parameters: attribute - target of the join Returns: the resulting fetch join

jakarta.persistence.criteria.CriteriaQuery

: - the type of the defined result Super Interfaces: AbstractQuery , CriteriaSelect ... query results are eliminated. A true value will cause duplicates to be eliminated. A false value will cause duplicates to be retained. If distinct has not been specified, duplicate results

jakarta.persistence.criteria.Join

. Warning: may result in a runtime failure. Inherited from Expression Parameters: type - intended type ... , returning a new expression object. Unlike Expression.as , this method does result in a runtime type ... : the resulting fetch join. Since: Jakarta Persistence (JPA) 1.0 Fetch fetch ( SingularAttribute attribute

jakarta.persistence.criteria.Root

. Warning: may result in a runtime failure. Inherited from Expression Parameters: type - intended type ... , returning a new expression object. Unlike Expression.as , this method does result in a runtime type ... : the resulting fetch join. Since: Jakarta Persistence (JPA) 1.0 Fetch fetch ( SingularAttribute

jakarta.persistence.criteria.From

conversion: the runtime type is not changed. Warning: may result in a runtime failure. Inherited from ... , this method does result in a runtime type conversion. Providers are required to support casting ... Parameters: attribute - target of the join Returns: the resulting fetch join. Since: Jakarta Persistence (JPA

jakarta.persistence.criteria.CriteriaBuilder

an all expression over the subquery results . Parameters: subquery - subquery Returns: all expression ... any ( Subquery subquery ) Create an any expression over the subquery results . This expression ... to specify a constructor that is applied to the results of the query execution. If the constructor

jakarta.persistence.EntityManager

must also be flushed before execution of any query whose result set would be affected by unflushed modifications ... ( ConnectionFunction function ) Call the given function and return its result using the database connection ... result Returns: the new query instance. Throws: IllegalArgumentException - if a query has not

jakarta.persistence.criteria.Subquery

. Warning: may result in a runtime failure. Inherited from Expression Parameters: type - intended type ... , returning a new expression object. Unlike Expression.as , this method does result in a runtime type ... distinct ) Specify whether duplicate query results are eliminated. A true value will cause duplicates

Apache License, Version 2.0, January 2004

resulting from mechanical transformation or translation of a Source form, including but not limited ... , incidental, or consequential damages of any character arising as a result of this License or

JPA Entity Fields

") List employees; } In that case the employees  field is filled with the results ... from the inverse query results by specifying a selected key field using the MapKey annotation

Database Transaction Replayer

all the recorded operations. The resulting database file is also generated in the recording directory as .odb ... 1000 are applied, the generated result file is expected to be 1000.odb .

Numbers in JPQL and Criteria Queries

and JDO. JPA follows Java numeric promotion principles. For example, the resulting type ... the same type the result type is the same. If the two operands have different types, numeric promotion

WHERE clause (JPQL / Criteria API)

objects to the SELECT clause for collecting as query results , the WHERE clause gets an opportunity ... evaluates to TRUE are passed to the SELECT clause and then collected as query results . WHERE Predicate

ObjectDB - JPA Object Database for Java

and eliminates the ORM layer. The result is better performance and faster applications, especially when the object data model is complex. See JPA benchmark results ...   Reduce development time. Improve

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 ... ). getSingleResult (); } The WHERE clause reduces the query results to Country objects whose name field value

Eclipse Public License - v 1.0

, and if a court requires any other Contributor to pay any damages as a result , the Commercial ... arose. Each party waives its rights to a jury trial in any resulting litigation.

Deleting JPA Entity Objects

Existing entity objects can be deleted from the database either explicitly by invoking the remove method or implicitly as a result of a cascade operation. Explicit Remove In order to delete ... a remove operation. To avoid dangling references as a result of orphan removal this feature

Entity Management Settings

. The on-persist attribute specifies whether cascading (as a result of either global or local setting) should be applied during persist. The on-commit attribute specifies whether cascading (as a result

GROUP BY and HAVING clauses

The GROUP BY clause enables grouping of query results . A JPQL query with a GROUP BY clause returns properties of generated groups instead of individual objects and fields. The position of a GROUP BY ... which returns the first letters as result . ObjectDB is very flexible in allowing JPQL expressions anywhere in

General Settings and Logging

, such as query results that contain millions of objects. The element specifies temporary file settings ... , which specifies when network sockets become obsolete as a result of inactivity. The value is the timeout

Locking in JPA

JPA 2 supports both optimistic locking and pessimistic locking . Locking is essential to avoid update collisions resulting from simultaneous updates to the same data by two concurrent users. Locking ... can also be set for a query in order to lock all the query result objects. When a retrieval operation includes

jakarta.persistence.TypedQuery

Jakarta Persistence (JPA) Interface jakarta.persistence.TypedQuery Type Parameters: - query result ... result the query object was set to retrieve. Returns 0 if setFirstResult was not applied to the query object. Inherited from Query Returns: position of the first result . Since: Jakarta Persistence (JPA

jakarta.persistence.Query

. Since: Jakarta Persistence (JPA) 3.2 int getFirstResult () The position of the first result the query object ... : position of the first result . Since: Jakarta Persistence (JPA) 2.0 The Running JPA Queries article ... int getMaxResults () The maximum number of results the query object was set to retrieve. Returns

jakarta.persistence.criteria.AbstractQuery

: - the type of the result Super Interfaces: CommonAbstractCriteria The AbstractQuery interface defines ... results are eliminated. A true value will cause duplicates to be eliminated. A false value will cause duplicates to be retained. If distinct has not been specified, duplicate results must be retained

jakarta.persistence.criteria.CriteriaBuilder.SimpleCase

not cause type conversion: the runtime type is not changed. Warning: may result in a runtime failure ... Expression.as , this method does result in a runtime type conversion. Providers are required ... Expression otherwise ( R result ) Add an "else" clause to the case expression. Parameters: result

jakarta.persistence.NamedNativeQuery

of the result of the native SQL query. Query names are scoped to the persistence unit. A named query ... how the native SQL query result set should be interpreted, for example: @NamedNativeQuery( name ... ) AND (i.name = 'widget')", resultClass = com.acme.Order.class ) In more complicated cases, a result

jakarta.persistence.criteria.CriteriaBuilder.Case

cause type conversion: the runtime type is not changed. Warning: may result in a runtime failure ... Expression.as , this method does result in a runtime type conversion. Providers are required to support ... for inequality. Since: Jakarta Persistence (JPA) 3.2 Expression otherwise ( R result ) Add

jakarta.persistence.NamedStoredProcedureQuery

, and its result type. The NamedStoredProcedureQuery annotation can be applied to an entity or mapped ... . The resultClasses element refers to the class (or classes) that are used to map the results . The resultSetMappings element names one or more result set mappings, as defined by the SqlResultSetMapping annotation

Storing JPA Entity Objects

New entity objects can be stored in the database either explicitly by invoking the persist method or implicitly as a result of a cascade operation. Explicit Persist The following code stores an instance of the Employee entity class in the database: Employee employee = new Employee("Samuel

Step 4: Create an ObjectDB Data Set

) and high ( 20 ): You may click Preview Results  to see the query results : Close the dialog box by

JPA Web App Tutorial - Maven Project

, you may download and run the result application as a Maven project: JPA Web App - Maven Project (6KB

Step 4: Add a Controller Class

)); // Prepare the result view (guest.jsp): return new ModelAndView("guest.jsp", "guestDao", guestDao