ObjectDB Database Search
1-50 of 200 resultsJPA ORM Mapping Annotations Jakarta Persistence (JPA) provides a comprehensive set of annotations and enums for mapping object ... and schema definitions Use the following annotations to map entities to database tables and define ... . A container annotation for defining multiple @SecondaryTable entries. Specifies a unique constraint | |
JPA Annotations Jakarta Persistence (JPA) uses annotations to define metadata that governs how the persistence engine manages objects and their database mappings. These annotations configure entity behavior ... Use class-level annotations to define persistent types and configure class-level behavior: Define | |
SQL Queries Annotations Jakarta Persistence (JPA) provides a set of annotations to define and map native SQL queries ... and ignores these annotations , they remain essential for applications interacting with relational ... the following annotations : Specifies a named native SQL query using the underlying database's specific SQL | |
JPA Container Injection Annotations Jakarta Persistence (JPA) provides standard annotations to manage dependencies on container ... using the following annotations : Expresses a dependency on a container-managed EntityManager , injecting ... ). A container annotation for declaring multiple @PersistenceContext definitions on a single class | |
JPA Relationships Annotations of references to other entities. Jakarta Persistence (JPA) provides annotations to configure relationships. Relationship annotations Use the following annotations to define the multiplicity and ownership ... you to explicitly specify these annotations for simple relationships. However, using them is necessary | |
JPA Listeners & Callbacks Annotations Jakarta Persistence (JPA) provides lifecycle callback annotations to trigger custom logic during specific entity state transitions. These annotations allow you to define methods within an entity or ... can be further configured with annotations that specify lifecycle event listeners. Specifies one or more callback | |
JPA Attributes Annotations Jakarta Persistence (JPA) annotations define how entity attributes (fields and properties) are managed. These annotations control data persistence behavior, including fetching strategies ... using the following annotations : Sets a field or property of a basic attribute (e.g., primitives | |
JPA Components Annotations You can use Jakarta Persistence (JPA) annotations to mark classes as persistent and to configure their behavior. Persistent type definitions Use these annotations to assign a role to a persistent ... ). Use these annotations to configure the access type: Sets the access type (FIELD or PROPERTY | |
JPA Named Queries Annotations Jakarta Persistence (JPA) provides annotations to define static, reusable queries at the class ... the following annotations : Specifies a static, named query in the Jakarta Persistence Query Language (JPQL ... . A container annotation that groups multiple @NamedQuery definitions on a single class. Supplies parameters | |
JPA Value Generation Annotations for primary key fields, but ObjectDB extends support to regular persistent fields. Several annotations ... behavior using the following annotation and enumeration: Specifies that the property or field value ... generator logic at the class level using these annotations : Defines a named primary key generator | |
JPA Fetch Graphs Annotations Named entity graphs provide a static mechanism for defining fetch plans using annotations ... named entity graphs at the class level using the following annotations : Specifies a named entity graph ... plan. A container annotation used to group multiple @NamedEntityGraph definitions on a single entity | |
JPA Entity Fields annotation (which affects only persistence): @Entity public class EntityWithTransientFields { static int ... the @Transient annotation ). Storing an entity in the database stores only its persistent state, not ... is a persistable type or null . You can mark each persistent field with one of the following annotations | |
Index Definition @Index and @Unique annotations to define indexes. Note that JPA's @Index annotation cannot be applied to fields. import javax.jdo. annotations .Index; import javax.jdo. annotations .Unique; @Entity public ... ( name ="u2") Date indexedField5; // unique } The @Unique annotation defines a unique index | |
JPA Lifecycle Events private ) but must not be static . The annotation on a method specifies when the callback method ... annotation . By default, callback methods in a superclass are also invoked for entities of its subclasses ... , use the @EntityListeners annotation : @Entity @EntityListeners (MyListener.class) public class | |
JPA Persistable Types to declare a class as an entity is to mark it with the @Entity annotation : import javax.persistence ... can be set explicitly by using the name attribute of the @Entity annotation : @Entity ( name ="MyName ... is declared as embeddable by marking it with the @Embeddable annotation : @Embeddable public class Address | |
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 ... fields (as explained in the previous section ) and for primary key fields that are annotated | |
JPA Named Queries and @NamedQueries Annotations The following @NamedQuery annotation defines a query named "Country.findAll ... ="SELECT c FROM Country c") The @NamedQuery annotation has four elements: two required ... methods. Each @NamedQuery annotation is attached to exactly one entity class or mapped superclass, usually | |
JPA Persistence Unit mapping file. Every annotation described in this manual can be replaced with equivalent XML in ... XML metadata as an alternative to annotations . This manual focuses on annotations ... definition. JPA refers to these as managed classes. Classes listed in mapping files, as well as annotated | |
Retrieving JPA Entities through the field. Specifying FetchType . LAZY in either the @OneToOne or @ManyToOne annotation excludes the field from cascaded retrieval. (ObjectDB currently does not distinguish between these two annotations ... or @ManyToMany annotation enables cascaded retrieval for the field. (ObjectDB currently does not | |
JPA Primary Key; // still set automatically : } The @Id annotation marks a field as a primary key field ... . The @GeneratedValue annotation specifies that the primary key is automatically allocated by ObjectDB ... you to define a special ID class and attach it to the entity class by using the @IdClass annotation . The ID | |
ObjectDB Object Database Features and annotations . Zero administration. Documentation Compressive, up to date, searchable online  ... is set using JPA/JDO annotations (e.g. @Entity , @Id , @Index ). Transparent activation ... API . Static definition ( named queries ) in annotations (@NamedQuery) and XML. Query parameters | |
JPA Extended API Reference Guide, query facilities, metamodel details, configuration options, annotations , and exception information ... configuration options for common JPA operations. Details the annotations used to define the persistent object | |
JPA Class Enhancer persistable by annotations (for example, @Entity and @Embeddable ). Therefore, when using this technique, persistent fields can only be accessed directly from annotated , persistable user classes | |
Defining a JPA Entity Class To store Point objects in a database using JPA, you must define an entity class . A JPA entity class is a POJO (Plain Old Java Object), an ordinary Java class that is marked ( annotated ) to indicate ... class is an ordinary Java class. The only JPA-specific addition is the @Entity annotation | |
JPA Runtime Tuning & Configuration Most Jakarta Persistence configuration is static, defined through annotations (e.g., @Entity , @Table ) or set globally at the persistence unit level during bootstrapping . This section describes ... with annotations ), JPA follows a hierarchical override model: EntityManagerFactory (global | |
JPA Shared (L2) Entity Cache. Per entity class, using annotations . ObjectDB Configuration The shared cache size is specified in ... is an inherited annotation . An entity class that is not marked with @Cacheable inherits the cacheability setting | |
jakarta.persistence.EmbeddedId Jakarta Persistence (JPA) Annotation Type jakarta.persistence.EmbeddedId Implemented Interfaces: Annotation Target: Method, Field Specifies that the annotated persistent field or property of an entity class or mapped superclass is the composite primary key of the entity. The type of the annotated | |
jakarta.persistence.CollectionTable Jakarta Persistence (JPA) Annotation Type jakarta.persistence.CollectionTable Implemented Interfaces: Annotation Target: Method, Field Specifies the table that is used for the mapping of collections ... of the Column annotation . In the case of a basic type, the column name is derived from the name | |
jakarta.persistence.Convert Jakarta Persistence (JPA) Annotation Type jakarta.persistence.Convert Implemented Interfaces: Annotation Target: Method, Field, Type Specifies how the values of a field or property are converted ... of an embedded type or inherited mapped superclass. It is not necessary to use the Basic annotation (or | |
jakarta.persistence.IdClass Jakarta Persistence (JPA) Annotation Type jakarta.persistence.IdClass Implemented Interfaces: Annotation Target: Type Specifies a composite primary key type whose fields or properties map to the identifier fields or properties of the annotated entity class. The specified primary key type | |
jakarta.persistence.Converter Jakarta Persistence (JPA) Annotation Type jakarta.persistence.Converter Implemented Interfaces: Annotation Target: Type Declares that the annotated class is a converter and specifies ... and must be annotated with the Converter annotation or declared as a converter in the object/relational | |
jakarta.persistence.Entity Jakarta Persistence (JPA) Annotation Type jakarta.persistence.Entity Implemented Interfaces: Annotation Target: Type Declares that the annotated class is an entity. The annotated entity class ... annotation , and may have one or more secondary tables, mapped using the SecondaryTable annotation | |
jakarta.persistence.SequenceGenerator Jakarta Persistence (JPA) Annotation Type jakarta.persistence.SequenceGenerator Implemented Interfaces: Annotation Target: Type, Method, Field, Package Defines a primary key generator that may be referenced by name when a generator element is specified for the GeneratedValue annotation . A sequence | |
jakarta.persistence.TableGenerator Jakarta Persistence (JPA) Annotation Type jakarta.persistence.TableGenerator Implemented Interfaces: Annotation Target: Type, Method, Field, Package Defines a primary key generator that may be referenced by name when a generator element is specified for the GeneratedValue annotation . A table | |
jakarta.persistence.Enumerated Jakarta Persistence (JPA) Annotation Type jakarta.persistence.Enumerated Implemented Interfaces: Annotation Target: Method, Field Specifies that a persistent property or field should be persisted as an enumerated type. This annotation is optional if the type of a persistent field or property | |
Apache License, Version 2.0, January 2004, that is based on (or derived from) the Work and for which the editorial revisions, annotations | |
FROM clause (JPQL / Criteria API) explicitly in the name element of the @Entity annotation . Multiple range variables are allowed | |
Step 4: Add a Controller Class. annotation .Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind. annotation .RequestMapping; import org.springframework.web.servlet.ModelAndView; @Controller ... ); } } The GuestController class is defined as a Spring managed web controller using the @Controller annotation | |
Step 4: Add a Controller Class.http.HttpServletRequest; import org.springframework.beans.factory. annotation .Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind. annotation .RequestMapping ... a Spring managed web controller using the @Controller annotation . A GuestDao component | |
Step 3: Define a Spring DAO Component.transaction. annotation .Transactional; @Component public class GuestDao { // Injected database ... the em field (because it is annotated with the @PersistenceContext annotation ). Handles transactions automatically for methods that are annotated with the @Transactional annotation | |
Step 3: Define a Spring DAO Component.springframework.transaction. annotation .Transactional; @Component public class GuestDao { // Injected database ... the em field (because it is annotated with the @PersistenceContext annotation ). Handles transactions automatically for methods that are annotated with the @Transactional annotation , saving | |
Step 2: Define a JPA Entity Class should represent Point objects in the database. Apart from the @Entity annotation and the id field (and its annotations ) - the Point class is an ordinary Java class. The next step is adding to the project | |
Step 2: Define a JPA Entity Class objects in the database. Besides the @Entity annotation and the id field (and its annotations | |
Step 3: Define an EJB Session Bean (because it is annotated with the @PersistenceContext annotation ). Handles transactions automatically using | |
Step 2: Define a JPA Entity Class; The new class should represent Guest objects in the database. Besides the @Entity annotation 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.ejb.EJB; import javax.servlet.ServletException; import javax.servlet. annotation .WebServlet; import ... automatically (since the field is marked with the @EJB annotation ). The next step is adding a JSP | |
Step 2: Define a JPA Entity Class. Besides the @Entity annotation and the id field (and its annotations ) - the Guest class is an ordinary Java | |
Step 3: Define an EJB Session Bean (because it is annotated with the @PersistenceContext annotation ). Handles transactions automatically using JTA | |
Step 4: Add a Servlet Class; import javax.servlet. annotation .WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet ... server into the guestDao field automatically (since the field is marked with the @EJB annotation | |
Step 6: Set the Spring XML content: The settings above guides Spring to support annotations (for components, controllers |