Internal Website Search

1-50 of 200 results

Defining a JPA Entity Class

To be able to store Point objects in the database using JPA we need to define an entity class ... this is similar 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

BIRT/ODA ObjectDB Driver

data source types. 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;password=admin ). Click the Finish button to complete the creation

Index Definition

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 AND p.x = 10 But this time a full index scan is required ... for sorting results and for projection: SELECT MIN(p.x) FROM Point p WHERE p.x

Chapter 1 - Quick Tour

that contains points in the plane. Each point is represented by an object with two int fields, x and y, that hold the point's x and y coordinates. The program demonstrates CRUD database operations by storing, retrieving, updating and deleting Point objects. To run the sample program of this chapter in

CRUD Database Operations with JPA

code fragment stores 1,000 Point  objects in the database: em. getTransaction (). begin ... entity } } em. getTransaction (). commit (); In the above example all the Point objects whose x coordinate is greater or equal to 100 are deleted. All the other Point objects are updated. Chapter 3

Database Explorer

object can be specified by type and primary key separated by # (e.g. Point #1). A collection ... to an existing entity object, which has to be specified by type and primary key separated by # (e.g. Point #1 ... , which has to be specified by type and primary key separated by # (e.g. Point #1). The Edit Add

Is ObjectDB better than competing object databases?

Naturally, this is not the place to look for an unbiased answer for this question. However, you should consider the following points when doing your own objective comparison of object databases: ObjectDB is unique in supporting the standard APIs. It is the only object database with built in

Retrieving JPA Entity Objects

and all its persistent fields are initialized. From the point of view of the developer, it looks like

Obtaining a JPA Database Connection

:$objectdb/db/ points .odb"); The createEntityManagerFactory static method expects a persistence unit name as

Paths and Types in JPQL and Criteria API

