ObjectDB Database Search

1-50 of 200 results

ORDER BY clause (JPQL / Criteria API)

The ORDER BY clause specifies the order for the query results. Any JPQL query that does not include an ORDER BY clause returns results in an undefined and non-deterministic order . ORDER BY ... , ordered by country name: SELECT c.name FROM Country c WHERE c.population 1000000 ORDER BY c.name

GROUP BY and HAVING clauses

The GROUP BY clause groups query results. A JPQL query with a GROUP BY clause returns properties of the resulting groups instead of individual objects and fields. In the query execution order , the GROUP BY clause is processed after the FROM and WHERE clauses but before the SELECT clause

jakarta.persistence.criteria.Order

Jakarta Persistence (JPA) Interface jakarta.persistence.criteria. Order An object that defines an ordering over the query results. Since: Jakarta Persistence (JPA) 2.0 The ORDER BY clause (JPQL / Criteria API) article explains how to use Order . Public Instance Methods Expression getExpression

Database Explorer

between the Shown Fields and Hidden Fields lists. You can change the order of the shown fields by ... , you must specify the path to the file. Alternatively, you can run the Explorer by double-clicking explorer.jar ... a database path on the server, which you can do by using the Browse button. You can also open recently used

jakarta.persistence.criteria.CriteriaQuery.orderBy(Order...)

orderBy (    Order ... o ) Specify the ordering expressions that are used to order the query results. Replaces the previous ordering expressions, if any. If no ordering expressions are specified, the previous ordering , if any, is simply removed, and results will be returned in no particular

jakarta.persistence.criteria.Order.reverse()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. Order Order reverse() Switch the ordering . Returns: a new Order instance with the reversed ordering . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.Order.isAscending()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. Order boolean isAscending() Whether ascending ordering is in effect. Returns: boolean indicating whether ordering is ascending. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.Order.getExpression()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. Order Expression getExpression() Return the expression that is used for ordering . Returns: expression used for ordering . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.Order.getNullPrecedence()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. Order Nulls getNullPrecedence() Return the precedence of null values. Returns: the precedence of null values . Since: Jakarta Persistence (JPA) 3.2

JPA Criteria Query Selection and Results

and ordering , mirroring the SELECT and ORDER BY clauses in JPQL or SQL. These interfaces allow you to specify ... class). For more information, see the SELECT in Criteria Queries section. ORDER BY clause elements Result ordering is represented by : Specifies an ordering on a query expression, supporting

JPA Query Structure (JPQL / Criteria)

...]] [ ORDER BY ...] The SELECT and FROM clauses are required in every query that retrieves data; update ... , HAVING , and ORDER BY are optional. The structure of JPQL DELETE and UPDATE queries is simpler: DELETE ... , max , ...) Criteria ORDER BY ( orderBy , Order , asc , desc )

JPA Entity Fields

, you can set the order of the retrieved owner entities by using the @OrderBy annotation: @Entity ... Employee e WHERE e.department = :d ORDER BY e.name The specified field ( "name" ) must be a sortable ... and final entity fields are always considered transient. You can declare other fields as transient by using

JPA Lifecycle Events

annotation. By default, callback methods in a superclass are also invoked for entities of its subclasses ... attached to an entity class are inherited by its subclasses. To prevent this inheritance, add ... NoDefaultListenersForThisEntityEither extends NoDefaultListenersForThisEntity { } Callback invocation order When multiple callback

Eclipse Public License - v 1.0

additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or ... entity that distributes the Program. "Licensed Patents" mean patent claims licensable by

JPA Primary Key

ordered by their primary key. Sometimes, it is useful to choose a primary key that helps cluster ... and can be retrieved by the combination of its type and its primary key. Primary key values must be unique for each ... part of their containing entities and do not have a separate identity. Automatic primary key By default

ObjectDB Object Database Features

). ORDER BY (including ASC, DESC). Aggregates (COUNT, SUM, AVG, MAX, MIN). Query Expressions Path ... Databases are also supported by ObjectDB. The combination of Object Database features ... (limited only by operating system resources). Unlimited CPUs and cores. Reliability and Stability Recovery

Index Definition

A composite index is an index on more than one persistent field. Define a composite index by specifying ... is an ordered map data structure that ObjectDB maintains in the file system, not in memory. The B ... is sorted lexicographically by word, not by word length. In summary, if an index contains all the fields in

JPA Criteria API Queries

BY and HAVING clauses ( groupBy , having , count , sum , avg , min , max , ...) ORDER BY clause ... are defined as strings, similar to SQL. In contrast, JPA Criteria queries are defined by instantiating ... ); List results = query. getResultList (); Because both types of queries are ultimately represented by

FROM clause (JPQL / Criteria API)

By default, the name of an entity class in a JPQL query is the unqualified name of the class (for example, Country with no package name). The default name can be overridden by specifying another name ... to a single-value expression are less commonly used because they can usually be replaced by

Paths and Types in JPQL and Criteria API

by all six comparison operators and used for ordering . Navigation through path expressions A path ... classes) are represented in JPQL by the following types of expressions: Variables : FROM ... persistent classes can participate in direct comparisons by using the = and operators

Query Parameters in JPA

a Country object from the database by its name: public Country getCountryByName( EntityManager em ... a value for the parameter by using the setParameter method. The setParameter method supports method chaining by returning the TypedQuery instance on which it was invoked. This allows you to chain

JPA Query Expressions (JPQL / Criteria)

, such as SELECT , FROM , WHERE , GROUP BY , HAVING , and ORDER BY . Each clause is composed of JPQL or ... of at least one atomic component. More complex query expressions are built by combining atomic expressions ... operators, listed in order of decreasing precedence: Navigation operator ( . ) Arithmetic operators

jakarta.persistence.criteria.CriteriaQuery

predicate. Since: Jakarta Persistence (JPA) 1.0 List getOrderList () Return the ordering expressions in order of precedence. Returns empty list if no ordering expressions have been specified. Modifications to the list do not affect the query. Returns: the list of ordering expressions

JPA Metamodel Attributes

are represented by : Represents single-valued attributes. This includes basic types (primitives ... ) with "To-One" cardinality. Plural (collection) attributes Collection-valued attributes are represented by ... . Represents an attribute typed as a java.util.Set , implying unique elements without a specific order

JPA Criteria Queries

to define SELECT, WHERE , GROUP BY , and ORDER BY clauses. To execute the query, pass the instance ... ; CriteriaQuery , CriteriaUpdate , and  CriteriaDelete are first built by static methods ... (Note: Subqueries are currently not supported by ObjectDB). Top-level queries and subqueries share

UPDATE SET Queries in JPA/JPQL

. However, they do not support the GROUP BY , HAVING , and ORDER BY clauses. For example, the following ... You can update existing entities, as explained in chapter 2 , by following these steps: Retrieve ... . Apply the changes to the database by calling the commit method. JPQL UPDATE queries provide

ObjectDB 2.9 Developer's Guide

A prior knowledge of database programming (SQL, JDBC, ORM or JPA) is not required in order to follow ... . Further Reading and Resources This guide focuses mainly on practical issues in order to make the reader proficient in a short time. After reading this guide you may want to extend your knowledge of JPA by reading a book on JPA.

JPA Relationships Annotations

Relationships define associations between entities. They are represented In Java code by ... the ordering and mapping of collection-based relationships using these annotations: Specifies the ordering of elements in a List-valued association at the time of retrieval. Specifies the attribute

DELETE Queries in JPA/JPQL

cannot include multiple variables, JOIN clauses, or the GROUP BY , HAVING , and ORDER BY clauses ... As explained in Chapter 2 , you can delete entities from the database by following these steps ... within an active transaction, either explicitly by calling the remove method or implicitly through a cascading

jakarta.persistence.criteria.CriteriaBuilder

. Since: Jakarta Persistence (JPA) 3.2 Order asc ( Expression expression ) Create an ordering by ... asc ( Expression expression , Nulls nullPrecedence ) Create an ordering by the ascending value ... an ordering by the descending value of the expression. Parameters: expression - expression used

What is the Java Persistence API (JPA)?

) is that in JPA data is represented by classes and objects rather than by tables and records as in ... order to interact with a relational database such as Oracle, DB2, SQL Server or MySQL. The popular JPA ... of the Java Persistence API (JPA). By interacting with ObjectDB using standard JPA

Chapter 4 - JPA Queries (JPQL / Criteria)

). The first section explains the structure of a JPQL query and a criteria query by describing the main clauses: SELECT , FROM , WHERE , GROUP BY , HAVING , and ORDER BY : The next section explains

JPA Queries

the query clauses. Elements used to define the SELECT and ORDER BY clauses. Elements for the FROM ... these core interfaces: The base interface for executing queries in JPA. It is often replaced by

What are the main benefits of using ObjectDB?

