Home » Search

About class

11-20 of 200Refresh
Tutorial
126

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
125

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
125

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
125

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
125

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

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
JPA Doc
124

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

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 ... ; import javax.servlet.http.*; import javax.persistence.*; public class GuestServlet extends
Tutorial
124

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.*; public class GuestServlet extends HttpServlet { private static final long
Manual
123

Chapter 2 - JPA Entity Classes

JPA Entity classes are user defined classes whose instances can be stored in a database. To store data in an ObjectDB database using JPA you have to define entity classes that represent your application data object model. This chapter explains how to define and use entity classes