ObjectDB Database Search

1-50 of 200 results

JPA Entity Fields

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 (Mapped By) fields Primary key (ID) fields Version field The first three groups (transient

JPA Annotations for Fields

The way a field of a persistable class is managed by JPA can be set by the following annotations: Additional annotations (and enum) are designated for enum fields : Other additional annotations (and enum) are designated for date and calendar fields : Chapter 2 of the ObjectDB manual explains how to use all the above annotations.

Retrieving JPA Entity Objects

but all its other persistent fields are uninitialized. The object content is retrieved from the database and the persistent fields are initialized, lazily, when the entity object is first accessed ... collection and map persistent fields (i.e. through one-to-one and many-to-one relationships

Database Explorer

and embeddable classes) in the database and their persistent fields and indexes. The [Query] window enables ... a single object, every column represents a persistent field , and the content of a cell is the value of a single field in a single database object. This type of viewer is useful for viewing data

Database Schema Evolution

Modifications to entity classes that do not change their persistent field definitions ... and non persistent fields . However, additions, deletions and modifications to the persistent fields ... again. Conversion of an entity object to the new schema is done on a field by field basis: For every field

Index Definition

which fields to define with indexes should be done carefully. Single Field Index The following entity ... ; cannot be applied to fields ): import javax.jdo.annotations.Index; import javax.jdo.annotations.Unique ... that prevents duplicate values in the indexed field . A PersistenceException is thrown on commit (or flush

JPA Primary Key

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 the primary key value is automatically injected into that field by ObjectDB. The 

ObjectDB Object Database Features

queries with the same arguments). Many other internal caches. Indexing Single field and multi field ...  and type versioning. Class hierarchy changes are handled automatically. New added fields are handled automatically. Removed fields are handled automatically. Most field type changes are handled

JPA Persistable Types