By using ObjectDB you can reduce development time and costs and improve your application ... fields can be stored by ObjectDB simply as part of the containing object. Relational databases lack that ability and require multiple tables, multiple records and join operations in order to support

jakarta.persistence.OrderBy

, ordering by the primary key of the associated entity is assumed. The property or field name ... is applied to an element collection of basic type, the ordering is by value of the basic objects ... = "students") @OrderBy // ordering by primary key is assumed public List getCourses() { ... } ... } Example 3

[ODB1] Chapter 7 - JDOQL Queries

; Ordering the Results A result collection can be ordered by a query. For example: Query query = pm ... is returned by the query. Iterating over the result collection using Iterator returns people in order ... the order in which they were added to the database (but this behavior is not specified by JDO

[ODB1] Chapter 6 - Persistent Objects

, sophisticated queries. The results can also be sorted by specified order expressions. Chapter 7 is devoted ... When a new object is constructed by the new operator, it always starts as a transient object, regardless of its type. Instances of persistent classes can become persistent later, as demonstrated by

[ODB1] Chapter 9 - ObjectDB Explorer

the "Shown Fields" and the "Hidden Fields" lists. You can change the order of the shown fields by ... \odbfe.jar my.odb Some JVM arguments can be useful. For instance, by default Java does not use ... . Otherwise, the required executable jar would not be found by explorer.exe. By default, running explorer.exe

[ODB1] Chapter 4 - JDO Metadata

file. The metadata is used first by the JDO Enhancer, and later by the JDO ... description of each class in several .jdo files in a pre defined order . If a metadata description ... the following paths (in the order shown): META-INF/package.jdo WEB-INF/package.jdo package.jdo a/package.jdo

Step 3: Define an EJB Session Bean

getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class ... Operations on the database will be performed by an instance of a session bean (EJB) class that we will define in this step: Open the [New Session Bean] dialog box by right clicking the guest package

Step 3: Define an EJB Session Bean

Guest g ORDER BY g.id", Guest.class); return query.getResultList(); } } The GuestDao session bean (EJB ... Operations on the database will be performed by an instance of a session bean (EJB) class that we will define in this step: Open the [New Java Class] dialog box by right clicking the guest package

[ODB1] Chapter 8 - ObjectDB Server

An ObjectDB server can manage one or more databases. Databases that are managed by a server can be accessed by multiple processes simultaneously. In addition, the server supports accessing these databases from remote computers by TCP/IP. More details about client server mode vs. embedded database

Step 3: Define a Spring DAO Component

() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return ... Operations on the database will be performed by an instance of a Data Access Object (DAO) that we will define in this step as a Spring MVC component: Open the [New Java Class] dialog box by right

Step 3: Define a Spring DAO Component

getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return ... Operations on the database will be performed by an instance of a Data Access Object (DAO) that we will define in this step as a Spring MVC component: Open the [New Java Class] dialog box by right

[ODB1] Chapter 5 - JDO Connections

consumes. Database connections are managed in JDO by the javax.jdo.PersistenceManagerFactory interface ... . The functionality of PersistenceManager instances returned by the getPersistenceManager() method ... properties. Using a Properties File Properties can also be specified in a file, as demonstrated by

JPA Tutorials

Tutorial Only basic Java experience is required in order to follow this tutorial. Web Application ... by step instructions on how to create the sample applications. In addition, the sample applications

[ODB1] Chapter 2 - A Quick Tour

, step by step. Both sample programs are contained in ObjectDB's samples directory. 2.1   ... ArrayList list; 18 try { 19 // Retrieve the list from the database by its name: 20 list = (ArrayList ... the database by its name "Hello World" using the getObjectById( ... ) method (line 20

[ODB1] Chapter 3 - Persistent Classes

store methods and code. Only the state of the object as reflected by its persistent fields is stored. Persistent fields, by default, are all the fields that are not defined as static , final or ... types above are defined as optional by JDO (arrays and most of the collection classes), but ObjectDB

ObjectDB 1.0 Manual

technology by Sun Microsystems. The main purpose of this guide is to familiarise you with ObjectDB ... class is and which types are supported by JDO. Chapter 4 - JDO Metadata Shows how to define JDO ... (SQL, JDBC or JDO) is not required in order to follow this guide, but a strong background

[ODB1] Chapter 1 - About ObjectDB

Compliant ObjectDB is compliant with the JDO (Java Data Objects) standard, developed by Sun ... DB2 and Microsoft SQL Server. In addition, by using JDO you are backed up by a large community ... with relational database concepts and the tables and columns defined for an application in order to perform