are considered as basic paths and also serve as a starting point for building more complex paths

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 implements

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 { private ... int y; public Point () { } Point (int x, int y) { this.x = x; this.y = y; } public Long getId

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

Report Generation with BIRT and JPA

simple as possible - we will use the basic  points .odb ObjectDB database file from the Getting Started tutorial. The database file contains 1,000 Point entity objects, which represent points ... that we will create will be based on the following subset of these points :     (11, 11

Step 3: Create an ObjectDB Data Source

of available data source types. Enter data source name (e.g. ObjectDB Points ) and click Next . Specify the database connection url: Download and save the points .odb  database file (from the Quick Start tutorial ). Specify an ObjectDB connection url - either embedded (e.g. c:\ points .odb ) or client

Tutorial issue

.PersistenceException Ambiguous entity name - Point (used by [ point . Point ,tutorial. Point ]) (error 307 ... ) Caused by: com.objectdb.o.UserException: Ambiguous entity name - Point (used by [ point . Point ,tutorial. Point ]) at com.objectdb.o.MSG.d(MSG.java:61) at com.objectdb.o.TYM.ar(TYM.java:845) at com

Cascading persistence through an inverse field

a minimal example ( I make the assumption points can belong to multiple point collections). I removed ... ={PERSIST, REFRESH, MERGE}) private Set points = new HashSet (); public void addPoint( Point p) { points .add(p); } ... } @Entity public class Point { @ManyToMany(mappedBy=" points ", cascade={PERSIST

Using the wrong class to access a database

the Point database described in the Getting Started section: package com.objectdb.tutorial ... () { System.out.println("Test 1"); System.out.println(" Point .class: " + Point .class); EntityManagerFactory emf = Persistence.createEntityManagerFactory("$objectdb/db/ points .odb"); EntityManager em = emf

How to have a distribuited GWT application with ObjectDB and Spring?

and it is designed for a company renting cars which has 2 or 3 different points in a town. So each point of renting has got its own client/server in the same host. The problems comes out when point A has finished the cars to rent and needs to ask for some of them to point B or point C. So GWT application of point

Felix, rollback exception, error 613

: Failed to get reference value of field field db. Point .x using enhanced method (error 613)    ... .PersistenceException: com.objectdb.o.UserException: Failed to get reference value of field field db. Point .x using ... to get reference value of field field db. Point .x using enhanced method     at com.objectdb

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

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

Getting Started with JPA

This tutorial demonstrates how to create and run a simple JPA application. The demonstrated application uses JPA to store and retrieve simple  Point entity objects, where each  Point has two persistent fields -  x and  y . If you already know JPA - the source code

Getting Started with JPA - Eclipse Project

: Select File Import... Maven Existing Maven Projects and click Next . Select the points -console ... Eclipse: Right click the project node and select Run As Java Application . Select Main - point and click OK .

Getting Started with JPA and NetBeans

This is the NetBeans version of the  Quick Start with JPA tutorial. It demonstrates how to create and run a simple JPA application in NetBeans. The demonstrated application uses JPA to store and retrieve simple  Point entity objects, where each  Point has two persistent fields

How to resolve 404 errors with Eclipse/Maven Spring MVC

abandon eclipse and use the maven command line to deploy this Spring MVC web app to jetty and point ... under the that server icon in the server. But when I point the browser to localhost:8080/Guestbook ... so they point to the directory where you installed or unzipped tomcat 6. I did not use the windows

Difficulty with the BIRT plugin

", when actually the correct view is "Data Explorer", which is different. I can create the points datasource, and when I create a data set and enter: "SELECT p.x AS x, p.y AS y FROM Point p WHERE p.x BETWEEN :low AND :high" I get the error "Type Point is not found". I checked that the points .odb file

[ODB1] Chapter 3 - Persistent Classes

.objectdb.Enhancer.enhance("test.pc.*,test.X"); // Now 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

Problem with distinct select, order by and equivalent alias/attribute path

.createEntityManagerFactory("$objectdb/db/ points .odb");         EntityManager em = emf ... workaround or could this be fixed? Is the last (problematic) query invalid from your point of view? Thanks ... it out in the example project but pointing from there to the (client-server-based) database

TemporalType injection with Calendar using JPA

Serializable { private TimePeriod id; private List points ; public Chart() { this. points = new ... .persistence.FetchType.EAGER) public List getPoints() { return points ; }   public void setPoints(List points ) { this. points = points ; }     And the exception is as follows

EntityManager getMetamodel() causes crash

to your example code in the tutorial (with class Point ) and it works as expected: : (995, 995) (996, 996) (997 ... Point objects in the database: em.getTransaction().begin(); for (int i = 0; i System.out.println ... -one, Eg: Metamodel m = em.getMetamodel();     EntityType Point _ = m.entity( Point .class);  

[ODB1] Chapter 4 - JDO Metadata

' Point ': Thread thread1 = Utilities.startIndexBuilder(pm, Point .class, "x"); // Rebuild all the indexes of class ' Point ': Thread thread2 = Utilities.startIndexBuilder(pm, Point .class, null); // Rebuild

Step 4: Run the Application

You can run the application now by right clicking the Main node (in the [Projects] window) and selecting Run File . The expected output in the [Output] window, is: Total Points : 1000 Average X: 499.5 (0,0) (1,1) (2,2) (3,3) : : (998,998) (999,999) When you run the application for the first time

Step 4: Run the Application

You can now run the application by right clicking the Main.java file (in the [ Package Explorer ] window) and selecting Run As Java Application . The expected output in the Eclipse [Console] window, is: Total Points : 1000 Average X: 499.5 (0,0) (1,1) (2,2) (3,3) : : (998,998) (999,999

Getting Started with JPA - Maven Project

The current directory should be points -console (containing the pom.xml file). No need to download

Step 6: Design a BIRT Report Table

In this final step we will add a simple table to the report: Open the [Insert Table] dialog box by dragging a Table from the [Palette] window and dropping it on the report design (.rptdesign) layout. Set the column number to 2 , number of details to 1 , select the data set (e.g. Points by X

Getting Started with JPA - NetBeans Project

To open and run the  Quick Start with JPA tutorial project in NetBeans: Download and extract the project zip file: Getting Started with JPA - Maven Project (3KB) Open the Maven project in NetBeans: Select File Open Project... . Select the points -console directory and click Open Project . Run

Getting Started with JPA - IntelliJ Project

To open and run the  Quick Start with JPA tutorial project in IntelliJ IDEA: Download and extract the project zip file: Getting Started with JPA - Maven Project (3KB) Open the project in IntelliJ IDEA: Select File Open Project... . Select the points -console directory and click Open Project

[ODB1] Chapter 6 - Persistent Objects

. From the point of view of the developer, it looks like the entire graph of objects is present in ... are released automatically when the transaction is ended because, at that point , all the objects

javax.persistence.OrderBy

JPA Annotation OrderBy Target: METHOD, FIELD Implemented Interfaces: Annotation Specifies the ordering of the elements of a collection valued association or element collection at the point when the association or collection is retrieved. The syntax of the value ordering element is an orderby_list

[ODB1] Chapter 2 - A Quick Tour

a program entry point at development time. It starts by enhancing necessary classes (line 8). JDO

[ODB1] Chapter 8 - ObjectDB Server

above, there is no point to specifying different values for the max and user-max attributes (if different values

[ODB1] Chapter 5 - JDO Connections

a pool of free PersistenceManager instances. From the developer's point of view, connection pool

UPDATE statemen crash when i put the WHERE clause.

.createEntityManager() ; int lab_ points ; for (List linie: linesAsList ) if (linie.get( 1 ).matches( "[a-zA-Z- ]+" ) && linie.get( 2 ).length()= 2 ) { lab_ points = (Integer) em.createQuery( "select n.lab_ points from Record as n where n.student.nume=:nume and n.student.prenume=:prenume and n.student

javax.jdo.annotations.Persistent.name

JDO Annotation Attribute in javax.jdo.annotations.Persistent String name default "" Name of the member when this is embedded in another object. The fully-qualified member name is used. For example, "line.point1.x" refers to the member x in class Point that is embedded as member point1 in class

javax.jdo.annotations.Persistent

. For example, "line.point1.x" refers to the member x in class Point that is embedded as member point1 in class

javax.jdo.annotations.Column.scale

JDO Annotation Attribute in javax.jdo.annotations.Column int scale default -1 Scale for the column when handling floating point values. Since: JDO 2.1

javax.jdo.annotations.Column

default -1 Scale for the column when handling floating point values. Since: JDO 2.1 String sqlType

javax.jdo.spi.StateManager

JDO Interface StateManager This interface is the point of contact between managed instances of PersistenceCapable classes and the JDO implementation. It contains the methods used by PersistenceCapable instances to delegate behavior to the JDO implementation. Each managed PersistenceCapable