About point

1-10 of 200Refresh
Manual
114

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
Manual
57

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
Tutorial
48

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
Tutorial
47

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
Manual
36

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
Tutorial
34

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
Manual
32

Index Definition

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 WHERE p.x >= 50 ... enables quick execution of the following queries: SELECT p FROM Point p WHERE p.x = 100 AND p.y = 100
Tutorial
32

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
Manual
27

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
Tutorial
27

Step 4: Create an ObjectDB Data Set

Points).  Enter a data set name (e.g. Points by X) and click Next. The database in this tutorial contains Point entity objects. We will use a simple JPQL query that retrieves points with x value in a specified range: SELECT p.x as x, p.y as y FROM Point p WHERE p.x BETWEEN :low AND :high Use copy