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 | |
Database Explorer (entity and embeddable classes) in the database and their persistent fields and indexes. The Query ... a persistent field , and each cell contains the value of a field for a specific object. This type ... a tree. Each database object is a tree node, and its persistent fields are its child nodes. This view | |
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 Primary Key value by declaring a primary key field : @Entity public class Project { @Id @GeneratedValue long id; // still set automatically : } The @Id annotation marks a field as a primary key field . When a primary key field is defined, ObjectDB automatically injects the primary key value into that field | |
ObjectDB Object Database Features with the same arguments). Many other internal caches. Indexing Single field and multi field ( composite ... versioning. Class hierarchy changes are handled automatically. New added fields are handled automatically. Removed fields are handled automatically. Most field type changes are handled automatically | |
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 Metamodel API about managed classes, persistent fields , and properties, similar to how Java reflection provides ... managed fields and properties , also known as attributes. For example: // Get all the attributes ... an ID class when you use multiple ID fields or properties. Finally, the EntityType interface adds | |
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 | |
Paths and Types in JPQL and Criteria API fields to other objects and values. For example, in the expression c.capital , c represents a Country entity. The expression uses the capital persistent field in the Country class to navigate ... that navigates from the Capital entity to its name field . A path expression can be extended | |
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 Components Annotations the class as a mapped superclass. Its persistent attributes ( fields and properties) and their settings ... can access persistent state directly ( field access) or through getters and setters (property access). Use these annotations to configure the access type: Sets the access type ( FIELD or PROPERTY | |
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 | |
JPA Annotations defining named entity graphs for eager loading strategies. Field level configuration Configure the internal state, identity, and associations of an entity using field -level annotations: Map individual fields to persistent state, including primary keys, enumerated types, and temporal data. Define | |
JPA ORM Mapping Annotations to be included in the generated DDL for a table. Column mapping Map fields to specific database columns using these annotations: Specifies the mapped column for a persistent property or field . Specifies that a persistent property or field should be persisted as a large object (BLOB or CLOB). Specifies | |
GROUP BY and HAVING clauses of the resulting groups instead of individual objects and fields . In the query execution order ... to specific fields of the objects in the group by using path expressions . The following query groups ... clause in a grouping query, meaning individual object fields are inaccessible. Only group properties | |
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 | |
UPDATE SET Queries in JPA/JPQL the entities into an EntityManager . Update the relevant entity fields within an active transaction ... . The SET clause defines one or more field -update expressions, which use the range variable if one is defined. You can update multiple fields by providing a comma-separated list of expressions. For example | |
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 | |
JPA Optimistic and Pessimistic Locking but can be exposed by defining a version field . During commit (and flush ), ObjectDB checks ... of whether a version field (which is required by some ORM JPA providers) is defined in the entity | |
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 | |
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 4: Add a Servlet Class server into the guestDao field automatically (since the field is marked with the @EJB annotation | |
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 |