About class

11-20 of 200Refresh
Tutorial
105

Step 2: Entity Class and Persistence Unit

To store objects in an ObjectDB database using JPA we need to define an entity class: Open the [New Entity Class] dialog box, e.g. by right clicking the project node (in the [Projects] window) and selecting New > Entity Class... (or New > Other... > Persistence > Entity Class and clicking
Tutorial
105

Step 2: Entity Class and Persistence Unit

To store objects in an ObjectDB database using JPA we need to define an entity class: Open the [New Java Class] dialog box, e.g. by right clicking the project node (in the [Package Explorer] window) and selecting New > Class. Enter guest as the package name - use exactly that case sensitive package
Tutorial
105

Step 3: Add a Main Class [2011-02-11]

In this step we will add a main class to the project with code that will store Point objects in the database and then retrieve them from the database: Open the [New Java Class] dialog box by right clicking the tutorial package node (in the [Package Explorer] window) and selecting New > Class
Tutorial
105

Step 3: Add a Main Class

In this step we will add a main class to the project with code that will store Point objects in the database and then retrieve them from the database: Open the [New Java Class] dialog box by right clicking the tutorial package node (in the [Package Explorer] window) and selecting New > Class
JDO Doc
104

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

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

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

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: package
Tutorial
103

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.*; public class GuestListener implements ServletContextListener { // Prepare
JPA Doc
102

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