Internal Website Search

11-20 of 200 resultsRefresh

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

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

javax.persistence.Persistence.PERSISTENCE_PROVIDER

JPA Static Field in javax. 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

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

JPA / JDO 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

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

[ODB1] Chapter 2 - A Quick Tour

.getPersistenceManager("hello.odb"); 14 pm.currentTransaction().begin(); 15 16 // Obtain a persistent list: 17 ... } 27 28 // Add a new string to the persistent list: 29 list.add("Hello World " + list.size()); 30 31 // Display the content of the persistent list: 32 Iterator itr = list.iterator(); 33 while (itr

[ODB1] Chapter 9 - ObjectDB Explorer

is open. The "Class" window shows all the persistent classes in the database. You can select a class from the list of classes at the top of this window and see all its persistent fields ... represents a persistent field, and the content of a cell is the value of a single field in a single