can be stored in the database directly. Other persistable types can be embedded in entity classes as fields ... multiple persistent fields  would cause data duplication in the database. Entity Classes An entity ... . It can contain constructors, methods, fields and nested types with any access modifiers (public, protected

Defining a JPA Entity Class

; @Entity public class Point { // Persistent Fields : private int x; private int y; // Constructor: Point ... (except that all JPA exceptions are unchecked whereas Java IO exceptions are checked). Persistent Fields in ... . Only the persistent state of the entity object, as reflected by its persistent fields  is stored. By default

CriteriaBuilder.extract(field,temporal) - JPA Method

; TemporalField   field ,     Expression  temporal ) Create an expression that returns the value of a field extracted from a date, time, or datetime. Parameters: field - a temporal field type temporal - a date, time, or datetime Return: expression for the value of the extracted field Since: JPA 3.2

AnnotationAttrRef jakarta.persistence.EntityResult.fields

JPA Annotation Attribute in jakarta.persistence.EntityResult FieldResult [] fields default {} Maps the columns specified in the SELECT list of the query to the properties or fields of the entity class. Since: JPA 1.0

EnumConstRef jakarta.persistence.AccessType.FIELD

JPA Enum Constant in jakarta.persistence.AccessType FIELD Field -based access is used. Since: JPA 2.0

Detached Entity Objects

). Retrieval by navigation from detached objects is not supported, so only persistent fields ... . Cascading Detach Marking a reference field with CascadeType . DETACH (or CascadeType ... objects that are referenced by that field (multiple entity objects can be referenced by a collection

Auto Generated Values

Marking a field with the @GeneratedValue annotation specifies that a value will be automatically generated for that field . This is primarily intended for primary key fields but ObjectDB also supports this annotation for non-key numeric persistent fields as well. Several different value generation

JPA Metamodel API

details on managed classes and persistent fields and properties, similarly to the ability ... (); The ManagedType  interface adds methods for exploring managed fields and properties (which are referred ... an ID class when using multiple ID fields or properties. Finally, the EntityType interface adds

JDO Annotations for Fields

The way a field of a persistable class is managed by JDO can be set by the following annotations and enum types:

Storing JPA Entity Objects

of other persistable types can only be stored in the database embedded in containing entities (as field ... of entity objects that are reachable from that object by navigation through persistent reference fields ... field with CascadeType . PERSIST  (or CascadeType . ALL  that also covers PERSIST ) indicates

JPA Class Enhancer

through methods) persistent fields of enhanced classes must also be enhanced. It is a good practice (and actually required by JPA but not enforced by ObjectDB) to avoid accessing persistent fields ... efficient tracking of persistent field modifications, avoiding the need for snapshot comparison of entities

Deleting JPA Entity Objects

the database require an active transaction. Cascading Remove Marking a reference field with CascadeType ... should be cascaded automatically to entity objects that are referenced by that field (multiple entity objects can be referenced by a collection field ): @Entity class Employee { : @OneToOne ( cascade

Paths and Types in JPQL and Criteria API

expression) and uses the dot ( . ) operator to navigate through persistent fields to other objects ... persistent field in the Country class to navigate to the associated Capital entity object. Path expression ... to its name field . A path expression can be extended further only if its type is also a user defined

Schema Update

The configuration element supports renaming packages, classes and fields in ObjectDB databases as ... and fields in that package. The elements above specify renaming of the com.example.old1 and com ... attribute is specified a element serves as a container of subelements for renaming fields in that class

GROUP BY and HAVING clauses

properties of generated groups instead of individual objects and fields . The position of a GROUP BY ... can be applied to entity objects directly. Other aggregate functions are applied to fields of objects in ... grouping queries also apply to the HAVING clause, which means that individual object fields

Collections in JPQL and Criteria Queries

. as  path expressions - in navigation to persistent collection fields . IS [NOT] EMPTY ... if a specified element is contained in a specified persistent collection field . For example: 'English' MEMBER ... distinguishes between the MEMBER OF operator, which should be used for checking a collection field

JPA Query Structure (JPQL / Criteria)

is that SQL works with relational database tables, records and fields , whereas JPQL works with Java ... rather than just field values from database tables, as with SQL. That makes JPQL more object oriented friendly ... elements such as names of entity classes and persistent fields , which are case sensitive. In addition

JPA Annotations for Value Generation

Automatically generated values are mainly useful for primary key fields , but are supported by ObjectDB also for regular (non primary key) persistent fields . At the field level, the @GeneratedValue with an optional GenerationType strategy is specified: The @GeneratedValue annotation

UPDATE SET Queries in JPA/JPQL

the entity objects into an EntityManager . Updating the relevant entity object fields   ... supported. The SET clause defines one or more field update expressions (using the range variable name - if defined). Multiple field update expressions, separated by commas, are also allowed

SELECT clause (JPQL / Criteria API)

path expressions , such as c.name , in query results is referred to as projection. The field values ... value path expressions can be used in the SELECT clause. Collection and map fields cannot be included

JPA Metamodel API

The JPA Metamodel API, which is introduced in JPA 2.0, enables examining the classes, fields and properties of the persistent object model, similarly to the Java reflection API. The main interface of the JPA Metamodel API is: Types (mainly classes) and attributes (persistent field and properties

Query Parameters in JPA

). getSingleResult (); } The WHERE clause reduces the query results to Country objects whose name field value ... , a comparison of :name to a field whose type is String indicates that the type of :name itself is String

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.

JPA Criteria API Queries

;the criteria API may be preferred. For example, building a dynamic query based on fields that a user fills at runtime in a form that contains many optional fields - is expected to be cleaner when using

Locking in JPA

a version field . During commit (and flush ), ObjectDB checks every database object that has to be updated ... is completely automatic and enabled by default in ObjectDB, regardless if a version field

Database Management Settings

automatic and enabled by default in ObjectDB, regardless if a version field (which is required by

Strings in JPQL and Criteria Queries

String values may appear in JPQL queries in various forms: as  string literals - e.g. 'abc' , ''. as parameters - when string values are assigned as arguments. as  path expressions - in navigation to persistent string fields . as results of predefined JPQL string manipulation functions

Date and Time in JPQL and Criteria Queries

Date and time expressions may appear in JPQL queries: as date and time literals - e.g. {d '2011-12-31'} , {t '23:59:59'} . as parameters - when date and time values are assigned as arguments. as  path expressions - in navigation to persistent date and time fields . as results of predefined

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

; guestDao field automatically (since the field is marked with the  @EJB annotation). The next step

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

the application server into the guestDao field automatically (since the field is marked with the @EJB

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

JDO Predefined ID Classes

for persistence capable classes with a simple single field primary key: Object IDs are used in many ... but should not be used as the type of a primary key field in a persistence capable class. For example, to use a String primary key define a primary key field of type String : @PersistenceCapable public

JDO Annotations for Index Definition

The following annotations are used to define indexes on persistent fields : The Index Definition section of the ObjectDB manual explains these annotations in details.

JDO Annotations for Classes

JDO supports two modes of persistable classes that can be set by the following annotations: Non persistable classes that should be enhanced (because of accessing persistent fields of other classes directly) can be marked with: The identity mode of persistence capable classes can be specified by using: