Internal Website Search

1-50 of 200 results

Storing JPA Entity Objects

New entity objects can be stored in the database either explicitly by invoking the persist method or implicitly as a result of a cascade operation. Explicit Persist The following code stores ... its state to Managed. The new entity object is stored in the database when the transaction

JPA Entity Fields

that do not participate in persistence and their values are never stored in the database (similar ... ) entity fields with no real content to be stored in the database. Persistent Fields Every non-static non ... the @Transient annotation). Storing an entity object in the database does not store methods or code

JPA Persistable Types

The term persistable types refers to data types that can be used for storing data in the database ... can be stored in the database directly. Other persistable types can be embedded in entity classes as fields . In addition, only instances of entity classes preserve identity and are stored

JPA Primary Key

Every entity object that is stored in the database has a primary key. Once assigned, the primary ... . Instances of other persistable types are always stored as part of their containing entity objects ... that is stored in the database. The primary key of the first entity object in the database is 1, the primary

Defining a JPA Entity Class

To be able to store Point objects in the database using JPA we need to define an entity class ... class, and accordingly, provides the ability to store Point objects in the database and retrieve ... Entity Classes Storing an entity object in the database does not store methods and code

Database Schema Evolution

of an entity class are detected by ObjectDB. New entity objects have to be stored in the new class schema, and old entity objects, which were stored previously in the old class schema ... object is only updated to the new schema when that entity object is stored to the database

Working with JPA Entity Objects

requires using entity objects for many operations, including storing , retrieving, updating and deleting ... , the owning EntityManager stores the new entity object to the database. More details on storing objects are provided in the Storing Entities section. Entity objects retrieved from the database by

Database Explorer

but it can also function as an editor. New Entity Objects To construct new entity objects and store ... of objects to construct. Click the Create and Persist button to construct and store the new entity ... stores String instances in the database using the same encoding that they have in memory

Index Definition

but might be presented in the ObjectDB Explorer and in logging. When an entity object is stored in the database ... that are stored as part of the entity. Therefore, indexes on multi part paths are only allowed when using embeddable classes as fields of embedded object are stored as part of the containing entity

What are the main benefits of using ObjectDB?

. The ability to store ordinary objects in the database directly can simplify the code significantly ... ObjectDB is especially designed to store and manage graphs of objects efficiently. That can accelerate ... fields can be stored by ObjectDB simply as part of the containing object. Relational databases lack

CRUD Database Operations with JPA

Given an EntityManager , em , that represents a JPA connection to the object database, we can use it to store , retrieve, update and delete database objects. Storing New Entity Objects The following code fragment stores 1,000 Point  objects in the database: em. getTransaction (). begin

What is ObjectDB?

ObjectDB is an Object Oriented Database Management System (ODBMS). It provides all the standard database management services (storage and retrieval, transactions, lock management, query processing, etc.), but it uses an object oriented model to store and manage data. You can easily store ordinary

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. 

Shared (L2) Entity Cache

. BYPASS - cache is not updated with new data. CacheStoreMode . USE - new data is stored in the cache ... data is stored in the cache - refreshing entity objects that are already cached. The default setting

Online Backup

), since an ObjectDB database is stored as an ordinary file in the file system.  ObjectDB ... then the backup file will be downloaded to the client and will be stored on the client machine. Alternatively

Updating JPA Entity Objects

Modifying existing entity objects that are stored in the database is based on transparent persistence, which means that changes are detected and handled automatically. Transparent Update ... can be cascaded from all the entity objects that have to be stored in the database, including from

Chapter 1 - Quick Tour

ObjectDB databases and perform basic CRUD operations (Create/ Store , Retrieve, Update and Delete ... storing , retrieving, updating and deleting Point objects. To run the sample program of this chapter in

JPA Lifecycle Events

). @PostPersist - after storing a new entity in the database (during commit or flush ). @PostLoad

Database Management Settings

stored in the database, the index cannot be used until all the existing instances are indexed

Detached Entity Objects

that have been loaded before detachment should be used. Changes to detached entity objects are not stored in

[ODB1] Chapter 6 - Persistent Objects

. represents some database content, or a transient object, i.e. not related to any database. Storing Objects ... is automatically stored in the database when the transaction is committed (unless it is being deleted before commit ... . The makePersistentAll( ... ) method stores all the elements in the specified collection or array in

[ODB1] Chapter 2 - A Quick Tour

the program is run another string is stored in the database and all the strings in the database are printed ... - construct and store a new list: 24 list = new ArrayList(); 25 Utilities.bind(pm, list, "Hello World"); 26 ... object database, can simply store a memory data structure in the database as is. If the database is not

[ODB1] Chapter 3 - Persistent Classes

Persistent Classes are user defined classes whose instances can be stored in a database using JDO ... ). 3.2  Persistent Fields and Types Storing a persistent object in the database does not store methods and code. Only the state of the object as reflected by its persistent fields is stored

[ODB1] Chapter 4 - JDO Metadata

