ObjectDB ObjectDB

Internal Website Search

121-130 of 200 resultsRefresh
8

JPA Entity Fields

fields (including persistent fields that are inherited from ancestor classes), is stored ... . Instead, employees is automatically populated when a Department entity is retrieved from ... the Department entity): SELECT e FROM Employee e WHERE e.department = :d The mappedBy element defines
8

Query Parameters in JPA

) The following method retrieves a Country object from the database by its name: public Country ... ( "SELECT c FROM Country c WHERE c.name = :name", Country.class); return query.setParameter ... .createQuery( "SELECT c FROM Country c WHERE c.name = ?1", Country.class); return query
8

JPA Criteria API Queries

Criteria Query The following query string represents a minimal JPQL query: SELECT c FROM Country c ... > c = q.from(Country.class); q.select(c); The CriteriaBuilder interface serves as the main ... the built query. Then a Root instance is created to define a range variable in the FROM clause. Finally
8

Deleting JPA Entity Objects

Existing entity objects can be deleted from the database either explicitly by invoking the remove ... from the database it has to first be retrieved (no matter which way) and then in an active ... (); The entity object is physically deleted from the database when the transaction is committed. Embedded
8

Running JPA Queries

: TypedQuery<Country> query = em.createQuery("SELECT c FROM Country c", Country.class); List ... (generic) type: Query query = em.createQuery("SELECT c FROM Country c"); List results = query ... has to be extracted from the result collection after query execution (e.g. by results.get(0)). To eliminate
8

Updating JPA Entity Objects

Once an entity object is retrieved from the database (no matter which way) it can simply be modified in memory from inside an active transaction: Employee employee = em.find(Employee.class, 1); em ... can be cascaded from all the entity objects that have to be stored in the database, including from
1

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 ... of Point objects in the database: Query q1 = em.createQuery("SELECT COUNT(p) FROM Point p ... value: Query q2 = em.createQuery("SELECT AVG(p.x) FROM Point p
0

javax.jdo.PersistenceManager

to manage the life cycle of PersistenceCapable instances. A PersistenceManager is obtained from ... .0 void deletePersistent(Object pc) Delete the persistent instance from the data store. Delete the persistent instance from the data store. This method must be called in an active transaction
0

[ODB1] Chapter 4 - JDO Metadata

from classes B and C are stored. The closest persistent super class in the inheritance hierarchy ... . When a persistent object is retrieved from the database its fields are not ready yet. Only when the program accesses a field is the field value loaded automatically by ObjectDB from the database. If the field
0

[ODB1] Chapter 2 - A Quick Tour

ArrayList list; 18 try { 19 // Retrieve the list from the database by ... is expected to be retrieved from the database by its name "Hello World" using the getObjectById ... retrieved from the database is always persistent. A new object becomes persistent when it is bound

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support