ObjectDB Database Search
1-50 of 200 resultsSELECT clause (JPQL / Criteria API) query = em. createQuery (" SELECT c FROM Country c", Country.class); List results = query ... expression in SELECT clauses. Specifying the required query results more precisely can improve ... must always be specified explicitly. JPQL does not support the the SELECT * expression, which is common in SQL | |
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 exactly what data is returned and how it is sorted within the result set. SELECT clause elements The following interfaces represent the content of a SELECT clause: Represents a single result item | |
jakarta.persistence.SharedCacheMode.ENABLE_SELECTIVE Jakarta Persistence (JPA) Enum Constant in jakarta.persistence.SharedCacheMode ENABLE _ SELECTIVE Caching is enabled for all entities for which Cacheable(true) is specified. All other entities are not cached. Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.criteria.Selection Jakarta Persistence (JPA) Interface jakarta.persistence.criteria. Selection Type Parameters: - the type of the selection item Super Interfaces: TupleElement The Selection interface defines an item that is to be returned in a query result. Since: Jakarta Persistence (JPA) 2.0 The SELECT clause (JPQL | |
jakarta.persistence.criteria.CriteriaQuery.select(Selection) select ( Selection selection ) Specify the item that is to be returned in the query result. Replaces the previously specified selection (s), if any. Note: Applications using the string-based API may need to specify the type of the select item when it results from a get or join operation | |
jakarta.persistence.criteria.CriteriaQuery.multiselect(Selection...) multiselect ( Selection ... selections ) Specify the selection items that are to be returned in the query result. Replaces the previously specified selection (s), if any. The type of the result ... be a tuple- or array-valued compound selection item. The semantics of this method are as follows | |
jakarta.persistence.criteria.CriteriaBuilder.tuple(Selection...) tuple ( Selection ... selections ) Create a tuple-valued selection item. Parameters: selections - selection items Returns: tuple-valued compound selection . Throws: IllegalArgumentException - if an argument is a tuple- or array-valued selection item. Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.criteria.CriteriaBuilder.array(Selection...) array ( Selection ... selections ) Create an array-valued selection item. Parameters: selections - selection items Returns: array-valued compound selection . Throws: IllegalArgumentException - if an argument is a tuple- or array-valued selection item. Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.criteria.CriteriaBuilder.construct(Class,Selection...) construct ( Class resultClass , Selection ... selections ) Create a selection item corresponding to a constructor. This method is used to specify a constructor ... entities will be in the new state after the query is executed. Parameters: selections - arguments | |
jakarta.persistence.criteria.Selection.getCompoundSelectionItems() Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. Selection List getCompoundSelectionItems() Return the selection items composing a compound selection . Modifications to the list do not affect the query. Returns: list of selection items. Throws: IllegalStateException - if selection | |
jakarta.persistence.criteria.Selection.alias(String) Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. Selection Selection alias ( String name ) Assigns an alias to the selection item. Once assigned, an alias cannot be changed or reassigned. Returns the same selection item. Parameters: name - alias Returns: selection item. Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.criteria.Selection.isCompoundSelection() Jakarta Persistence (JPA) Method in jakarta.persistence.criteria. Selection boolean isCompoundSelection() Whether the selection item is a compound selection . Returns: boolean indicating whether the selection is a compound selection . Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.SharedCacheMode.DISABLE_SELECTIVE Jakarta Persistence (JPA) Enum Constant in jakarta.persistence.SharedCacheMode DISABLE_ SELECTIVE Caching is enabled for all entities except those for which Cacheable(false) is specified. Entities for which Cacheable(false) is specified are not cached. Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.criteria.Subquery.select(Expression) Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.Subquery Subquery select ( Expression expression ) Specify the item that is to be returned as the subquery result. Replaces the previously specified selection , if any. Parameters: expression - expression specifying | |
How can I enable serialization? How can I enable serialization for objectdb or an entity manager if I do not use a configuration file: System.setProperty("objectdb.???", /* ??? */); OR this.entityManager.setProperty(/* ??? */, /* ??? */); itsme Martin Petzold It has to be enabled in the objectdb.conf file as shown on this manual | |
JPA Shared (L2) Entity Cache to one of the following values: NONE : The cache is disabled. ENABLE _ SELECTIVE : The cache is disabled except for selected entity classes (see below). DISABLE_ SELECTIVE : The cache is enabled except for selected ... cache settings The ENABLE _ SELECTIVE mode disables the cache for all entity classes | |
Database Management Settings is appropriate for most applications. The element When recovery is enabled , ObjectDB creates a recovery file ... the database. The element specifies the recovery file settings: The enabled attribute ( "true" or ... that is sometimes more efficient. When recording is enabled and recovery is disabled, recorded operations are used | |
Setting and Tuning of JPA Queries: // Enable query time flush at the EntityManager level: em. setFlushMode ( FlushModeType . AUTO ); // Enable query time flush at the level of a specific query: query. setFlushMode ( FlushModeType . AUTO ... is enabled . For more information, see the Lock Timeout section. "objectdb.query-language" - Sets | |
JPA Criteria API Queries Java objects that represent query elements. A major advantage of the Criteria API is that it enables ... : SELECT c FROM Country c You can build an equivalent query with the JPA Criteria API as follows ... = q. from (Country.class); q. select (c); The CriteriaBuilder interface is the main factory | |
GROUP BY and HAVING clauses, the GROUP BY clause is processed after the FROM and WHERE clauses but before the SELECT clause ... and pass the WHERE clause filter are grouped before being passed to the SELECT clause. GROUP BY as DISTINCT (no aggregates) The following query groups all countries by their first letter: SELECT | |
FROM clause (JPQL / Criteria API) the following query, c iterates over all the Country objects in the database: SELECT c FROM Country AS c The AS keyword is optional, and the same query can also be written as follows: SELECT c FROM Country c ... . For example, the following query returns all pairs of countries that share a common border: SELECT c1 | |
ORDER BY clause (JPQL / Criteria API), ordered by country name: SELECT c.name FROM Country c WHERE c.population 1000000 ORDER BY c.name ... produces objects for examination, and the WHERE clause filters them. Then, the SELECT clause builds ... directly from expressions in the SELECT clause. For example, the following query is invalid | |
Database Explorer and select the file. To open a database in client-server mode, select File Open C/S Connection ... , either write a query in the Query window or select an element to view (such as an entity class in the Schema ... . If the target element is an object in an open viewer window, the Window Focus Selection command | |
Query Parameters in JPA Query parameters enable you to define reusable queries. You can execute these queries ... , String name) { TypedQuery query = em. createQuery ( " SELECT c FROM Country c WHERE c.name = :name ... ( EntityManager em, String name) { TypedQuery query = em. createQuery ( " SELECT c FROM Country c WHERE c.name | |
SSL Configuration communication. The default configuration file contains the following element: The enabled attribute ... the example, SSL is disabled by default. Enable SSL when accessing remote ObjectDB databases ... keystore can be different from the server keystore. Setting the Configuration To use SSL, the enabled | |
JPA Criteria Query Expressions and selections , enabling the construction of dynamic, type-safe queries. These interfaces represent ... interfaces is structured as follows: Selection # Base interface for result items └─ Expression # Base ... , representing any typed value, calculation, or path within the query. Extends Selection   | |
WHERE clause (JPQL / Criteria API) The WHERE clause adds filtering capabilities to the SELECT -FROM statement. It is essential ... retrieves only countries with a population greater than the value of the parameter p : SELECT c ... to the SELECT clause to be collected as query results, the WHERE clause acts as a filter. The boolean | |
JPA Entity Fields the following query, where :d represents the Department entity: SELECT e FROM Employee e WHERE e.department ... this case, the employees field is populated with the results of the following query: SELECT e FROM ... that follow the JavaBean property convention. To enable property access, move all JPA annotations from | |
Database Transaction Replayer files). Recording is disabled by default and can be enabled in the configuration . The ObjectDB Replayer ... When recording is enabled , ObjectDB maintains a recording directory for each database file. The name ... . Therefore, when recording is enabled and a required backup file does not exist, ObjectDB automatically | |
Retrieving JPA Entities the Level 2 (L2) cache, if enabled . JPA then adds the new entity to the persistence context as a managed ... or @ManyToMany annotation enables cascaded retrieval for the field. (ObjectDB currently does not ... language for JPA is the Jakarta Persistence Query Language (JPQL). It enables you to retrieve | |
JPA Query Structure (JPQL / Criteria) and easier to use in Java applications. JPQL Query Structure Like SQL, a JPQL SELECT query consists of up to six clauses in the following format: SELECT ... FROM ... [WHERE ...] [GROUP BY ... [HAVING ...]] [ORDER BY ...] The SELECT and FROM clauses are required in every query that retrieves data; update | |
Literals in JPQL and Criteria Queries types in Java. Entity type literals enable selective retrieval by type . In JPQL, an entity type | |
Entity Management Settings on the command line. This is an experimental feature that is supported only on select JVMs. The reflection ... whether to enable lazy loading of entities content. Instantiating entities as hollow and loading | |
JPA Criteria Queries easier refactoring. It defines a structured hierarchy of interfaces for SELECT , UPDATE, and DELETE ... of CriteriaBuilder as mutable empty objects, and then defined using setter methods. All query types ( SELECT ... for restricting query scope using parameters and subqueries across all query types. SELECT Queries | |
Detached JPA Entities recursively to any other entities referenced with cascading enabled . Bulk detach The following ... also merges the referenced Address instance. This process continues recursively to any other entities referenced with cascading enabled . | |
JPA Persistable Types) are instantiated by using proxy classes. These proxy classes extend the original classes and enable transparent ... a constant can cause data loss in existing databases. The @Enumerated annotation enables | |
JPA Class Enhancer to be enhanced. Enhancement improves efficiency in three ways: Enhanced code enables efficient tracking ... whenever a persistent field is modified. Enhanced code enables lazy loading of entities | |
JPA Optimistic and Pessimistic Locking. When you use ObjectDB, optimistic locking is enabled by default and is fully automatic. Optimistic ... retrieved it. Optimistic locking is completely automatic and enabled by default in ObjectDB, regardless | |
JPA Exceptions Jakarta Persistence (JPA) defines a hierarchy of unchecked exceptions rooted in PersistenceException to handle runtime failures. This structure enables applications to catch specific errors or ... runtime exception for the JPA API. All other JPA exceptions inherit from this class, enabling | |
Use temporary files to enable very large transactions. This enables us to repeatedly commit on the second database and in case of a fault we can still recover ... . support Support A build with ability to use temporary files is available now (2.6.2_06). To enable ... and preferred. support Support We test to enable temporary files in transaction flush/commit | |
Running JPA Queries The Query interface defines two methods for running SELECT queries: Query.getSingleResult () : Use ... to run this query, as it can return multiple objects: TypedQuery query = em. createQuery (" SELECT c FROM ... . createQuery (" SELECT c FROM Country c"); List results = query. getResultList (); Casting | |
BIRT/ODA ObjectDB Driver extension. To install it: Open the Install dialog box by selecting Help Install New Software... . In ... . Select the ObjectDB BIRT/ODA feature. Complete the installation by clicking Next twice ... and selecting New Data Source . Select ObjectDB Data Source from the list of available data source types | |
Step 7: Run the Spring Web App - you should be able to run your application now by selecting Run Run Main Project from the main menu (or F6 ): You can select the server in the Run category of the project properties window (right click the project node and select Properties to open it). Alternatively you can run the web application using | |
Step 7: Run the Spring Web App), selecting Run As Run on Server , selecting the Tomcat 6.0 server and clicking Finish ... Maven Jetty plugin: Right click the project node and select Run As Maven Build... Enter  ... ; persistence.xml file - instead of RESOURCE_LOCAL you will have to specify JTA . To enable on the fly | |
Step 3: Add a Context Listener Class the class name - use exactly that case sensitive class name. Click Next and then Select All to enable ... by right clicking the guest package node (in the [Package Explorer] window), selecting New | |
Step 2: Entity Class and Persistence Unit) and selecting New Entity Class ... (or New Other... Persistence Entity Class and clicking Next ). Enter ... fill the fields with arbitrary values to enable it. A new entity class that should represent Guest ... clicking and selecting Edit or by double click and then moving to the Source or XML tab in | |
Step 2: Entity Class and Persistence Unit) and selecting New Entity Class ... (or New Other... Persistence Entity Class and clicking ... fill the fields with arbitrary values to enable it. A new entity class that should represent Guest ... a text editor (by right clicking and selecting Edit or by double click and then moving to the XML | |
Spring MVC JPA Tutorial - IntelliJ Project zip file: Spring MVC JPA - Maven Project (8KB) Open the project in IntelliJ IDEA: Select File Open Project... . Select the guestbook-spring directory and click OK . Define the Server: Select File Settings Application Servers . Add Tomcat 6 Server if not set already (Tomcat | |
JPA Web App Tutorial - IntelliJ Project: Select File Open Project... . Select the guestbook-web directory and click OK . Define the Server: Select File Settings Application Servers . Add Tomcat 6 Server if not set already (Tomcat has to be downloaded separately). Define Run Configuration: Select Run Edit Configurations , click the + icon | |
Java EE 6 JPA Tutorial - IntelliJ Project the project in IntelliJ IDEA: Select File Open Project... . Select the guestbook-jee6 directory and click OK . Define the Server: Select File Settings Application Servers . Add ... : Select Run Edit Configurations , click the + icon and select Tomcat Server Local |