Internal Website Search
51-100 of 200 resultsJPA Query Structure (JPQL / Criteria) rather than just field values from database tables, as with SQL. That makes JPQL more object oriented friendly ... ;of up to 6 clauses in the following format: SELECT ... FROM ... [WHERE ...] [GROUP BY ... [HAVING ...]] [ORDER BY ...] The first two clauses, SELECT and FROM are required in every retrieval query | |
Strings in JPQL and Criteria Queries is not found. The third argument (when present) specifies from which position to start the search. LOWER ... Characters The TRIM([[LEADING|TRAILING|BOTH] [char] FROM ] str) function returns a string after removing ... to 'UK' . TRIM(LEADING FROM ' UK ') is evaluated to 'UK ' . TRIM(TRAILING FROM ' UK ') is evaluated | |
JPA Persistable Types only once even if they are referenced multiple times. Referencing instances of other persistable types from ... . In most cases ObjectDB can overcome a missing no-arg constructor. Aside from these constraints ... , int , long , float and double . Equivalent wrapper classes from package java.lang: Boolean , Byte | |
Privacy Policy the use of the Service or from the Service infrastructure itself (for example, the duration of a page visit and user actions during page views). Website refers to ObjectDB Website, accessible from ... where the data protection laws may differ than those from Your jurisdiction. Your consent to this Privacy | |
JPA Entity Fields persistent fields that are inherited from ancestor classes), is stored. When an entity object is stored in ... when a Department entity is retrieved from the database. ObjectDB accomplishes this by effectively running the following query (where :d represents the Department entity): SELECT e FROM Employee e WHERE e | |
Query Parameters in JPA) The following method retrieves a Country object from the database by its name: public Country getCountryByName( EntityManager em, String name) { TypedQuery query = em. createQuery ( "SELECT c FROM ... ( EntityManager em, String name) { TypedQuery query = em. createQuery ( "SELECT c FROM Country c | |
JPA Criteria API Queries: SELECT c FROM Country c An equivalent query can be built using the JPA criteria API as follows ... ); Root c = q. from (Country.class); q. select (c); The CriteriaBuilder interface serves as the main ... for representing the built query. Then a Root instance is created to define a range variable in the FROM | |
Deleting JPA Entity Objects Existing entity objects can be deleted from the database either explicitly by invoking the remove ... an object from the database it has to first be retrieved (no matter which way) and then in an active ... object is physically deleted from the database when the transaction is committed. Embedded objects | |
Running JPA Queries: TypedQuery query = em. createQuery ("SELECT c FROM Country c", Country.class); List results = query ... = em. createQuery ("SELECT c FROM Country c"); List results = query. getResultList (); An attempt ... result object. In this case, the result object has to be extracted from the result collection | |
Updating JPA Entity Objects Once an entity object is retrieved from the database (no matter which way) it can simply be modified in memory from inside an active transaction: Employee employee = em. find (Employee.class, 1); em ... can be cascaded from all the entity objects that have to be stored in the database, including from | |
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 ... , such as lost profits; iii) states that any provisions which differ from this Agreement are offered | |
Shared (L2) Entity Cache an entity object that is already managed by the EntityManager returns the existing instance from ... class which is not marked with @Cacheable inherits cacheability setting from its super class. Using ... . If an entity object is not available also in the shared cache - it is retrieved from the database and added | |
ObjectDB Object Database Features, derived attributes, grouping queries and aggregate queries) which are usually missing from Object Oriented ... can manage databases of various sizes efficiently, ranging from kilobytes to terabytes . Platform ... Recovery from failure by using a recovery file and double writing. Additional recovery layer | |
Working with JPA Entity Objects are provided in the Storing Entities section. Entity objects retrieved from the database by ... . A managed entity object can also be retrieved from the database and marked for deletion, using the EntityManager’s remove method within an active transaction. The entity object changes its state from | |
JPA Primary Key that is absent from other object oriented databases. Entity Identification Every entity object in the database is uniquely identified (and can be retrieved from the database) by the combination of its type ... are deleted from the database. The primary key value of an entity can be accessed by declaring | |
Apache License, Version 2.0, January 2004 resulting from mechanical transformation or translation of a Source form, including but not limited ... , that is based on (or derived from ) the Work and for which the editorial revisions, annotations ... . For the purposes of this License, Derivative Works shall not include works that remain separable from , or merely | |
Index Definition classes from package java.lang: Byte , Short , Character , Integer , Long , Float , Double. java.math ... and range queries: SELECT p FROM Point p WHERE p.x = 100 SELECT p FROM Point p WHERE p.x BETWEEN 50 AND 80 SELECT p FROM Point p WHERE p.x = 50 AND p.x = 10 But this time a full index scan is required | |
JPA Class Enhancer the objectdb.jar file. You can run it from the command line as follows: java -cp objectdb.jar com ... .sh on Unix/Linux) from the ObjectDB bin directory. To use that script you have to edit the paths ... The ObjectDB Enhancer can also be invoked from Java code: com.objectdb.Enhancer.enhance("test.pc.*,test.X | |
JPA Named Queries query strings from the Java code. It also enforces the use of query parameters ... : @NamedQuery ( name ="Country.findAll", query ="SELECT c FROM Country c") The @NamedQuery annotation ... ", query ="SELECT c FROM Country c") public class Country { ... } Attaching multiple named queries | |
JPA Lifecycle Events - after an entity has been retrieved from the database. @PreUpdate - when an entity is identified as modified by ... - after deleting an entity from the database (during commit or flush ). An entity class may include callback ... can be used to exclude an entity class and all its descendant classes from using the default listeners | |
Database Explorer it from the command line as follows: java -jar explorer.jar If explorer.jar is not in the current ... ... command, specify a bookmark name and click OK . Bookmarked entity objects can be accessed from ... itself from the database. Editing Collections Elements can be added to collections by using | |
Database Management Settings can be used to fix the database. Recovery from failure is automatically applied by ObjectDB ... are generated by running the Activator utility: java -cp objectdb.jar com.objectdb.Activator from ... (when using the OEM license) are signed and excluded from evaluation restrictions. Therefore, when ObjectDB | |
Logical Operators in JPQL and Criteria API query retrieves countries whose population and area (both) exceed specified limits: SELECT c FROM ... FROM Country c WHERE c.population :population OR c.area :area A valid operand of an OR operator ... c FROM Country c WHERE NOT (c.population :population) The operand of a NOT operator | |
Chapter 6 - Configuration, the configuration file is loaded from $objectdb/objectdb.conf where $objectdb represents the ObjectDB home ... ) is derived from the location of the objectdb.jar file. It is defined as the path to the directory in ... file is loaded from $objectdb/objectdb.conf . You can specify an alternative path by setting | |
Server User List the user to connect to the server only from the specified IP addresses. For instance, "127.0.0.1 ... connecting from any IP address in the range of 192.18.0.0 to 192.18.194.255 , as well as from 127.0.0.1 | |
Database Server are: The ability to access and use databases from different processes simultaneously. The ability to access ... Server tool is bundled in the objectdb.jar file. You can run it from the command line as follows: java ... to locate and load the objectdb.jar from the same directory in which it is started. By default, server | |
SSL Configuration signature. This file is generated from the Keystore file by omitting the private key ... from any machine as long as a valid username and password are provided. If authenticating the client machine by the server is also required a Keystore file (which might be different from | |
Database Transaction Replayer is useful for two different purposes: It enables recovery from a database failure by replaying ... . It can be run from the command line: java -cp objectdb.jar com.objectdb.Replayer my.odb If objectdb.jar | |
Setting and Tuning of JPA Queries. Setting Query Hint (Scopes) Query hints can be set in the following scopes ( from global to local ... .findAll", query ="SELECT c FROM Country c", hints ={@ QueryHint (name | |
ObjectDB License Agreement [ver. 2.0.4] steps to protect the Software from any use, reproduction, or distribution except specifically ... destroying all copies of the Software. This agreement will terminate immediately without notice from | |
Schema Update is changed from the original name, which is specified by the required name attribute, to the new name ... attribute is specified the class name is changed from the original name, which is specified by | |
JPA Queries;(e.g. "SELECT c FROM Country" ). Criteria Query API Building dynamic queries with a structure ... are organized in this reference into three groups. SELECT and ORDER BY elements (including tuples): FROM clause | |
Defining a JPA Entity Class Point objects from the database: package com.objectdb.tutorial; import javax.persistence.Entity ... primary keys and automatic sequential value generation . This is a very powerful feature of ObjectDB that is absent from other object oriented databases. | |
JPA Query API for both Query and TypedQuery : Query q1 = em. createQuery ("SELECT c FROM Country c"); TypedQuery q2 = em. createQuery ("SELECT c FROM Country c", Country.class); In the above code, the same JPQL query | |
Database Connection using JPA instance obtained from the EntityManager . An EntityManager instance also functions as a factory ... from the owning EntityManagerFactory instance. Calling the close method is essential to release | |
UPDATE SET Queries in JPA/JPQL to retrieve data from the database, UPDATE queries do not retrieve data from the database | |
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 ... when they are retrieved from the database. In addition to improving efficiency (relative | |
ObjectDB Website - Terms and Conditions of Use from using or accessing this site. The materials contained in this web site are protected by ... notations from the materials; or transfer the materials to another person or "mirror" the materials | |
Step 4: Add a Servlet Class of guests: List guestList = em.createQuery( "SELECT g FROM Guest g", Guest.class).getResultList ... is retrieved from the application scope attribute, and then an EntityManager (representing a database ... entity objects are retrieved from the database and stored in the request's "guest" attribute | |
Step 3: Define an EJB Session Bean getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class ... - for retrieving all the existing Guest objects from the database. EJB classes are only supported by Java EE ... and Jetty. By using EJB classes we can move some work from the application to the EJB container (i.e | |
Step 3: Define a Spring DAO Component() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return ... Guest objects from the database. By using Spring components we can move some work from | |
Step 3: Define a Spring DAO Component getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return ... all the existing Guest objects from the database. By using Spring components we can move some work from | |
Step 3: Define an EJB Session Bean); } // Retrieves all the guests: public List getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM ... . getAllGuests - for retrieving all the existing Guest objects from the database. EJB classes ... , such as Tomcat and Jetty. By using EJB classes we can move some work from the application to the EJB | |
Step 4: Add a Servlet Class.getTransaction().commit(); } // Display the list of guests: List guestList = em.createQuery( "SELECT g FROM ... on every http request: The EntityManagerFactory is retrieved from the application scope attribute ... is constructed and stored in the database. All the Guest entity objects are retrieved from the database | |
[ODB1] Chapter 7 - JDOQL Queries There are various ways to retrieve objects from an ObjectDB database, as shown in section 6.3 ... SQL for RDBMS. It provides object retrieval from the database according to a specified selectioPlan ... result is a subset of objects from the candidate collection that contains only the instances | |
[ODB1] Chapter 5 - JDO Connections a pool of free PersistenceManager instances. From the developer's point of view, connection pool ... from a pool. Both PersistenceManagerFactory and PersistenceManager are defined as JDO interfaces ... level as a default for all the transactions of PersistenceManager instances obtained from that factory | |
Step 3: Create an ObjectDB Data Source Explorer] window and selecting New Data Source . Select ObjectDB Data Source from the list ... the database connection url: Download and save the points.odb database file ( from the Quick | |
Step 6: Design a BIRT Report Table In this final step we will add a simple table to the report: Open the [Insert Table] dialog box by dragging a Table from the [Palette] window and dropping it on the report design (.rptdesign ... ) in the third field and click OK . Fill the table with data by dragging the x and y columns from | |
[ODB1] Chapter 4 - JDO Metadata, only persistent fields from classes B and C are stored. The closest persistent super class in ... object is retrieved from the database its fields are not ready yet. Only when the program accesses a field is the field value loaded automatically by ObjectDB from the database. If the field belongs | |
[ODB1] Chapter 2 - A Quick Tour ArrayList list; 18 try { 19 // Retrieve the list from the database by its name: 20 list = (ArrayList ... empty (not the first run), a previously stored ArrayList instance is expected to be retrieved from ... objects (like list in this example) are called persistent objects . An object retrieved from |