ObjectDB Database Search
1-50 of 200 resultsJPA Class Enhancer of compiled classes after compilation. Enhancement is mainly for user-defined persistable classes ( entity classes , embeddable classes and mapped superclasses ), and is usually optional. There is one case, however, where enhancement is required. Non persistable classes that access directly (not | |
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 ... this is similar to serializable classes , which are marked as having the ability to be serialized. The Point | |
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 | |
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 . This chapter contains the following sections: | |
jakarta.persistence.metamodel.ManagedType.getMap(String,Class,Class) Jakarta Persistence (JPA) Method in jakarta.persistence.metamodel.ManagedType MapAttribute getMap ( String name , Class keyType , Class valueType ) Return the Map-valued attribute of the managed type that corresponds to the specified name and Java key | |
jakarta.persistence.metamodel.ManagedType.getDeclaredMap(String,Class,Class) Jakarta Persistence (JPA) Method in jakarta.persistence.metamodel.ManagedType MapAttribute getDeclaredMap ( String name , Class keyType , Class valueType ) Return the Map-valued attribute declared by the managed type that corresponds to the specified name | |
jakarta.persistence.PersistenceUnitUtil.isInstance(Object,Class) ( Object entity , Class entityClass ) Return true if the given entity ... class , or false otherwise. This method may, but is not required to, load the given entity by side effect. Parameters: entityClass - an entity class belonging to the persistence unit entity - entity | |
Step 2: Define a JPA Entity Class 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 tutorial package node (in the [Projects] window) and selecting New Java Class ... Enter Point as the class name - use exactly that case sensitive | |
Step 2: Define a JPA Entity Class 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 [Projects] window) and selecting New Java Class ... Enter Guest as the class name - use exactly that case sensitive class name | |
jakarta.persistence.metamodel.Metamodel.managedType(Class) managedType ( Class cls ) Return the metamodel managed type representing the entity, mapped superclass, or embeddable class . Parameters: cls - the type of the represented managed class Returns: the metamodel managed type. Throws: IllegalArgumentException - if not a managed class . Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.metamodel.Metamodel.embeddable(Class) embeddable ( Class cls ) Return the metamodel embeddable type representing the embeddable class . Parameters: cls - the type of the represented embeddable class Returns: the metamodel embeddable type. Throws: IllegalArgumentException - if not an embeddable class . Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.EntityManagerFactory.unwrap(Class); Class cls ) Return an object of the specified type to allow access to a provider-specific API ... , the PersistenceException is thrown. Parameters: cls - the class of the object to be returned. This is usually either the underlying class implementing EntityManagerFactory or an interface it implements. Returns | |
jakarta.persistence.EntityManager.unwrap(Class); Class cls ) Return an object of the specified type to allow access to a provider-specific API ... is thrown. Parameters: cls - the class of the object to be returned. This is usually either the underlying class implementing EntityManager or an interface it implements. Returns: an instance | |
jakarta.persistence.EntityManager.getEntityGraphs(Class); Class entityClass ) Return all named EntityGraph s that are defined for the given entity class type. Parameters: entityClass - entity class Returns: list of all entity graphs defined for the entity. Throws: IllegalArgumentException - if the class is not an entity. Since: Jakarta Persistence (JPA) 2.1 | |
jakarta.persistence.EntityManager.find(Class,Object,FindOption...) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T find ( Class ... of the given entity class by primary key, using the specified options . Search for an entity with the specified class and primary key. If the given options include a LockModeType , lock | |
jakarta.persistence.Cache.unwrap(Class) Jakarta Persistence (JPA) Method in jakarta.persistence.Cache T unwrap ( Class cls ... . If the provider's implementation of the Cache interface does not support the specified class , the PersistenceException is thrown. Parameters: cls - the class of the object to be returned. This is usually | |
Step 2: Define a JPA Entity Class 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 | |
jakarta.persistence.PersistenceConfiguration.managedClass(Class) Jakarta Persistence (JPA) Method in jakarta.persistence.PersistenceConfiguration PersistenceConfiguration managedClass ( Class managedClass ) Add a managed class (an Entity , Embeddable ... class Returns: this configuration. Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.Cache.evict(Class) Jakarta Persistence (JPA) Method in jakarta.persistence.Cache void evict ( Class cls ) Remove the data for entities of the specified class (and its subclasses) from the cache. Parameters: cls - entity class Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.criteria.CriteriaBuilder.construct(Class,Selection...) construct ( Class resultClass , Selection ... selections ) Create ... that is applied to the results of the query execution. If the constructor is for an entity class , the resulting ... to the constructor resultClass - class whose instance is to be constructed Returns: compound selection | |
jakarta.persistence.InheritanceType.TABLE_PER_CLASS Jakarta Persistence (JPA) Enum Constant in jakarta.persistence.InheritanceType TABLE_PER_ CLASS A table for each concrete entity class . Each concrete class in the hierarchy has its own table, and each entity instance is stored as a single table row. No discriminator column is necessary. Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.EntityManager.find(Class,Object) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T find ( Class ... of the specified class and primary key. If the entity instance is contained in the persistence context, it is returned from there. Parameters: entityClass - entity class primaryKey - primary key Returns | |
jakarta.persistence.EntityManager.getReference(Class,Object); Class entityClass , Object primaryKey ) Obtain a reference to an instance of the given entity class with the given primary key, whose state may be lazily fetched. If the requested ... while the entity manager was open. Parameters: entityClass - entity class primaryKey - primary key | |
jakarta.persistence.EntityManager.find(Class,Object,Map) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T find ( Class ... , using the specified properties. Search for an entity of the specified class and primary key ... class properties - standard and vendor-specific properties and hints primaryKey - primary key Returns | |
jakarta.persistence.EntityManager.find(Class,Object,LockModeType) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T find ( Class ... class and primary key, and lock it with respect to the specified lock type. If the entity instance ... class lockMode - lock mode primaryKey - primary key Returns: the found entity instance or null | |
jakarta.persistence.EntityManager.find(Class,Object,LockModeType,Map) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T find ( Class ... for an entity of the specified class and primary key, and lock it with respect to the specified lock type ... the provider, the hint may or may not be observed. Parameters: entityClass - entity class lockMode | |
jakarta.persistence.Query.unwrap(Class) Jakarta Persistence (JPA) Method in jakarta.persistence.Query T unwrap ( Class cls ... . Parameters: cls - the type of the object to be returned. This is usually either the underlying class implementing Query or an interface it implements. Returns: an instance of the specified class . Throws | |
Step 2: Define a JPA Entity Class To store objects in an ObjectDB database using JPA we need to define an entity class : Right click on the project in the [Package Explorer] window and select New Class . Enter tutorial as the package name (case sensitive). Enter Point as the class name (case sensitive). Click Finish to create | |
Step 2: Entity Class and Persistence Unit To store objects in an ObjectDB database using JPA we need to define an entity class : Right click ... , enter src/main/java as Folder Name and click Finish . Open the [New Java Class ] dialog box, e.g. by ... ; New Class . Enter guest as the package name - use exactly that case sensitive package | |
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 | |
jakarta.persistence.Cache.evict(Class,Object) Jakarta Persistence (JPA) Method in jakarta.persistence.Cache void evict ( Class cls , Object primaryKey ) Remove the data for the given entity from the cache. Parameters: cls - entity class primaryKey - primary key Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.metamodel.IdentifiableType.getId(Class) Jakarta Persistence (JPA) Method in jakarta.persistence.metamodel.IdentifiableType SingularAttribute getId ( Class type ) Return the attribute that corresponds to the id attribute ... the identifiable type or if the identifiable type has an id class . Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.metamodel.IdentifiableType.getDeclaredId(Class) Jakarta Persistence (JPA) Method in jakarta.persistence.metamodel.IdentifiableType SingularAttribute getDeclaredId ( Class type ) Return the attribute that corresponds to the id ... of the given type is not declared in the identifiable type or if the identifiable type has an id class . Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.criteria.AbstractQuery.from(Class) Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.AbstractQuery Root from ( Class entityClass ) Create and add a query root corresponding to the given entity, forming a cartesian product with any existing roots. Parameters: entityClass - the entity class Returns: query | |
jakarta.persistence.EntityManagerFactory.getNamedQueries(Class) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManagerFactory Map getNamedQueries ( Class resultType ) Type Parameters: - the specified upper bound on the query result ... is assignable to the given Java type. Parameters: resultType - any Java type, including Object. class | |
jakarta.persistence.EntityManagerFactory.getNamedEntityGraphs(Class) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManagerFactory Map getNamedEntityGraphs ( Class entityType ) Type Parameters: - the specified upper bound on the entity ... is assignable to the given Java type. Parameters: entityType - any Java type, including Object. class meaning | |
jakarta.persistence.EntityManager.createStoredProcedureQuery(String,Class...) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager StoredProcedureQuery createStoredProcedureQuery ( String procedureName , Class ... resultClasses ... . Parameters: resultClasses - classes to which the result sets produced by the stored procedure | |
jakarta.persistence.EntityManager.createEntityGraph(Class) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager EntityGraph createEntityGraph ( Class rootType ) Create a new mutable EntityGraph , allowing dynamic definition of an entity graph. Parameters: rootType - class of entity graph Returns: entity graph. Since: Jakarta Persistence (JPA) 2.1 | |
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 | |
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 Next ). Enter | |
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 | |
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 | |
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 ... .servlet.*; @WebListener public class GuestListener implements ServletContextListener { // Prepare | |
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 | |
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 | |
Step 4: Add a Servlet Class. Enter 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 ... ; import javax.servlet.http.*; import javax.persistence.*; @WebServlet("/GuestServlet") public class | |
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 { private static | |
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 ... .http.HttpServletResponse; @WebServlet(name="GuestServlet", urlPatterns={"/guest"}) public class | |
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 ... ="GuestServlet", urlPatterns={"/guest"}) public class GuestServlet extends HttpServlet { private static final | |
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 replace the content of the Main class with the following content: package tutorial; import javax.persistence.*; import java.util.*; public class Main { public static void main(String[] args) { // Open |