ObjectDB Database Search

1-50 of 200 results

SELECT clause (JPQL / Criteria API)

The ability to retrieve managed entity objects is a major advantage of JPQL. For example ... queries can also return results that are not entity objects. For example , the following query returns ... variable in the FROM clause. Nested path expressions are also supported. For example , the following

Strings in JPQL and Criteria Queries

(usually a parameter or literal). For example : c.name LIKE '_r%' is TRUE for 'Brazil' and FALSE ... an escape character, which is also specified. For example : '100%' LIKE '%\%' ESCAPE '\'   ... returns the number of characters in the argument string as an int . For example : LENGTH('United

FROM clause (JPQL / Criteria API)

at the WHERE clause level by using a type expression . For example , in the following query, c iterates ... name annotation element. Multiple range variables are allowed. For example , the following query ... is avoided. The above query, for example , can be executed as follows. An outer loop iterates with c1

Literals in JPQL and Criteria Queries

) are also supported. Following are examples of valid numeric literals in JPQL: int : 100, -127, 0, 07777 long ... for date literals: Date - {d 'yyyy-mm-dd'} - for example : {d '2019-12-31'} Time - {t 'hh:mm:ss'} - for example : {t '23:59:59'} Timestamp - {ts 'yyyy-mm-dd hh:mm:ss'} - for example : {ts '2020-01-03 13:59:59

Retrieving JPA Entity Objects

object is already managed by the EntityManager ). In the example above, when an Employee instance ... for the field. In the above example , when an Employee instance is retrieved all the referenced Project ... with the database and makes database programming easier. For example , after retrieving an Employee instance

Numbers in JPQL and Criteria Queries

and JDO. JPA follows Java numeric promotion principles. For example , the resulting type ... , which is always a positive number or zero. For example : ABS(-5) is evaluated to 5 ABS(10.7) is evaluated ... an extension). For example : MOD(11, 3) is evaluated to 2 (3 goes into 11 three times with a remainder of 2

Collections in JPQL and Criteria Queries

The IS [NOT] EMPTY operator checks whether a specified collection is empty or not. For example : c.languages ... of elements in a specified collection. For example : SIZE(c.languages)  is evaluated ... if a specified element is contained in a specified persistent collection field. For example : 'English' MEMBER

JPA Persistable Types

are automatically adjusted to the requested mode. For example , fields date1 , date2 and date3 ... the database. For example , the Arrays.asList method returns an instance of an internal Java ... the original classes and enable transparent activation and transparent persistence. For example , a collection

Privacy Policy

the use of the Service or from the Service infrastructure itself (for example , the duration of a page ... gifs) that permit the Company, for example , to count users who have visited those pages or opened an email and for other related website statistics (for example , recording the popularity of a certain

JPA Metamodel API

method or by the EntityManager 's getMetamodel method (both methods are equivalent). For example ... to as attributes). For example : // Get all the attributes - including inherited: Set attributes1 ... and the version attributes and the super type. For example : // Get the super type: IdentifiableType superType

UPDATE SET Queries in JPA/JPQL

;may break its synchronization with the database. For example , the EntityManager may not be aware ... of a specified entity class in the database (including instances of subclasses). For example , the following ... . For example : UPDATE Country SET population = 0, area = 0 UPDATE queries are executed using the 

Paths and Types in JPQL and Criteria API

and values. For example - c.capital , where c represents a Country entity object uses the capital ... . For example , c.capital.name is a nested path expression that continues from the Capital entity object ... . For example , the following criteria expression checks if the type of a specified entity e is not 

Setting and Tuning of JPA Queries

maximum is ignored. These methods support the implementation of efficient result paging. For example ... on all the result objects that the query retrieves. For example , the following query execution sets ... (unless it is overridden in a more local scope). For example , setting a query hint in

Schema Update

and fields in that package. The elements above specify renaming of the com. example .old1 and com. example .old2 packages. The com. example .old3 package is not renamed, but rename operations are specified

DELETE Queries in JPA/JPQL

 may break its synchronization with the database. For example , the EntityManager may not be aware ... of a specified entity class (including instances of subclasses) from the database. For example ... entity objects, is supported. For example , the following query deletes the countries with population

WHERE clause (JPQL / Criteria API)

them to the SELECT clause. For example , the following query retrieves all the countries with population size ... if any). For example , the following JPQL query: SELECT c FROM Country c WHERE c.population :p ... the WHERE clause content (overriding previously set WHERE content if any): For example , the following JPQL query: SELECT c FROM Country WHERE c.population :p AND c.area

Deleting JPA Entity Objects

= CascadeType . REMOVE ) private Address address; : } In the example above, the Employee entity class contains ... the response to disconnecting a relationship. For example , such as when setting the address field ... for collection and map fields. For example : @Entity class Employee { : @OneToMany ( orphanRemoval

Running JPA Queries

. For example , a result collection of a parameterized type can be iterated easily using an enhanced ... content. For example , the following query is expected to return a single Country object: Query query ... method. For example , the following query deletes all the Country instances: int count = em

Criteria Query Selection and Results

of Selection : See the SELECT in Criteria Queries section for more details and examples . ORDER BY ... ;for more details and examples . Query Results as Tuples JPA 2 introduces a new way to represent ... Criteria Queries for more details and examples . These interfaces are defined outside the javax

Shared (L2) Entity Cache

explicitly. For example : @Cacheable // or @Cacheable(true) @Entity public class ... explicitly. For example : @Cacheable (false) @Entity public class MyNonCacheableEntityClass extends ... operation. For example : em. find (MyEntity2.class, Long.valueOf(1),    Collections. singletonMap

Online Backup

of the original database file. For example , backing up a  test.odb  database file using the code ... side. For example , in client-server mode the code above could create the backup file on the server ... can be used, for example , for waiting until the backup is completed.     

GROUP BY and HAVING clauses

calculations - the GROUP BY functions merely as a DISTINCT operator. For example , the above query ... /WHERE objects (or object tuples) are considered as one group. For example , the following query ... and HAVING clauses. For example , the following JPQL query: SELECT c.currency, SUM(c.population) FROM

ORDER BY clause (JPQL / Criteria API)

expressions in the SELECT clause are allowed in the ORDER BY clause. The following query, for example ... receives groups rather than individual objects and ORDER BY can order these groups. For example : SELECT c ... . For example , the following JPQL query: SELECT c FROM Country c ORDER BY c.currency, c.population DESC

Locking in JPA

a PESSIMISTIC_READ lock on that database object. For example , consider the following code fragment: em1 ... operation. For example , the find method has a form that accepts a lock mode: Employee employee = em. find ... pessimistic locking, timeout can be specified as a property. For example : Map properties = new HashMap

JPA Exceptions

subclasses of PersistenceException . For example , an attempt to update the database with no active ... ; (which can be obtained by the getCause method) . For example , if a transaction fails ... : Exceptions can also be thrown on an attempt to retrieve entity objects from the database. For example

JPA Primary Key

primary key fields. Each primary key field must be one of the supported types listed above. For example ... method for getting the object ID (primary key) of a specified managed entity object. For example ... result sets. As an example , consider a real time system that detects events from various sensors

JPA Entity Fields

Hibernate) or to change default field settings. For example : @Entity public class EntityWithFieldSettings ... , the side that stores the data (the Employee class in our example ) is the owner. Only changes

Database Replication and Clustering

, only the first URL (the master database in this example ) is used. But when the first URL becomes unavailable ... this example  to the slave database) until the first URL becomes available again.

