ObjectDB Database Search

1-50 of 200 results

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

Problem with distinct select, order by and equivalent alias/attribute path

when ordering the results of some projection when the order by expression is different (though logically ... ;  + " order by s_location.id asc";         ... ;  + " order by s.location.id asc";        

java.lang.NullPointerException when using ORDER BY

== 0)) ORDER BY r.startDateTime DESC If we remove the ORDER BY part, the query completes OK ... am not sure if this problem is related to the other as the query works if you remove the order by ... which is used in the order by part, it always has a value. Anyway, we tried fixing the indices

Strange behaviour with ORDER BY and IN

performance I noticed a strange behaviour where an ORDER BY - directive isn't executed as ... if we order by a simple member (e.g. a String) being the Entity-ID and, at the same time, filter ... ("Locations without selection criterion in descending order ( by id): ");      

ORDER BY problem, when String starts with language specific character

Dear all, I have a problem with ORDER BY clause. I have a simple query: select u from User u order by u.name When the name starts with "normal/english" character, records are ordered correctly ... ORDER BY clause. However, if you have to sort a large result list - it might be more efficient

How the sort order (in queries) works for non english letters?

specify they locale as part of the index definition or the ORDER BY clause, so the sort uses ... (we are Czech company). How the sort order works for international (for us 'czech') letters? Does the ordering respects the national requirements? Thank you for clarification ... dmarko David Marko

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 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 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

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

Grouping by date()

with this issue. Query: select hour(ov.created), count(ov) from ObjectView ov group by hour(ov.created) order by ... have to group by date(). For few queries I was concatenating 'date' from year()-month()-day() calls ... with new version. When you group by date() there are two days per day. I mean group by divides each day

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

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

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

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

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

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

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

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

Alias not used in ORDER BY

would have expected the alias to be used in the ORDER BY clause, something like SELECT $1, UPPER($1.someStringProperty) AS TEST FROM T ORDER BY TEST However what I actually get as query string is SELECT $1, UPPER($1.someStringProperty) AS TEST FROM T ORDER BY UPPER($1.someStringProperty) This doesn't

jakarta.persistence.EntityManager

arguments must be specified in the order in which the result sets is returned by the stored procedure ... must be specified in the order in which the result sets is returned by the stored procedure ... via a call to close , to allow resources to be cleaned up by the persistence provider. This approach places

jakarta.persistence.ColumnResult

can be included in the query result by specifying this annotation in the metadata. Example: Query q = em.createNativeQuery( "SELECT o.id AS order _id, " + "o.quantity AS order _quantity, " + "o.item AS order _item, " + "i.name AS item_name, " + "FROM Order o, Item i " + "WHERE ( order _quantity 25

Collation and String Order

will affect the way strings are sorted in queries (with ORDER BY ). Currently strings are always ordered by Unicode order , and a workaround that enables controlling the order is to use normalizing, as ... feature. Many CRMs, DMS and other systems requires correct collation when using order by clause.  +1 for this ... dmarko David Marko

Apache License, Version 2.0, January 2004

the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright ... and all other entities that control, are controlled by , or are under common control with that entity

Privacy Policy

the Service. By using the Service, You agree to the collection and use of information in accordance ... files that are placed on Your computer, mobile device or any other device by a website, containing ... individuals employed by the Company to facilitate the Service, to provide the Service on behalf

JPA Persistable Types

are represented in queries by entity names . By default, the entity name is the unqualified name ... can be set explicitly by using the name attribute of the @Entity annotation: @Entity ( name ="MyName ... is declared as embeddable by marking it with the @Embeddable annotation: @Embeddable public class Address

Retrieving JPA Entities

the no-argument constructors of entity classes and keep them as simple as possible. Retrieval by class and primary key Every entity can be uniquely identified and retrieved by the combination of its class ... is similar to the find method, but if the entity is not already managed by the EntityManager

jakarta.persistence.ConstructorResult

annotation in the same order as that of the argument list of the constructor. Any entities returned as ... , " + "COUNT(o) as orderCount, " + "AVG(o.price) AS avgOrder " + "FROM Customer c, Orders o " + "WHERE o.cid = c.id " + "GROUP BY c.id, c.name", "CustomerDetailsResult"); @SqlResultSetMapping( name

jakarta.persistence.JoinColumn

Customer class @OneToMany @JoinColumn(name = "CUST_ID") // join column is in the table for Order public Set getOrders() { return orders ; } See Also: ManyToOne OneToMany OneToOne JoinTable ... Persistence (JPA) 1.0 String referencedColumnName (Optional) The name of the column referenced by

Database Management Settings

for each new database file. The resize attribute specifies the size by which to extend the database ... can improve performance by reducing file fragmentation that can result from frequent resize operations ... environments. By default, the recovery file is created in the same directory as the database file

JPA Class Enhancer

The ObjectDB Enhancer is a post-compilation tool that improves performance by modifying ... directly accessing persistent fields of other classes. This practice is required by the JPA specification but not enforced by ObjectDB. Instead, use the accessor and mutator methods of the desired class

Removed entities can be found by query in the same transaction

Hello, we opened a transaction, load an entity from database and removed this entity by em.remove(). Afterwards the entity can be load again by query although the resulted entity have an attribute ... explanation on the change in build 2.7.4_04: ObjectDB uses snapshots in order to isolate transactions, i.e

jakarta.persistence.Index

is given by the following simple BNF: column_list ::= index_column [, index_column]* index_column ::= column_name [ASC | DESC] If neither ASC nor DESC is not specified, ASC , that is, ascending order ... : "" Since: Jakarta Persistence (JPA) 1.0 String columnList (Required) The columns included in the index, in order

jakarta.persistence.EntityResult

.description " + "FROM Order o, Item i " + "WHERE (o.quantity 25) AND (o.item = i.id)", "OrderItemResults ... .acme. Order .class), @EntityResult(entityClass = com.acme.Item.class) } ) See Also: SqlResultSetMapping ... by the SQL query. Default: LockModeType.OPTIMISTIC Since: Jakarta Persistence (JPA) 3.2 FieldResult

jakarta.persistence.criteria.CriteriaBuilder.asc(Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Order asc (    Expression expression ) Create an ordering by the ascending value of the expression. Parameters: expression - expression used to define the ordering Returns: ascending ordering corresponding to the expression. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.desc(Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Order desc (    Expression expression ) Create an ordering by the descending value of the expression. Parameters: expression - expression used to define the ordering Returns: descending ordering

jakarta.persistence.criteria.CriteriaBuilder.asc(Expression,Nulls)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Order asc (    Expression expression ,    Nulls nullPrecedence ) Create an ordering by the ascending value of the expression. Parameters: expression - expression used to define the ordering

jakarta.persistence.criteria.CriteriaBuilder.desc(Expression,Nulls)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Order desc (    Expression expression ,    Nulls nullPrecedence ) Create an ordering by the descending value of the expression. Parameters: expression - expression used to define the ordering

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 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

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

Report Generation with BIRT and JPA

This tutorial demonstrates how to create reports based on data in an ObjectDB database using the popular open source Business Intelligence and Reporting Tools (BIRT). In order to keep things as simple as possible - we will use the basic  points.odb ObjectDB database file from the Getting

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