Home » Search

About persistence

1-10 of 200Refresh
Manual
151

JPA 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
Tutorial
147

Step 2: Entity Class and Persistence Unit

) and selecting New > Entity Class... (or New > Other... > Persistence > Entity Class and clicking ... 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
Tutorial
147

Step 2: Entity Class and Persistence Unit

) and selecting New > Entity Class... (or New > Other... > Persistence > Entity Class and clicking ... 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
Tutorial
146

Step 2: Entity Class and Persistence Unit

.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
Tutorial
146

Step 2: Entity Class and Persistence Unit

.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; @Entity ... ; // Persistent Fields: @Id @GeneratedValue Long id; private String name ... guests in the database. We also need to configure JPA by setting a META-INF/persistence.xml file
Manual
132

JPA Persistable Types

The term persistable types refers to data types that can be used in 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. In
FAQ
122

What is the Java Persistence API (JPA)?

The Java Persistence API (JPA) is a standard API for accessing databases from within Java ... . Using plain old Java objects (POJO) to represent persistent data can significantly simplify database ... Persistence API (JPA). By interacting with ObjectDB using standard JPA you can keep your application
Manual
57

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
Manual
51

Entity Management Settings

" />   <persist serialization="false" /> persist always="auto" on-persist="false" on-commit="true" /> persistable types on the fly
Manual
47

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("myDbFile.odb"); Another form