Detached Entity Objects

; : } In the example above, the Employee entity class contains an address field that references ... ) private Address address; : } In the example above, the Employee entity class contains an address field

Is ObjectDB better than competing object databases?

is also unique in supporting features that are usually available only in relational databases. For example ... that during development you may find that an essential feature is missing. For example , some competing products

JPA Query Structure (JPQL / Criteria)

classes and objects. For example , a JPQL query can retrieve and return entity objects ... . JPQL keywords, for example , can appear in queries either in upper case (e.g. SELECT) or in lower

JPA Class Enhancer

. For example , if objectdb.jar is located at c:\objectdb\bin , the JVM can be started by: $ java -javaagent:c ... 6 or above (and not on JRE 6 for example ). Second, classes that are loaded into the JVM before

Query Parameters in JPA

appearing in the query string. The parameter type is inferred by the context. In the above example ... section. For example , the following invocation passes a Date object as a pure date (no time): query

SpringBoot-Point

The SprintBoot-Point   example demonstrates a simple Spring Boot RESTful API web application that manage a collection of geometric points using Spring Boot and Jakarta Persistence (JPA) .  ... the primary components of the application: SpringBoot Point  Example - Component Diagram

Eclipse Public License - v 1.0

responsibility to secure any other intellectual property rights needed, if any. For example ... . For example , a Contributor might include the Program in a commercial product offering, Product X

Comparison in JPQL and Criteria API

which, for example , null == null is true . All the other operators implement the SQL logic in ... comparison of any two values that belong to the same group as detailed above. Therefore, for example

JPA Criteria API Queries

;the criteria API may be preferred. For example , building a dynamic query based on fields that a user ... (both methods are equivalent). In the example above a  CriteriaQuery instance is created

JPA Persistence Unit

” in the example ) identifies the persistence unit when instantiating an EntityManagerFactory ... classes become known to ObjectDB, for example when a first instance of the class is stored in the database.

Criteria Query From Elements

and examples . Join Fetch Elements Join Fetch is managed in criteria queries by the following interfaces: See the FROM in Criteria Queries  section for more details and an example .

Chapter 1 - Quick Tour

This chapter demonstrates basic ObjectDB and JPA concepts by introducing a simple example program. After reading this chapter you should be able to write basic programs that create, open and close ... ) on ObjectDB databases. The example program that this chapter presents manages a simple database

Database Server

, which is much more efficient. As a result, embedded mode should be preferred when possible. For example ... for the server (excluding the start , stop and the restart server commands). For example : $ server.exe

Database Explorer

query execution plan. This is useful, for example , for checking which indexes are used. The Reset button ... commands ( Cut , Copy and Paste ). For example , an entity object can be selected and copied as

Criteria Query Expressions

The following interfaces are in use in representing general expressions in criteria queries: See the Query Expressions section for more details and examples .

JPA Lifecycle Events

Callback methods are user defined methods that are attached to entity lifecycle events and are invoked automatically by JPA when these events occur. Internal Callback Methods Internal callback methods are methods that are defined within an entity class. For example , the following entity class

Apache License, Version 2.0, January 2004

indicated by a copyright notice that is included in or attached to the work (an example is provided

Server Configuration

to the data path. For example , "objectdb://localhost/my/db.odb" refers to a database file db.odb in

Storing JPA Entity Objects

{ : @OneToOne ( cascade = CascadeType . PERSIST ) private Address address; : } In the example

Date and Time in JPQL and Criteria Queries

, HOUR , MINUTE and SECOND . For example : YEAR({d '2011-12-31'}) is evaluated to 2011 . MONTH({d

Logical Operators in JPQL and Criteria API

expressions are represented in criteria queries by Expression and descendant interfaces. For example

JDO Predefined ID Classes

but should not be used as the type of a primary key field in a persistence capable class. For example