Fast Object Database for Java - with JPA/JDO support

Internal Website Search

11-20 of 200 resultsRefresh
141

Defining a JPA Entity Class

To be able to store Point objects in the database using JPA we need to define an entity class. A JPA entity class is a POJO (Plain Old Java Object) class, i.e. an ordinary Java class that is marked ... to serializable classes, which are marked as having the ability to be serialized. The Point Entity
137

Step 4: Add a Controller Class

Class] dialog box by right clicking the guest package node (in the [Projects] window) and selecting New > Java Class... Enter GuestController as the class name - use exactly that case sensitive class name. The Package should be guest. Click Finish to create the new Spring Controller class. Now
137

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. The package name should be tutorial. Enter Main as the class name (case sensitive). Click Finish
137

JDO Predefined ID Classes

An object ID is a combination of a persistence capable class and a primary key. It provides a unique representation of a persistent object. The following classes serve as predefined ID classes for persistence capable classes with a simple single field primary key: Object IDs are used in many
137

Step 4: Add a Controller Class

Class] dialog box by right clicking the guest package node (in the [Package Explorer] window) and selecting New > Class. The package name should be guest. Enter GuestController as the class name - use exactly that case sensitive class name. Click Finish to create the new Spring Controller class. Now
136

Step 3: Add a Context Listener Class

> Other... Select Web > Web Application Listener and click Next. Enter GuestListener as the class name - use exactly that case sensitive class name. The Java package name should be guest. Click Finish to create the new listener class. Now replace the content of the new source file with the following code
136

Step 3: Add a Context Listener Class

as the class name - use exactly that case sensitive class name. Click Next and then Select All to enable the Finish button. Click Finish to create the new listener class. Now replace the content ... javax.servlet.*; @WebListener public class GuestListener implements ServletContextListener
135

JPA Annotations for Classes

JPA defines three types of persistable classes which are set by the following annotations: Chapter 2 of the ObjectDB manual explains these annotations in detail. Entity and mapped super classes ... policy (as explained in chapter 3): Another JPA class annotation defines an ID class: ID classes
135

Step 4: Add a Servlet Class

... Enter GuestServlet as the class name - use exactly that case sensitive class name. The Java package name should be guest. Click Finish to create the new servlet class. Now replace the content ... .persistence.*; @WebServlet("/GuestServlet") public class GuestServlet extends HttpServlet
135

Step 4: Add a Servlet Class

GuestServlet as the class name - use exactly that case sensitive class name. Click Finish to create the new servlet class. Now replace the content of the new source file with the following code: package guest ... class GuestServlet extends HttpServlet { private static final long serialVersionUID = 1L

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