ObjectDB ObjectDB

Internal Website Search

1-10 of 200 resultsRefresh
67

Defining a JPA Entity Class

To be able to store Point objects in the database using JPA we need to define an entity class ... to serializable classes, which are marked as having the ability to be serialized. The Point Entity Class The following Point class, which represents points in the plane, is marked as an entity class
41

CRUD Database Operations with JPA

code fragment stores 1,000 Point objects in the database: em.getTransaction().begin(); for (int i = 0; i < 1000; i++) { Point p = new Point(i, i); em.persist(p); } em ... ) require an active transaction. In the example above, every Point object is first constructed as
25

Storing JPA Entity Objects

<= 1000000; i++) { Point point = new Point(i, i); em.persist(point); if ((i ... . Therefore, holding 1,000,000 managed Point instances in the persistence context might consume ... .getTransaction().begin(); for (int i = 1; i <= 1000000; i++) { Point point = new Point(i, i
22

Index Definition

query execution. Indexes are especially efficient in lookup and range queries: SELECT p FROM Point p WHERE p.x = 100 SELECT p FROM Point p WHERE p.x BETWEEN 50 AND 80 SELECT p FROM Point p ... x and y enables quick execution of the following queries: SELECT p FROM Point p WHERE p.x = 100
19

BIRT/ODA ObjectDB Driver

. Enter data source name (e.g. ObjectDB Points) and click Next. Specify an ObjectDB connection URL - either embedded (e.g. c:\points.odb) or client-server (e.g. objectdb://localhost/points.odb;user=admin ... (e.g. ObjectDB Points). Enter a data set name (e.g. Points by X) and click Next. Entry a JPQL or
6

Step 3: Add a Main Class

to store Point objects in the database and then retrieve them from the database. Use copy and paste ... Point objects in the database: em.getTransaction().begin(); for (int i = 0; i < 1000; i++) { Point p = new Point(i, i); em.persist(p); } em
6

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 ... to create the class. alt="" height="615" src="/files/images/tutorial/points/eclipse/main.png" style ... "); EntityManager em = emf.createEntityManager(); // Store 1000 Point objects in the database
4

Step 2: Define a JPA Entity Class

name (case sensitive). Enter Point as the class name (case sensitive). Click Finish to create the new class. Copy and paste the following code into the newly created Point class: package tutorial; import java.io.Serializable; import javax.persistence.*; @Entity public class Point
4

Step 2: Define a JPA Entity Class

) and selecting New > Java Class... Enter Point as the class name - use exactly that case sensitive ... .Serializable; import javax.persistence.*; @Entity public class Point implements Serializable ... id; private int x; private int y; public Point() { } Point(int x, int
2

[ODB1] Chapter 3 - Persistent Classes

move to the original entry point: RealMain.main(args); } } The eMain class ("enhancer Main") becomes the new entry point at development time. First the enhancer is called, and when enhancement is completed, the original entry point is called. The overhead to run the enhancer on every run is negligible

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support