ObjectDB Database Search
1-50 of 200 resultsJPA Persistence Unit A JPA Persistence Unit is a logical grouping of user defined persistable classes (entity classes, embeddable classes and mapped superclasses) with related settings. Defining a persistence unit is optional when using ObjectDB, but required by JPA. persistence .xml Persistence units are defined in | |
JPA Persistable Types The term persistable types refers to data types that can be used for storing data in the database. ObjectDB supports all the JPA persistable types, which are: User defined classes - Entity classes ... can be stored in the database directly. Other persistable types can be embedded in entity classes as fields | |
What is the Java Persistence API (JPA)? The Java Persistence API (JPA) is a standard API for accessing databases from within Java ... JDBC. Using plain old Java objects (POJO) to represent persistent data can significantly simplify ... of the Java Persistence API (JPA). By interacting with ObjectDB using standard JPA | |
Step 2: Entity Class and Persistence Unit) and selecting New Entity Class ... (or New Other... Persistence Entity Class and clicking Next ). Enter ... the [Provider and Database] step just click Finish to generate a default persistence .xml file with a default persistence unit (that will be configured later). If the Finish button is disabled | |
Step 2: Entity Class and Persistence Unit) and selecting New Entity Class ... (or New Other... Persistence Entity Class and clicking ... entity class. In the [Provider and Database] step click Finish to generate a default persistence .xml file with a default persistence unit (that will be configured later). If the Finish button is disabled | |
Step 2: Entity Class and Persistence Unit.Serializable; import java.sql.Date; import javax. persistence .Entity; import javax. persistence .GeneratedValue; import javax. persistence .Id; @Entity public class Guest implements Serializable { private static final long serialVersionUID = 1L; // Persistent Fields: @Id @GeneratedValue Long id; private | |
Step 2: Entity Class and Persistence Unit java.io.Serializable; import java.sql.Date; import javax. persistence .Entity; import javax. persistence .GeneratedValue; import javax. persistence .Id; @Entity public class Guest implements Serializable { private static final long serialVersionUID = 1L; // Persistent Fields: @Id @GeneratedValue Long id | |
FieldRef jakarta.persistence.Persistence.PERSISTENCE_PROVIDER JPA Static Field in jakarta. persistence . Persistence PERSISTENCE _PROVIDER This final String is deprecated and should be removed and is only here for TCK backward compatibility Since: JPA 1.0 | |
Storing JPA Entity Objects New entity objects can be stored in the database either explicitly by invoking the persist method or implicitly as a result of a cascade operation. Explicit Persist The following code stores ... ", "Joseph", "Wurzelbacher"); em. getTransaction (). begin (); em. persist (employee); em. getTransaction | |
JPA Entity Fields Fields of persistable user defined classes (entity classes, embeddable classes and mapped superclasses) can be classified into the following five groups: Transient fields Persistent fields Inverse ... , persistent and inverse fields) can be used in both entity classes and embeddable classes . However, the last | |
ClassRef jakarta.persistence.Persistence JPA Class Persistence java.lang.Object ∟ jakarta. persistence . Persistence Bootstrap class ... generation to occur. The Persistence class is available in a Jakarta EE container environment as ... . The Persistence class is used to obtain a PersistenceUtil instance in both Jakarta EE and Java SE | |
Persistence.Persistence() - JPA Constructor JPA Constructor in jakarta. persistence . Persistence Persistence () Default constructor. Since: JPA 1.0 | |
EnumConstRef jakarta.persistence.CascadeType.PERSIST JPA Enum Constant in jakarta. persistence .CascadeType PERSIST Cascade the plain operation Since: JPA 1.0 | |
FieldRef jakarta.persistence.PersistenceConfiguration.VALIDATION_GROUP_PRE_PERSIST JPA Static Field in jakarta. persistence .PersistenceConfiguration VALIDATION_GROUP_PRE_ PERSIST Target groups for validation at PrePersist . Since: JPA 3.2 | |
Retrieving JPA Entity Objects The Java Persistence API (JPA) provides various ways to retrieve objects from the database ... of the database. The persistence context serves as a cache of retrieved entity objects. If a requested entity object is not found in the persistence context a new object is constructed and filled | |
Shared (L2) Entity Cache Every EntityManager owns a persistence context , which is a collection of all the entity objects that it manages. The persistence context serves as a first level cache. An attempt to retrieve ... the persistence context, rather than a newly instantiated entity object. The scope of the persistence | |
InterfaceRef jakarta.persistence.EntityManager with the persistence context. An instance of EntityManager must be obtained from an EntityManagerFactory , and is only able to manage persistence of entities belonging to the associated persistence unit ... closed via a call to () , to allow resources to be cleaned up by the persistence provider | |
JPA Class Enhancer of compiled classes after compilation. Enhancement is mainly for user-defined persistable classes ... . There is one case, however, where enhancement is required. Non persistable classes that access directly (not through methods) persistent fields of enhanced classes must also be enhanced. It is a good practice | |
Database Explorer of bookmarked entity objects. The [Schema] window shows the user defined persistable types (entity and embeddable classes) in the database and their persistent fields and indexes. The [Query] window enables ... a single object, every column represents a persistent field, and the content of a cell is the value | |
InterfaceRef jakarta.persistence.spi.PersistenceUnitInfo the persistence provider when creating an EntityManagerFactory . Since: JPA 1.0 Public Methods void ... classloading scope, regardless of how many persistence units they may be a part of. Parameters ... Since: JPA 1.0 boolean excludeUnlistedClasses () Returns whether classes in the root of the persistence | |
InterfaceRef jakarta.persistence.PersistenceUnitUtil the application and the persistence provider managing the persistence unit. The methods ... for this persistence unit or on new entity instances. Since: JPA 2.0 Public Methods Class getClass (T entity) Return the concrete entity class if the given entity belonging to the persistence unit | |
Database Connection using JPA Working with the Java Persistence API (JPA) consists of using the following interfaces: Overview ... a static factory method of the JPA bootstrap class, Persistence : EntityManagerFactory emf = Persistence . createEntityManagerFactory ("objectdb:myDbFile.odb"); Another form | |
InterfaceRef jakarta.persistence.EntityManagerFactory with the persistence unit, and to create new instances of EntityManager . A persistence unit defines ... , then they must belong to the same persistence unit. A persistence unit may be defined by a persistence .xml file, or it may be defined at runtime via the PersistenceConfiguration API. Every persistence unit | |
ClassRef jakarta.persistence.PersistenceConfiguration JPA Class PersistenceConfiguration java.lang.Object ∟ jakarta. persistence .PersistenceConfiguration Represents a configuration of a persistence unit, allowing programmatic creation ... elements of the persistence .xml file. This API may not be used to configure a container-managed | |
InterfaceRef jakarta.persistence.spi.PersistenceProvider JPA Interface PersistenceProvider Interface implemented by the persistence provider. It is invoked by the container in Jakarta EE environments and by the Persistence class in Java SE environments ... : info - metadata for use by the persistence provider map - a Map of integration-level properties | |
Working with JPA Entity Objects Entity objects are in-memory instances of entity classes ( persistable user defined classes ... the database. An entity object becomes Managed when it is persisted to the database via an EntityManager’s persist method, which must be invoked within an active transaction. On transaction commit | |
InterfaceRef jakarta.persistence.Query of entities updated or deleted Throws: IllegalStateException - if called for a Jakarta Persistence query ... - if there is no transaction or the persistence context has not been joined to the transaction QueryTimeoutException ... mode Throws: IllegalStateException - if the query is found not to be a Jakarta Persistence query | |
InterfaceRef jakarta.persistence.TypedQuery: IllegalStateException - if called for a Jakarta Persistence query language SELECT statement or for a criteria query TransactionRequiredException - if there is no transaction or the persistence context ... Throws: IllegalStateException - if the query is found not to be a Jakarta Persistence query language | |
InterfaceRef jakarta.persistence.StoredProcedureQuery: TransactionRequiredException - if there is no transaction or the persistence context has not been joined ... is found not to be a Jakarta Persistence query language SELECT query or a {@link jakarta. persistence .criteria.CriteriaQuery} query Inherited from: Query Since: JPA 2.0 int getMaxResults | |
Entity Management Settings" ) specifies whether the Enhancer Agent should be loaded to enhance persistable types on the fly ... . The possible values of the reflection attribute represent different policies: "error" - all persistable ... the reference type for holding non dirty entities in the persistence context of the EntityManager | |
AnnotationRef jakarta.persistence.PersistenceContext Expresses a dependency on a container-managed EntityManager and its associated persistence context ... for the container or persistence provider. Vendor specific properties may be included in this set ... whether the persistence context is always automatically synchronized with the current transaction or | |
EnumRef jakarta.persistence.FlushModeType JPA Enum FlushModeType java.lang.Object ∟ java.lang.Enum ∟ jakarta. persistence ... for the persistence context is AUTO (the default) and a flush mode setting has not been specified for the Query or TypedQuery object, the persistence provider is responsible for ensuring that all updates | |
AnnotationRef jakarta.persistence.Entity persistent instance variables. An enum, record, or interface may not be designated as an entity ... , mapped using the SecondaryTable annotation. An entity class holds state, represented as persistent ... optimistic lock failure. Fields or properties of an entity class are persistent by default. The Transient | |
InterfaceRef jakarta.persistence.SchemaManager belonging to a certain persistence unit. Properties are inherited from the EntityManagerFactory , that is, they may be specified via persistence .xml or (String, Map) . See Also: EntityManagerFactory ... objects mapped by entities belonging to the persistence unit. If a DDL operation fails, the behavior | |
EntityManager.persist(entity) - JPA Method JPA Method in jakarta. persistence .EntityManager void persist ( Object entity ) Make a new entity instance managed and persistent , resulting in its insertion in the database when the persistence context is synchronized with the database, or make a removed entity managed, undoing | |
AnnotationRef jakarta.persistence.OrderColumn a column that is used to maintain the persistent order of a list. The persistence provider is responsible for maintaining the order upon retrieval and in the database. The persistence provider ... for ordering that is visible as persistent state and maintained by the application. The OrderBy annotation | |
ClassRef jakarta.persistence.EntityExistsException.Exception ∟ java.lang.RuntimeException ∟ jakarta. persistence .PersistenceException ∟ jakarta. persistence .EntityExistsException Thrown by the persistence provider when EntityManager. persist is called and the entity already exists. The current transaction, if one is active | |
AnnotationRef jakarta.persistence.NamedQuery written in the Jakarta Persistence query language. Query names are scoped to the persistence unit ... of the definition of a named query written in the Jakarta Persistence query language: @NamedQuery( name = " ... and the persistence context joined to the transaction. Since: JPA 2.0 String name default null (Required | |
ClassRef jakarta.persistence.spi.PersistenceProviderResolverHolder JPA Class PersistenceProviderResolverHolder java.lang.Object ∟ jakarta. persistence .spi ... "jakarta. persistence .spi" logger to show diagnostic information. Implementations ... getPersistenceProviderResolver () Returns the current persistence provider resolver. Return: the current persistence | |
EnumRef jakarta.persistence.EnumType JPA Enum EnumType java.lang.Object ∟ java.lang.Enum ∟ jakarta. persistence .EnumType ... how a persistent property or field whose type is a Java enum type should be persisted . See Also: Enumerated EnumeratedValue Since: JPA 1.0 The JPA Persistable Types article explains how to use EnumType | |
AnnotationRef jakarta.persistence.Embeddable. A single embeddable type may be used as the type of multiple persistent fields or properties ... with no parameters, unless it is a record type, and have no final methods or persistent instance variables ... entity. The persistent fields and properties of an embeddable class are mapped using the same mapping | |
EnumRef jakarta.persistence.GenerationType JPA Enum GenerationType java.lang.Object ∟ java.lang.Enum ∟ jakarta. persistence ... Indicates that the persistence provider should pick an appropriate strategy for the particular ... IDENTITY Indicates that the persistence provider must assign primary keys for the entity using a database | |
EnumRef jakarta.persistence.PessimisticLockScope JPA Enum PessimisticLockScope java.lang.Object ∟ java.lang.Enum ∟ jakarta. persistence ... the values of the jakarta. persistence .lock.scope property for pessimistic locking. This property ... . persistence .lock.scope is specified with a value of PessimisticLockScope#EXTENDED . The state of entities | |
EnumRef jakarta.persistence.SynchronizationType JPA Enum SynchronizationType java.lang.Object ∟ java.lang.Enum ∟ jakarta. persistence .SynchronizationType Specifies whether the persistence context is always automatically synchronized with the current transaction or whether the persistence context must be explicitly joined | |
EnumRef jakarta.persistence.PersistenceContextType. persistence .PersistenceContextType Specifies whether a transaction-scoped or extended persistence context is to be used in PersistenceContext . If not specified, a transaction-scoped persistence context is used. Since: JPA 1.0 Enum Constants EXTENDED Extended persistence context Since: JPA 1.0 TRANSACTION | |
AnnotationRef jakarta.persistence.Basic of mapping of a persistent field or property to a single database column. The Basic annotation ... type, or any other plain type. The use of the Basic annotation is optional for persistent fields ... , the default values of the Basic annotation apply. The database column mapped by the persistent field | |
Persistence.createEntityManagerFactory(persistenceUnitName,properties) - JPA Static Method JPA Static Method in javax. persistence . Persistence EntityManagerFactory createEntityManagerFactory ... and return an EntityManagerFactory for the named persistence unit using the given properties. Parameters: persistenceUnitName the - name of the persistence unit properties Additional - properties to use | |
Persistence.createEntityManagerFactory(persistenceUnitName) - JPA Static Method JPA Static Method in jakarta. persistence . Persistence EntityManagerFactory ... for the named persistence unit. Parameters: persistenceUnitName - the name of the persistence unit Return: the factory that creates {@link EntityManager} s configured according to the specified persistence unit Since: JPA 1.0 | |
Persistence.createEntityManagerFactory(configuration) - JPA Static Method JPA Static Method in jakarta. persistence . Persistence EntityManagerFactory ... an EntityManagerFactory for the named persistence unit, using the given properties. Parameters: configuration - configuration of the persistence unit Return: the factory that creates {@link EntityManager} s configured | |
Persistence.createEntityManagerFactory(persistenceUnitName,properties) - JPA Static Method JPA Static Method in jakarta. persistence . Persistence EntityManagerFactory ... and return an EntityManagerFactory for the named persistence unit, using the given properties. Parameters: persistenceUnitName - the name of the persistence unit properties - additional properties |