ObjectDB Database Search
1-50 of 200 resultsJPA Entity Fields
The fields of persistable user-defined classes (entity classes, embeddable classes, and mapped superclasses) can be classified into the following five groups: Transient fields Persistent fields Inverse ( mappedBy ) fields Primary key (ID) fields Version field The first three groups (transient
|
|
jakarta.persistence.AccessType.FIELD
Jakarta Persistence (JPA) Enum Constant in jakarta.persistence.AccessType FIELD Field -based access is used. Since: Jakarta Persistence (JPA) 1.0
|
|
jakarta.persistence.EntityResult.fields
Jakarta Persistence (JPA) Method in jakarta.persistence.EntityResult FieldResult[] fields Maps the columns specified in the SELECT list of the query to the properties or fields of the entity class. Default: {} Since: Jakarta Persistence (JPA) 1.0
|
|
Retrieving JPA Entities
. A hollow object is initialized with a valid primary key, but all its other persistent fields are uninitialized. The object's content is retrieved from the database, and its persistent fields ... through all non-collection and non-map persistent fields , such as one-to-one and many
|
|
Database Schema Evolution
Modifications to entity classes that do not change their persistent field definitions ... , and non-persistent fields . However, ObjectDB detects additions, deletions, and modifications to the persistent fields of an entity class. New entities must be stored using the new class schema
|
|
Index Definition
which fields to index carefully. Single- field index The following entity definition uses JDO's ... to fields . import javax.jdo.annotations.Index; import javax.jdo.annotations.Unique; @Entity public ... , which prevents duplicate values in the indexed field . If you try to commit or flush a transaction
|
|
JPA Attributes Annotations
Jakarta Persistence (JPA) annotations define how entity attributes ( fields and properties ... , relationship types, and data storage formats. General field mapping Configure standard state mapping behavior using the following annotations: Sets a field or property of a basic attribute (e.g., primitives
|
|
Defining a JPA Entity Class
.persistence.Entity; @Entity public class Point { // Persistent Fields : private int x; private int y ... exceptions are unchecked, whereas Java I/O exceptions are checked. Persistent fields in entity ... . Only the persistent state of the object, which is represented by its persistent fields , is stored. By default, any
|
|
Detached JPA Entities
navigation from detached objects is not supported. You can only access persistent fields ... to related entities, mark the reference field with CascadeType . DETACH or CascadeType . ALL . When you detach an entity, the operation cascades to the entities referenced by that field
|
|
JPA Persistable Types
fields . In addition, only entity class instances preserve their identity and are stored ... multiple persistent fields causes data duplication in the database. Entity classes An entity class ... . It can contain constructors, methods, fields , and nested types with any access modifier ( public , protected
|
|
Auto Generated Values
Marking a field with the @GeneratedValue annotation indicates that the field's value is automatically generated. This annotation is primarily for primary key fields , but ObjectDB also supports it for non-key numeric persistent fields . The following sections explain the available value generation
|
|
JPA Class Enhancer
. However, there is one case where enhancement is required. Non-persistable classes that directly access persistent fields ... directly accessing persistent fields of other classes. This practice is required by the JPA specification ... of persistent field modifications, which avoids the need for snapshot comparison of entities (as
|
|
Storing JPA Entities
fields is also stored. You can do this either by explicitly persisting every reachable object or by setting up automatic cascading persist operations. Cascading persist Marking a reference field ... operations are automatically cascaded to entities that are referenced by that field . A collection field
|
|
Deleting JPA Entities
a transaction. Cascading remove Marking a reference field with CascadeType . REMOVE (or CascadeType ... entities that the field references. @Entity class Employee { : @OneToOne ( cascade = CascadeType . REMOVE ) private Address address; : } In the preceding example, the Employee entity has an address field
|
|
Schema Update
The configuration element supports renaming packages, classes, and fields in ObjectDB databases ... is specified, a element serves as a container for child elements to rename classes and fields ... a container for child elements to rename fields in that class. The elements in the example rename the A , C
|
|
JPA Value Generation Annotations
for primary key fields , but ObjectDB extends support to regular persistent fields . Several annotations control automatic value generation. Generation configuration Configure field -level generation behavior using the following annotation and enumeration: Specifies that the property or field value
|
|
Collections in JPQL and Criteria Queries
is passed as an argument. As path expressions when navigating to a persistent collection field . IS [NOT ... OF operator checks whether a specified element is a member of a specified persistent collection field ... specifies that you should use the MEMBER OF operator to check a collection field and the IN operator
|
|
JPA Criteria Query Date/Time Extraction
├─ LocalDateField # Enum for Date fields ├─ LocalTimeField # Enum for Time fields └─ LocalDateTimeField # Enum for DateTime fields Date and Time components To extract a date or time component in
|
|
Database Management Settings
locking is fully automatic and enabled by default in ObjectDB, regardless of whether a version field is defined in the entity class. Some ORM JPA providers require a version field . You can disable
|
|
SELECT clause (JPQL / Criteria API)
projection. Projection extracts field values from entities to form the query results. The results ... only single-valued path expressions in the SELECT clause. Collection and map fields cannot be included
|
|
JPA Query Structure (JPQL / Criteria)
, which returns only field values from database tables. This makes JPQL more object-oriented ... and persistent fields . String literals are also case-sensitive (e.g., "ORM" and "orm" are different
|
|
SQL Queries Annotations
to entity fields or scalar types with these detailed annotations: Maps a native query result to a specific entity class. Maps a specific SQL column to an entity field or property within an @EntityResult . Maps a result set column directly to a scalar value.
|
|
Query Parameters in JPA
filters the query results to Country objects whose name field is equal to :name . The :name identifier ... is inferred from the context. In the preceding example, comparing :name to a field of type String
|
|
Strings in JPQL and Criteria Queries
String values can appear in JPQL queries in several forms: As string literals , for example, 'abc' and '' . As parameters when string values are passed as query arguments. As path expressions that navigate to persistent string fields . As the results of predefined JPQL string manipulation functions
|
|
Date and Time in JPQL and Criteria Queries
Date and time expressions can appear in JPQL queries in the following ways: As date and time literals --for example, {d '2011-12-31'} and {t '23:59:59'} . As parameters --when date and time values are passed as arguments. As path expressions --to navigate to persistent date and time fields . As
|
|
Logical Operators in JPQL and Criteria API
, a Boolean path (a field or property) is represented by Path : Path isInUN = country. get ("isInUN
|
|
JPA Metamodel Attributes
, wrappers, Strings), embedded objects, and associations (reference fields and properties
|
|
Numbers in JPQL and Criteria Queries
Numeric values can appear in JPQL queries in several forms: As numeric literals , such as 123 and -12.5 . As parameters that are bound to numeric arguments. As path expressions that navigate to persistent numeric fields . As aggregate expressions , such as COUNT . As collection functions
|
|
What are the main benefits of using ObjectDB?
fields can be stored by ObjectDB simply as part of the containing object. Relational databases lack
|
|
WHERE clause (JPQL / Criteria API)
is defined on the population field , ObjectDB can use that index to iterate directly over the Country objects
|
|
[ODB1] Chapter 3 - Persistent Classes
. It can include constructors, methods, fields , attributes ( final , abstract , public ), inheritance ... (constructors, methods and fields ) can have any access modifiers (i.e. public, protected, package or private). 3.2 Persistent Fields and Types Storing a persistent object in the database does not
|
|
[ODB1] Chapter 9 - ObjectDB Explorer
. You can select a class from the list of classes at the top of this window and see all its persistent fields ... , every column represents a persistent field , and the content of a cell is the value of a single field in ... is represented by a tree node, and the values of its persistent fields are represents by child nodes. The main
|
|
[ODB1] Chapter 6 - Persistent Objects
that, at commit time, is reachable from a persistent object (using persistent fields ... it can be retrieved simply by navigating through the persistent fields ... whatever manner) all its persistent fields can be accessed freely. This includes fields that reference
|
|
Step 1: Install BIRT and ObjectDB Driver
selecting Help Install New Software... In the [Work with] field enter the BIRT update site url. http ... ] dialog box by selecting Help Install New Software... In the [Work with] field enter the ObjectDB
|
|
Step 2: Entity Class and Persistence Unit
fill the fields with arbitrary values to enable it. A new entity class that should represent Guest ... final long serialVersionUID = 1L; // Persistent Fields : @Id @GeneratedValue Long id; private String
|
|
Step 2: Entity Class and Persistence Unit
fill the fields with arbitrary values to enable it. A new entity class that should represent Guest ... final long serialVersionUID = 1L; // Persistent Fields : @Id @GeneratedValue Long id; private String
|
|
Step 2: Define a JPA Entity Class
static final long serialVersionUID = 1L; // Persistent Fields : @Id @GeneratedValue Long id; private ... and the id field (and its annotations) - the Guest class is an ordinary Java class. The next step is adding
|
|
Step 4: Add a Servlet Class
bean, which is instantiated and injected by the application server into the guestDao field automatically (since the field is marked with the @EJB annotation). The next step is adding a JSP
|
|
Step 2: Define a JPA Entity Class
implements Serializable { private static final long serialVersionUID = 1L; // Persistent Fields : @Id ... . Besides the @Entity annotation and the id field (and its annotations) - the Guest class is an ordinary Java
|
|
Step 2: Entity Class and Persistence Unit
static final long serialVersionUID = 1L; // Persistent Fields : @Id @GeneratedValue Long id; private
|
|
Step 4: Add a Controller Class
. A GuestDao component is automatically constructed and injected by Spring into the guestDao field
|
|
Step 2: Define a JPA Entity Class
should represent Point objects in the database. Apart from the @Entity annotation and the id field
|
|
Step 2: Define a JPA Entity Class
objects in the database. Besides the @Entity annotation and the id field (and its annotations
|
|
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 entities, where each Point has two persistent fields : x and y
|
|
Step 7: Run the Spring Web App
; jetty:run in the Goals field and click Run . Open your browser at http://localhost:8080/Guestbook
|
|
Step 3: Define an EJB Session Bean
). Prepares an EntityManager automatically and injects it into the em field
|
|
Step 3: Define a Spring DAO Component
the em field (because it is annotated with the @PersistenceContext annotation). Handles
|
|
Step 2: Entity Class and Persistence Unit
{ private static final long serialVersionUID = 1L; // Persistent Fields : @Id @GeneratedValue Long id
|
|
Step 4: Add a Controller Class
is automatically constructed and injected by Spring into the guestDao field (because it is annotated
|
|
[ODB1] Chapter 2 - A Quick Tour
collections) can be stored only as fields of persistent classes. In addition, objects are stored ... . Predefined Java types like ArrayList , String and Date can be stored in the database only as fields ... 3 public class Person { 4 5 // Persistent Fields : 6 private String firstName; 7 private String
|