ObjectDB ObjectDB

Internal Website Search

1-10 of 200 resultsRefresh
68

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

= 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 ... a managed entity) by the persist method. The new Point objects are physically stored in the database
35

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
34

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 ... (); // Store 1000 Point objects in the database: em.getTransaction().begin(); for (int i = 0; i < 1000; i++) { Point p = new Point(i, i); em.persist(p
28

Point.java

Point.java
28

points-console.zip

points-console.zip
28

Point.java

Point.java
28

Point.java

Point.java
28

points-console.zip

points-console.zip
26

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

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