About Entity

11-20 of 200Refresh
Tutorial
124

Step 2: Entity Class and Persistence Unit

To store objects in an ObjectDB database using JPA we need to define an entity class: Open the [New ... .Date; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; @Entity public class Guest implements Serializable { private static final long
Tutorial
122

Step 2: Define a JPA Entity Class

To store objects in an ObjectDB database using JPA we need to define an entity class: Open the [New ... : package tutorial; import java.io.Serializable; import javax.persistence.*; @Entity public ... should represent Point objects in the database. Besides the @Entity annotation and the id field
Tutorial
122

Step 2: Define a JPA Entity Class

To store objects in an ObjectDB database using JPA we need to define an entity class: Open the [New ... .Serializable; import java.sql.Date; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; @Entity public class Guest implements Serializable
Manual
122

JPA Entity Fields

Fields of persistable user defined classes (entity classes, embeddable classes and mapped ... and inverse fields) can be used in both entity classes and embeddable classes. However, the last two groups (primary key and version fields) can only be used in entity classes. Primary key fields
Manual
121

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. 
Manual
116

Working with JPA Entity Objects

Entity objects are in-memory instances of entity classes (persistable user defined classes ... requires using entity objects for many operations, including storing, retrieving, updating and deleting database objects. Entity Object Life Cycle The life cycle of entity objects consists of four states
Manual
114

Detached Entity Objects

Detached entity objects are objects in a special state in which they are not managed by any EntityManager but still represent objects in the database. Compared to managed entity objects, detached ... that have been loaded before detachment should be used. Changes to detached entity objects are not stored in
Manual
113

Shared (L2) Entity Cache

Every EntityManager owns a persistence context, which is a collection of all the entity objects ... an entity object that is already managed by the EntityManager returns the existing instance from the persistence context, rather than a new instantiated entity object. The scope of the persistence context
Manual
108

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 that is marked ... to serializable classes, which are marked as having the ability to be serialized. The Point Entity
Manual
57

JPA Persistable Types

. ObjectDB supports all the JPA persistable types, which are: User defined classes - Entity classes ... and Serializable types (user or system defined). Note: Only instances of entity classes can be stored in the database directly. Other persistable types can be embedded in entity classes as fields. In