ObjectDB Database Search
1-50 of 200 resultsjakarta.persistence.EntityManagerFactory Jakarta Persistence (JPA) Interface jakarta.persistence. EntityManagerFactory Super Interfaces ... . An EntityManagerFactory with a lifecycle managed by the application may be created using the static operations ... , there is exactly one EntityManagerFactory for each persistence unit: // create a factory at initialization time | |
jakarta.persistence.EntityManagerFactory.unwrap(Class) Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory T unwrap (   ... . If the provider implementation of EntityManagerFactory does not support the given type ... either the underlying class implementing EntityManagerFactory or an interface it implements. Returns | |
jakarta.persistence.EntityManagerFactory.close() Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory void close() Close ... , all methods invoked on it will throw the IllegalStateException , except for EntityManagerFactory .isOpen , which will return false. Once an EntityManagerFactory has been closed, all its entity managers | |
jakarta.persistence.EntityManagerFactory.addNamedEntityGraph(String,EntityGraph) Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory void addNamedEntityGraph ( String graphName , EntityGraph entityGraph ) Add a named copy of the given EntityGraph to this EntityManagerFactory . If an entity graph with the given name | |
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 types A map keyed by query name , containing references to every named query whose result type | |
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 graph types A map keyed by graph name , containing every named entity graph whose entity type | |
jakarta.persistence.EntityManagerFactory.runInTransaction(Consumer) Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory void runInTransaction ( Consumer work ) Create a new application-managed EntityManager with an active transaction, and execute the given function, passing the EntityManager to the function. If the transaction | |
jakarta.persistence.EntityManagerFactory.getTransactionType() Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory PersistenceUnitTransactionType getTransactionType() The type of transaction management used by this persistence unit, either resource-local transaction management, or JTA. Since: Jakarta Persistence (JPA) 3.2 | |
jakarta.persistence.EntityManagerFactory.getSchemaManager() Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory SchemaManager getSchemaManager() Return interface providing access to schema management operations for the persistence unit. Returns: an instance of SchemaManager . Throws: IllegalStateException - if the entity manager | |
jakarta.persistence.EntityManagerFactory.addNamedQuery(String,Query) Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory void addNamedQuery ( String name , Query query ) Define the query, typed query, or stored procedure query as a named query such that future query objects can be created from it using | |
jakarta.persistence.EntityManagerFactory.callInTransaction(Function) Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory R callInTransaction ( Function work ) Create a new application-managed EntityManager with an active transaction, and call the given function, passing the EntityManager to the function. If the transaction type | |
jakarta.persistence.EntityManagerFactory.createEntityManager() Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory EntityManager createEntityManager() Create a new application-managed EntityManager . This method returns a new EntityManager instance each time it is invoked. The EntityManager.isOpen method will return true | |
jakarta.persistence.EntityManagerFactory.createEntityManager(Map) Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory EntityManager createEntityManager ( Map map ) Create a new application-managed EntityManager with the given Map specifying property settings. This method returns a new EntityManager instance each time | |
jakarta.persistence.EntityManagerFactory.createEntityManager(SynchronizationType) Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory EntityManager createEntityManager ( SynchronizationType synchronizationType ) Create a new JTA application-managed EntityManager with the specified synchronization type. This method returns a new | |
jakarta.persistence.EntityManagerFactory.createEntityManager(SynchronizationType,Map) Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory EntityManager createEntityManager ( SynchronizationType synchronizationType , Map map ) Create a new JTA application-managed EntityManager with the specified synchronization type and map | |
jakarta.persistence.EntityManagerFactory.getName() Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory String getName() The name of the persistence unit. Since: Jakarta Persistence (JPA) 3.2 | |
jakarta.persistence.EntityManagerFactory.getProperties() Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory Map getProperties() Get the properties and associated values that are in effect for the entity manager factory. Changing the contents of the map does not change the configuration in effect. Returns: properties. Throws | |
jakarta.persistence.EntityManagerFactory.getCache() Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory Cache getCache() Access the cache that is associated with the entity manager factory (the "second level cache"). Returns: an instance of Cache , or null if there is no second-level cache in use. Throws | |
jakarta.persistence.EntityManagerFactory.getPersistenceUnitUtil() Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory PersistenceUnitUtil getPersistenceUnitUtil() Return interface providing access to utility methods for the persistence unit. Returns: an instance of PersistenceUnitUtil . Throws: IllegalStateException - if the entity | |
jakarta.persistence.EntityManagerFactory.getCriteriaBuilder() Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory CriteriaBuilder getCriteriaBuilder() Return an instance of CriteriaBuilder which may be used to construct CriteriaQuery objects. Returns: an instance of CriteriaBuilder . Throws: IllegalStateException - if the entity | |
jakarta.persistence.EntityManagerFactory.getMetamodel() Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory Metamodel getMetamodel() Return an instance of the Metamodel interface for access to the metamodel of the persistence unit. Returns: an instance of Metamodel . Throws: IllegalStateException - if the entity manager factory has been closed. Since: Jakarta Persistence (JPA) 2.0 | |
jakarta.persistence.EntityManagerFactory.isOpen() Jakarta Persistence (JPA) Method in jakarta.persistence. EntityManagerFactory boolean isOpen() Indicates whether the factory is open. Returns true until the factory has been closed. Returns: boolean indicating whether the factory is open. Since: Jakarta Persistence (JPA) 1.0 | |
JPA Connections and Transactions of an EntityManagerFactory instance is to create EntityManager instances. An EntityManagerFactory is constructed ... of the EntityManagerFactory itself might be less efficient, but it is a one-time operation ... . EntityManagerFactory An EntityManagerFactory instance is obtained by using a static factory method | |
JPA Runtime Tuning & Configuration with annotations), JPA follows a hierarchical override model: EntityManagerFactory (global ... Defines the scope of a pessimistic lock: NORMAL or EXTENDED . Usage EntityManagerFactory Set the PersistenceConfiguration.LOCK_SCOPE property when you create the EntityManagerFactory , or set "jakarta | |
Obtaining a JPA Database Connection content also require an EntityTransaction instance. Obtaining an EntityManagerFactory Obtaining an EntityManager instance is a two-step process. First, you obtain an EntityManagerFactory instance ... you to define a persistence unit generate an EntityManagerFactory . However, with ObjectDB | |
JPA Shared (L2) Entity Cache a second-level (L2) cache of entities, which is managed by the EntityManagerFactory and shared by ... and the EntityManagerFactory 's L2 cache, which are managed on the client side, ObjectDB also manages ... and are shared by all EntityManagerFactory and EntityManager instances for that database | |
JPA Persistence Unit. EntityManagerFactory ; import jakarta.persistence.PersistenceConfiguration; // ... // Create a programmatic ... .class) .managedClass(sample.MyEntity2.class); // Instantiate the EntityManagerFactory using the configuration object: EntityManagerFactory emf = Persistence.createEntityManagerFactory(config); Using  | |
JPA Container Injection Annotations the container to inject EntityManager or EntityManagerFactory proxies directly into application components ... . EntityManagerFactory injection Inject an EntityManagerFactory using these annotations: Expresses a dependency on an EntityManagerFactory , useful for creating EntityManagers manually or accessing factory | |
Database Replication and Clustering this case, you can access the master database as follows: EntityManagerFactory emf = Persistence ... database requires a slightly different URL: EntityManagerFactory emf = Persistence ... , you can also use a composite URL: EntityManagerFactory emf = Persistence.createEntityManagerFactory( "objectdb | |
Setting and Tuning of JPA Queries: For an EntityManagerFactory , use the createEntityManagerFactory method: Map properties = new HashMap(); properties.put("jakarta.persistence.query.timeout", 4000); EntityManagerFactory emf = Persistence | |
JPA Core Types. Use its static methods to create an EntityManagerFactory as the first step for accessing ... obtained from EntityManagerFactory . It provides methods to inspect identifiers and version | |
ObjectDB Object Database Features products . Connection Pooling Automatic connection pool managed by EntityManagerFactory ... entity data cache (per EntityManagerFactory ). Database file page cache . Query program cache | |
JPA Optimistic and Pessimistic Locking;an EntityManagerFactory , use the createEntityManagerFactory method: Map properties = new HashMap(); properties.put("jakarta.persistence.lock.timeout", 2000); EntityManagerFactory emf = Persistence | |
JPA Named Queries Annotations. Retrieve it by result type from EntityManagerFactory .getNamedQueries , and use it to get a TypedQuery instance via EntityManager.createQuery . | |
JPA Queries; EntityManagerFactory or EntityManager using the getCriteriaBuilder method. Additional | |
JPA Metamodel API API is Metamodel . You can obtain an instance from either the EntityManagerFactory 's getMetamodel | |
Entity Management Settings the EntityManagerFactory and shared by all its EntityManager instances. To disable the level-2 cache, specify 0 or 0mb | |
Posting Sample Code; EntityManagerFactory emf = Persistence | |
JPA Annotations , PostLoad ). Configures the injection of EntityManager and EntityManagerFactory resources in Jakarta EE | |
JPA Criteria API Queries for Criteria queries and their elements. You can get an instance from either the EntityManagerFactory 's | |
Managing JPA Entities EntityManager . ObjectDB also manages a level 2 (L2) shared cache for the EntityManagerFactory | |
JPA Primary Key the EntityManagerFactory . The getIdentifier method takes one argument, a managed entity, and returns the primary key | |
Step 3: Add a Context Listener Class EntityManagerFactory instance with a global application scope. We have to register ... if not existing yet) when the web application starts, by instantiating an EntityManagerFactory ... the EntityManagerFactory . To register a ServletContextListener : Open the [New Listener] dialog box | |
Step 3: Add a Context Listener Class EntityManagerFactory instance with a global application scope. We have to register ... if not existing yet) when the web application starts, by instantiating an EntityManagerFactory ... closing the EntityManagerFactory . To register a ServletContextListener : Open the [New File | |
Step 4: Add a Servlet Class, IOException { // Obtain a database connection: EntityManagerFactory emf = ( EntityManagerFactory ... ); } } GuestServlet performs the following operations on every http request: The EntityManagerFactory | |
Step 4: Add a Servlet Class: EntityManagerFactory emf = ( EntityManagerFactory )getServletContext().getAttribute("emf"); EntityManager em ... on every http request: The EntityManagerFactory is retrieved from the application scope attribute | |
Step 3: Add a Main Class yet): EntityManagerFactory emf = Persistence.createEntityManagerFactory(   | |
Step 3: Add a Main Class a database connection // (create a new database if it doesn't exist yet): EntityManagerFactory emf | |
Step 2: Define a JPA Entity Class a context listener class that will manage a JPA's EntityManagerFactory representing the ObjectDB database. | |
Step 2: Define a JPA Entity Class listener class that will manage a JPA's EntityManagerFactory representing the ObjectDB database. |