that case the fields of class X are not persistent fields, and when an instance of class C is stored , only persistent fields from classes B and C are stored . The closest persistent super class in ... transactional , like f2 above, has similar behavior to transient because its value is never stored in

javax.jdo.listener.InstanceLifecycleEvent.STORE

JDO Static Field in javax.jdo.listener.InstanceLifecycleEvent STORE Since: JDO 2.0

Step 2: Define a JPA Entity Class

To store objects in an ObjectDB database using JPA we need to define an entity class: Right click on the project in the [Package Explorer] window and select New Class . Enter tutorial as the package ...  a Main class that stores and retrieves instances of the Point entity class.

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 Java Class] dialog box, e.g. by right clicking the tutorial package node (in the [Projects] window ... . The next step is adding a Main class that stores and retrieves instances of the Point entity class.

Step 4: Add a Servlet Class

the next tutorial step) - a new Guest entity object is constructed and stored in the database. All the Guest entity objects are retrieved from the database and stored in the request's "guest" attribute

Step 3: Add a Context Listener Class

The Guest entity objects will be stored in an ObjectDB database, which will be represented by a JPA's EntityManagerFactory instance with a global application scope. We have to register ... the Enhancer to enhance the entity class, creates an EntityManagerFactory instance and stores

Step 3: Define an EJB Session Bean

{ // Injected database connection: @PersistenceContext private EntityManager em; // Stores a new guest ... : persist - for storing a new  Guest entity object in the database. getAllGuests

Step 3: Define a Spring DAO Component

connection: @PersistenceContext private EntityManager em; // Stores a new guest: @Transactional public ... - for storing a new  Guest entity object in the database. getAllGuests - for retrieving all the existing

Step 3: Add a Main Class

In this step we will add a main class to the project to store and retrieve Point objects from the database: Right click the tutorial package in the [Package Explorer] window and select New Class ... = emf.createEntityManager(); // Store 1000 Point objects in the database: em.getTransaction().begin(); for (int i = 0; i

Step 3: Add a Main Class

In this step we will add code to the Main class (that was generated with the project) in order to store Point objects in the database and then retrieve them from the database. Use copy and paste ... .createEntityManager(); // Store 1000 Point objects in the database: em.getTransaction().begin(); for (int i = 0; i

Step 3: Define a Spring DAO Component

connection: @PersistenceContext private EntityManager em; // Stores a new guest: @Transactional public ... - for storing a new  Guest entity object in the database. getAllGuests - for retrieving

Step 4: Add a Servlet Class

entity object is constructed and stored in the database. All the Guest entity objects are retrieved from the database and stored in the request's "guest" attribute. Then the processing is forwarded

Step 3: Add a Context Listener Class

The Guest entity objects will be stored in an ObjectDB database, which will be represented by a JPA's EntityManagerFactory instance with a global application scope. We have to register ... and creates an EntityManagerFactory instance and stores it as an application scope attribute in

Step 3: Define an EJB Session Bean

EntityManager em; // Stores a new guest: public void persist(Guest guest) { em.persist(guest ... ) class defines two methods: persist - for storing a new Guest entity object in the database

Step 4: Add a Servlet Class

that will be added in the next tutorial step) - a new Guest entity object is constructed and stored in the database. All the Guest entity objects are retrieved from the database and stored in the request's

Step 4: Add a Servlet Class

is constructed and stored in the database. All the Guest entity objects are retrieved from the database and stored in the request's "guest" attribute. Then the processing is forwarded to the JSP page

[ODB1] Chapter 9 - ObjectDB Explorer

persistent class is automatically added to the database when its first instance is stored by ... when the application stores an object with the new schema in the database. To see the change in ... and store them in the database, open the "Construct New Persistent Objects" dialog box using

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 Java Class] dialog box, e.g. by right clicking the project node (in the [Package Explorer] window) and selecting  New Class . Enter  guest as the package name - use  exactly that case

Eclipse/JPA Spring MVC Web Tutorial

entity objects are stored in an ObjectDB database. Required Software For this tutorial you will need

Step 4: Run the Application

directory. Running the application again will use the existing database file to store an additional

Spring MVC and JPA Tutorial

are stored in an ObjectDB database. This tutorial is available in the following versions: In

Step 4: Add a Controller Class

the next tutorial step) - a new Guest entity object is constructed and stored in the database. Processing

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 entity objects, where each Point has two persistent fields: x and y

NetBeans/JPA Web Application Tutorial

and all the Guest entity objects are stored in an ObjectDB database. Required Software For this tutorial

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 Entity Class] dialog box, e.g. by right clicking the project node (in the [Projects] window) and selecting New Entity Class ... (or New Other... Persistence Entity Class and clicking Next ). Enter

[ODB1] Chapter 5 - JDO Connections

storing , retrieving, updating and deleting database objects, are provided in the next chapter ... . In JDO, operations that affect the content of the database ( store , update, delete ... to the database it stores the changes in a related temporary file in the same directory as the database file

ObjectDB 1.0 Manual

and transactions in JDO. Chapter 6 - Persistent Objects Shows how to store , retrieve, update