ObjectDB Database Search
1-50 of 200 resultsJPA Persistence Unit A JPA Persistence Unit is a logical grouping of user defined persistable classes (entity classes ... is optional when using ObjectDB, but required by JPA . persistence.xml Persistence units are defined in ... to instantiate an EntityManagerFactory in JPA (as explained in the JPA Overview section) requires | |
JPA Query API Queries are represented in JPA 2 by two interfaces - the old Query interface, which was the only interface available for representing queries in JPA 1, and the new TypedQuery interface that was introduced in JPA 2. The TypedQuery interface extends the Query interface. In JPA 2 the Query interface | |
JPA Criteria API Queries The JPA Criteria API provides an alternative way for defining JPA queries, which is mainly useful for building dynamic queries whose exact structure is only known at runtime. JPA Criteria API vs JPQL JPQL queries are defined as strings, similarly to SQL. JPA criteria queries, on the other hand | |
ObjectDB - JPA Object Database for Java it is the bottleneck in most applications. ObjectDB is extremely fast and much faster than any other JPA ... when the object data model is complex. See JPA benchmark results... Reduce development time. Improve ... using the Java Persistence API ( JPA ). It is the first persistence solution that combined a powerful | |
JPA Entity Fields either the Java transient modifier (which also affects serialization) or the JPA @Transient annotation ... . Basic - for any other persistable type. In JPA only Basic is optional while the other annotations ... , so they are useful only for classes that are also in use with an ORM JPA provider (such as | |
What is the Java Persistence API (JPA)? The Java Persistence API ( JPA ) is a standard API for accessing databases from within Java applications. The main advantage of JPA over JDBC (the older Java API for interacting with databases) is that in JPA data is represented by classes and objects rather than by tables and records as in | |
JPA Persistable Types. ObjectDB supports all the JPA persistable types, which are: User defined classes - Entity classes ... .persistence.Entity; @Entity public class MyEntity { } Entity Class Requirements A portable JPA entity class ... Superclasses In JPA , classes that are declared as mapped superclasses have some of the features of entity | |
JPA Annotations JPA defines dozens of annotations that can be divided into the following groups: Annotations for JPA aware classes: Annotations for fields in JPA persistable classes: Annotations for additional JPA configuration: Annotations for JPA lifecycle event callbacks: Java EE container annotations: Many | |
Defining a JPA Entity Class To be able to store Point objects in the database using JPA we need to define an entity class . A JPA entity class is a POJO (Plain Old Java Object) class, i.e. an ordinary Java class ... is an ordinary Java class. The only unique JPA addition is the @Entity annotation, which marks the class as | |
Setting and Tuning of JPA Queries of other EntityManager instances). JPA implementations can easily make uncommitted changes visible in simple JPA ... to be visible to the query. Flush policy in JPA is represented by the FlushModeType enum, which has two values ... are flushed only on explicit commit/flush. In most JPA implementations the default is AUTO . In ObjectDB | |
JPA Metamodel API The JPA Metamodel API, which is introduced in JPA 2.0, enables examining the classes, fields ... of the JPA Metamodel API is: Types (mainly classes) and attributes (persistent field and properties ... : The JPA Metamodel API may optionally be used with the JPA Criteria API. Many of the interfaces | |
Query Parameters in JPA identifier that serves as the parameter name. JPA does not provide an API for defining the parameters ... ). Therefore, they are preferred over ordinal parameters. Criteria Query Parameters In a JPA query that is built by using the JPA Criteria API - parameters (as other query elements) are represented by objects | |
Locking in JPA JPA 2 supports both optimistic locking and pessimistic locking . Locking is essential to avoid ... in ObjectDB (and in JPA ) is always at the database object level, i.e. each database object ... (which is required by some ORM JPA providers) is defined in the entity class or not. Pessimistic Locking The main | |
JPA Class Enhancer (and actually required by JPA but not enforced by ObjectDB) to avoid accessing persistent fields ... are available for download on the Tutorial pages: Quick Start with JPA JPA Web Application Java EE JPA Spring MVC and JPA Similarly, enhancement can be also be integrated into an ANT build script, as | |
JPA Reference (JavaDoc) ( JPA ) 2.0. The content is derived from the original JPA documentation (in the EclipseLink JPA 2 RI) with some additions and notes. The JPA types are organized into the following sections: The purpose of these documentation pages is to serve as a reference. In order to learn how to use JPA and ObjectDB please read the ObjectDB manual . | |
JPA Named Queries Country { ... } Note: Named queries can be defined in JPA XML mapping files instead of using the @NamedQuery annotation. ObjectDB supports JPA XML mapping files, including the definition of named queries. But, because mapping files are useful mainly for Object Relational Mapping (ORM) JPA providers | |
Updating JPA Entity Objects. It is usually recommended to use collections rather than arrays when using JPA . Collections are more portable to ORM JPA implementations and provide better automatic change tracking support. UPDATE ... in one operation. The UPDATE Queries in JPA /JPQL in chapter 4 explains how to use JPA UPDATE queries. | |
Retrieving JPA Entity Objects The Java Persistence API ( JPA ) provides various ways to retrieve objects from the database ... is available in objects that are detached. JPA 2 introduces methods for checking if a specified entity object ... of JPA is JPQL (Java Persistence Query Language). It enables retrieval of objects from the database by | |
Database Connection using JPA Working with the Java Persistence API ( JPA ) consists of using the following interfaces: Overview ... for Query instances, which are needed for executing queries on the database. Every JPA implementation ... of ObjectDB classes that implement these interfaces, and because standard JPA interfaces are used | |
Chapter 4 - JPA Queries (JPQL / Criteria) The JPA Query Language (JPQL) can be considered as an object oriented version of SQL. Users ... well as how to use the JPA Criteria API, which provides an alternative way for building queries in JPA , based on JPQL. The first section describes the API that JPA provides for using dynamic and static | |
JPA Queries Queries are represented in JPA by the Query and TypedQuery interfaces: The JPA Query API section (in chapter 4 of the ObjectDB manual) provides detailed explanation of how exactly to use ... ) can be done by concatenating JPQL strings into a valid complete JPQL query. JPA 2 introduced the JPA Criteria | |
JPA Primary Key required. But ObjectDB also supports explicit standard JPA primary keys, including composite primary ... has multiple primary key fields, JPA requires defining a special ID class that is attached to the entity ... itself can represent complete primary key values. Obtaining the Primary Key JPA 2 provides a generic | |
Deleting JPA Entity Objects, if any). Orphan Removal JPA 2 supports an additional and more aggressive remove cascading mode ... ;The DELETE Queries in JPA /JPQL in chapter 4 explains how to use JPA DELETE queries. | |
Chapter 3 - Using JPA This chapter explains how to manage ObjectDB databases using the Java Persistence API ( JPA ). The first two pages introduce basic JPA interfaces and concepts: The next section explains how to use JPA for database CRUD operations: More advanced topics (e.g. locking and events) are discussed in the last section: | |
Obtaining a JPA Database Connection In JPA a database connection is represented by the EntityManager interface. Therefore, in order ... to get an EntityManager instance. JPA requires the definition of a persistence unit in an XML file in order ... to the database. When using JPA , every operation on a database is associated with an EntityManager | |
JPA Metamodel API The JPA Metamodel API provides the ability to examine the persistent object model and retrieve details on managed classes and persistent fields and properties, similarly to the ability that Java reflection provides for general Java types. The Metamodel Interface The main interface of the JPA | |
Chapter 2 - JPA Entity Classes JPA Entity classes are user defined classes whose instances can be stored in a database. To store data in an ObjectDB database using JPA you have to define entity classes that represent your application data object model. This chapter explains how to define and use entity classes. This chapter contains the following sections: | |
JPA Annotations for Java EE The following JPA annotations are in use to integrate JPA into a Java EE application and are managed by the Java EE container: | |
JPA Exceptions JPA exceptions are represented by a hierarchy of unchecked exceptions: java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException javax.persistence.PersistenceException ... .TransactionRequiredException Exception Class Overview The root of the JPA exception class subtree is: General errors | |
JPA Annotations for JPQL Queries The following annotations are used to define static named JPA queries: The JPA Named Queries section of the ObjectDB Manual explains and demonstrates how to use these annotations to define named JPQL queries. | |
JPA Annotations for Mapping (ORM) The following JPA annotations and enums are designated for mapping a JPA object model to a relational database, and are not required by ObjectDB: ObjectDB silently ignores all the above annotations. | |
JPA Annotations for Classes JPA defines three types of persistable classes which are set by the following annotations: Chapter 2 of the ObjectDB manual explains these annotations in detail. Entity and mapped super classes ... policy (as explained in chapter 3 ): Another JPA class annotation defines an ID class: ID classes | |
JPA Annotations for SQL Queries The following JPA annotations are designated for SQL queries on relational databases: ObjectDB supports only the preferred JPA query language, JPQL, and silently ignores all the above annotations. | |
JPA Annotations for Access Modes Persistence fields can either be accessed by JPA directly (as fields) or indirectly (as properties and get/set methods). JPA 2 provides an annotation and an enum for setting the access mode: More details are provided in chapter 2 of the ObjectDB manual. | |
CRUD Database Operations with JPA Given an EntityManager , em , that represents a JPA connection to the object database, we can use it to store, retrieve, update and delete database objects. Storing New Entity Objects The following ... of this manual describes how to use JPA for database operations in more detail. | |
JPA Tutorials The following tutorials demonstrate how to develop database driven applications using JPA and the ObjectDB ODBMS (Object Oriented Database Management System). Console JPA Tutorial The Quick Start tutorial demonstrates how to use ObjectDB and JPA in a console application: Quick Start with JPA | |
Getting Started with JPA This tutorial demonstrates how to create and run a simple JPA application. The demonstrated application uses JPA to store and retrieve simple Point entity objects, where each Point has two persistent fields - x and y . If you already know JPA - the source code will be straightforward | |
NetBeans/JPA Spring MVC Web Tutorial This is the NetBeans version of the Spring MVC and JPA tutorial. It demonstrates  ... NetBeans - using JPA , ObjectDB, Tomcat (or GlassFish) and Maven. The demo web application ... . The visitors that have already signed are listed below the form: Persistence is managed by JPA | |
Eclipse/JPA Spring MVC Web Tutorial This is the Eclipse version of the Spring MVC and JPA tutorial. It demonstrates  ... Eclipse - using ObjectDB, JPA , Tomcat (or GlassFish) and Maven. The demo web application manages ... that have already signed are listed below the form: Persistence is managed by JPA . Every visitor | |
Getting Started with JPA and Eclipse This is the Eclipse version of the Quick Start with JPA tutorial. It demonstrates how to create and run a simple JPA application in Eclipse. The demonstrated application uses JPA to store and retrieve simple Point entity objects, where each Point has two persistent fields: x and y | |
Getting Started with JPA and NetBeans This is the NetBeans version of the Quick Start with JPA tutorial. It demonstrates how to create and run a simple JPA application in NetBeans. The demonstrated application uses JPA to store and retrieve simple Point entity objects, where each Point has two persistent fields | |
NetBeans/JPA Web Application Tutorial This is the NetBeans version of the JPA Web App tutorial. It demonstrates how  ... Server 6.0 ( some modifications are needed for Tomcat 7.0 ), ObjectDB and JPA . The demo web ... form. The visitors that have already signed are listed below the form: Persistence is managed by JPA | |
Eclipse/JPA Web Application Tutorial This is the Eclipse version of the JPA Web App tutorial. It demonstrates how to create and run a database driven Java web application in Eclipse - using Tomcat 6, ObjectDB and JPA ... is managed by JPA . Every visitor that has signed the guestbook is represented by a Guest entity object | |
NetBeans/JPA Java EE Tutorial This is the NetBeans version of the Java EE JPA tutorial. It demonstrates  ... NetBeans - using GlassFish, ObjectDB and JPA . The demo web application manages a basic guestbook page ... that have already signed are listed below the form: Persistence is managed by JPA . Every visitor that has signed | |
Eclipse/JPA Java EE Tutorial This is the Eclipse version of the Java EE JPA tutorial. It demonstrates how  ... GlassFish, ObjectDB and JPA . The demo web application manages a basic guestbook page. Every visitor ... below the form: Persistence is managed by JPA . Every visitor that has signed the guestbook is represented | |
Spring MVC and JPA Tutorial) web application using Tomcat (or GlassFish), JPA , ObjectDB and Maven. The demo web application manages ... that have already signed are listed below the form: Persistence is managed by JPA . Every visitor that has signed the guestbook is represented as Guest JPA entity object, and all Guest entity objects | |
Spring MVC JPA Tutorial - Maven Project The Spring MVC JPA tutorial provides step by step instructions on how to build a simple Java/ JPA Spring MVC database driven web application in Eclipse or NetBeans . Building a new ... , you may download and run the finished application as a Maven project: Spring MVC JPA - Maven Project (8KB) If  | |
JPA Web App Tutorial - Maven Project The JPA Web Application tutorial provides step by step instructions on how to build a simple Java/ JPA database driven web application (for Tomcat / Jetty) in Eclipse or NetBeans ... , you may download and run the result application as a Maven project: JPA Web App - Maven Project (6KB | |
Getting Started with JPA - Maven Project The Getting Started with JPA tutorial provides step by step instructions on how to build a simple JPA database driven application in Eclipse or NetBeans . Building a new application step by step ... application as a Maven project: Getting Started with JPA - Maven Project (3KB | |
Which API should I use - JPA or JDO? You can use ObjectDB with either the Java Persistence API ( JPA ) or the Java Data Objects (JDO) API. Both share similar architecture, design and abilities. When to prefer JPA JPA is more commonly used. Therefore, it might be the first choice for most new applications. You can use JPA as |