ObjectDB Database Search

51-100 of 200 results

FROM clause (JPQL / Criteria API)

The FROM clause declares query identification variables for iterating over objects in the database ... that iterate over all the database objects of a specific entity class hierarchy, which includes ... the following query, c iterates over all the Country objects in the database : SELECT c FROM Country AS c

Managing JPA Entities

) that represent physical objects in the database . Managing an ObjectDB database with JPA requires using entities for many operations, including storing, retrieving, updating, and deleting database objects ... entity in the database . The Storing Entities section provides more details about storing objects

Storing JPA Entities

class instance. Only entity class instances can be stored in the database independently. Objects of other persistable types can be stored in the database only as embedded objects in containing ... stored in the database with its Address instance as an embedded object . Note that embedded objects

JPA Optimistic and Pessimistic Locking

at transaction commit. ObjectDB checks any database object that is being updated or deleted ... every database object that is being updated or deleted and compares the version number of that object in the database to the version number of the in-memory object being updated. If the version numbers do not

JPA Primary Key

cannot be modified and represents the entity for as long as it exists in the database . As an object database ... class. Using primary keys for object clustering Entities are physically stored in the database ... . This is especially true if there are many references to Event objects in the database , because references

Running JPA Queries

()) The following query retrieves all the Country objects in the database . Use the getResultList() method ... when exactly one result object is expected. Query.getResultList () : Use in any other case ... when exactly one result object is expected. TypedQuery.getResultList () : Use in any other case. In

SELECT clause (JPQL / Criteria API)

, including transparent navigation to other database objects , transparent update detection , support ... query returns Country objects , which then become managed by the EntityManager instance em : TypedQuery ... , the following query returns country names as String instances, rather than Country objects : SELECT

Defining a JPA Entity Class

To store Point objects in a database using JPA, you must define an entity class . A JPA entity ... that it can represent objects in the database . Conceptually, this is similar to serializable classes ... and retrieve Point objects from the database : package com.objectdb.tutorial; import jakarta

JPA Query Structure (JPQL / Criteria)

, which returns only field values from database tables. This makes JPQL more object -oriented ... values). A Minimal JPQL Query The following query retrieves all Country objects from the database ... query variable represents an iteration over objects in the database . A query variable that is bound

Deleting JPA Entities

You can delete existing entities from the database either explicitly by calling the remove method ... the database , you must first retrieve it. Then, within an active transaction, call the remove method ... ); em. getTransaction (). commit (); The entity is deleted from the database when the transaction

GROUP BY and HAVING clauses

. When a query includes a GROUP BY clause, the database objects (or tuples) that result from the FROM clause ... over all Country objects in the database . The GROUP BY clause groups these Country objects by the first ... of the resulting groups instead of individual objects and fields. In the query execution order

Detached JPA Entities

Detached entities are objects in a special state where they are not managed by an EntityManager but still represent objects in the database . Compared to managed entities, detached objects have limited functionality: Many JPA methods, for example, lock , do not accept detached objects . Retrieval by

JPA Persistable Types

can be stored in the database only as embedded objects , that is, as part of a containing entity. A class ... Persistable types are data types that can be used for storing data in the database . ObjectDB ... can be stored directly in the database . Other persistable types can be embedded in entity classes as

DELETE Queries in JPA/JPQL

to JPA, so you can use the following query to delete all objects in the database : DELETE FROM Object ... As explained in Chapter 2 , you can delete entities from the database by following these steps: Retrieve the entities into an EntityManager . Remove these objects from the EntityManager

JPA Lifecycle Events

). @PostPersist : Invoked after a new entity is stored in the database (during a commit or flush operation). @PostLoad : Invoked after an entity is retrieved from the database . @PreUpdate : Invoked ... is updated in the database (during a commit or flush operation). @PreRemove : Invoked when an entity

Paths and Types in JPQL and Criteria API

identification variable iterates over all the Country objects in the database . For a country with no capital ... in the database , excluding Country entities: SELECT COUNT(e) FROM Object e WHERE TYPE(e) Country ... as arguments. Path expressions that navigate from one object to another. Instances of user-defined

WHERE clause (JPQL / Criteria API)

for retrieving a specific subset of objects from the database . How a WHERE clause works The following query ... over all Country objects in the database , using c as the range variable. Before passing these Country objects ... that satisfy the WHERE predicate. For entity classes with millions of objects in the database

ObjectDB Overview

The ObjectDB Object Database ObjectDB is a powerful Object -Oriented Database Management ... Features 100% pure Java Object -Oriented Database Management System (ODBMS). No proprietary API ... , JBoss and Spring. See the  ObjectDB Object Database Features  for more details.

JPA Entity Fields

that don't participate in persistence, so their values are never stored in the database ... -persistent) fields and has no data to store in the database . Persistent fields Every non-static non ... the @Transient annotation). Storing an entity in the database stores only its persistent state, not

jakarta.persistence.PersistenceConfiguration.SCHEMAGEN_DATABASE_ACTION

Jakarta Persistence (JPA) Field in jakarta.persistence.PersistenceConfiguration SCHEMAGEN_ DATABASE _ACTION The action to be performed against the database . Standard actions are: none , create , drop , drop-and-create , validate . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.EntityManager

associated with a persistence context are considered managed objects , with a well-defined lifecycle ... , that is scheduled for removal from the database upon transaction commit. The EntityManager API is used ... that there is no explicit "update" operation; since an entity is a managed object , modifications

What is the Java Persistence API (JPA)?

(as classes and objects ). ObjectDB is the only database management system with built in support ... The Java Persistence API (JPA) is a standard API for accessing databases  from within Java applications. The main advantage of JPA over JDBC (the older Java API for interacting with databases

What is ObjectDB?

ObjectDB is an Object Oriented Database Management System (ODBMS). It provides all the standard database management services (storage and retrieval, transactions, lock management, query processing ... objects (and graphs of objects ) in an ObjectDB database directly. There's no need to define tables

jakarta.persistence.LockTimeoutException.LockTimeoutException(Object)

Jakarta Persistence (JPA) Constructor in jakarta.persistence.LockTimeoutException LockTimeoutException (    Object entity ) Constructs a new LockTimeoutException exception with the specified object . Parameters: entity - the entity. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.EntityManager.contains(Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager boolean contains (    Object entity ) Determine if the given object is a managed entity instance belonging to the current persistence context. Parameters: entity - entity instance Returns: boolean value indicating

jakarta.persistence.criteria.CriteriaBuilder.equal(Expression,Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Predicate equal (    Expression x ,    Object y ) Create a predicate for testing the arguments for equality. Parameters: x - expression y - object Returns: equality predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.notEqual(Expression,Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Predicate notEqual (    Expression x ,    Object y ) Create a predicate for testing the arguments for inequality. Parameters: x - expression y - object Returns: inequality predicate. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.Cache.evict(Class,Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.Cache void evict (    Class cls ,    Object primaryKey ) Remove the data for the given entity from the cache. Parameters: cls - entity class primaryKey - primary key Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.PersistenceConfiguration.property(String,Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.PersistenceConfiguration PersistenceConfiguration property (    String name ,    Object value ) Set a property of this persistence unit. Parameters: name - the property name value - the property value Returns: this configuration. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.PersistenceUnitUtil.isLoaded(Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.PersistenceUnitUtil boolean isLoaded (    Object entity ) Determine the load state of an entity belonging to the persistence unit. This method can be used to determine the load state of an entity passed as a reference. An entity

jakarta.persistence.PersistenceUnitUtil.isLoaded(Object,String)

Jakarta Persistence (JPA) Method in jakarta.persistence.PersistenceUnitUtil boolean isLoaded (    Object entity ,    String attributeName ) Determine the load state of a given persistent attribute of an entity belonging to the persistence unit. Parameters: attributeName - name

jakarta.persistence.TypedQuery.setParameter(String,Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.TypedQuery TypedQuery setParameter (    String name ,    Object value ) Bind an argument value to a named parameter. Parameters: name - parameter name value - parameter value Returns: the same query instance. Throws

jakarta.persistence.TypedQuery.setParameter(int,Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.TypedQuery TypedQuery setParameter (    int position ,    Object value ) Bind an argument value to a positional parameter. Parameters: position - position value - parameter value Returns: the same query instance. Throws

jakarta.persistence.OptimisticLockException.OptimisticLockException(Object)

Jakarta Persistence (JPA) Constructor in jakarta.persistence.OptimisticLockException OptimisticLockException (    Object entity ) Constructs a new OptimisticLockException exception with the specified entity. Parameters: entity - the entity. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.StoredProcedureQuery.setParameter(int,Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.StoredProcedureQuery StoredProcedureQuery setParameter (    int position ,    Object value ) Bind an argument value to a positional parameter. Parameters: position - position value - parameter value Returns: the same query

jakarta.persistence.StoredProcedureQuery.setParameter(String,Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.StoredProcedureQuery StoredProcedureQuery setParameter (    String name ,    Object value ) Bind an argument value to a named parameter. Parameters: name - parameter name value - parameter value Returns: the same query

jakarta.persistence.OptimisticLockException.OptimisticLockException(String,Throwable,Object)

Jakarta Persistence (JPA) Constructor in jakarta.persistence.OptimisticLockException OptimisticLockException (    String message ,    Throwable cause ,    Object entity ) Constructs a new OptimisticLockException exception with the specified detail message, cause

jakarta.persistence.PessimisticLockException.PessimisticLockException(Object)

Jakarta Persistence (JPA) Constructor in jakarta.persistence.PessimisticLockException PessimisticLockException (    Object entity ) Constructs a new PessimisticLockException exception with the specified entity. Parameters: entity - the entity. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.PessimisticLockException.PessimisticLockException(String,Throwable,Object)

Jakarta Persistence (JPA) Constructor in jakarta.persistence.PessimisticLockException PessimisticLockException (    String message ,    Throwable cause ,    Object entity ) Constructs a new PessimisticLockException exception with the specified detail message, cause

jakarta.persistence.LockTimeoutException.LockTimeoutException(String,Throwable,Object)

Jakarta Persistence (JPA) Constructor in jakarta.persistence.LockTimeoutException LockTimeoutException (    String message ,    Throwable cause ,    Object entity ) Constructs a new LockTimeoutException exception with the specified detail message, cause, and entity

jakarta.persistence.EntityManager.getLockMode(Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager LockModeType getLockMode (    Object entity ) Get the current lock mode held by this persistence context on the given managed entity instance. Parameters: entity - a managed entity instance Returns: the lock mode

jakarta.persistence.EntityManager.setProperty(String,Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager void setProperty (    String propertyName ,    Object value ) Set an entity manager property or hint. If a vendor-specific property or hint is not recognized, it is silently ignored. Parameters: propertyName

jakarta.persistence.Persistence.PersistenceUtilImpl.isLoaded(Object,String)

Jakarta Persistence (JPA) Method in jakarta.persistence.Persistence.PersistenceUtilImpl boolean isLoaded (    Object entity ,    String attributeName ) Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.Persistence.PersistenceUtilImpl.isLoaded(Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.Persistence.PersistenceUtilImpl boolean isLoaded (    Object entity ) Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaUpdate.set(String,Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaUpdate CriteriaUpdate set (    String attributeName ,    Object value ) Update the value of the specified attribute. Parameters: attributeName - name of the attribute to be updated value - new value

jakarta.persistence.EntityManager.find(Class,Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T find (    Class entityClass ,    Object primaryKey ) Find by primary key. Search for an entity of the specified class and primary key. If the entity instance is contained in the persistence context

jakarta.persistence.criteria.Expression.notEqualTo(Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.Expression Predicate notEqualTo (    Object value ) Create a predicate to test whether the expression is unequal to the argument. Parameters: value - value to be tested against Returns: predicate testing for inequality. Since: Jakarta Persistence (JPA) 3.2

[ODB1] Chapter 7 - JDOQL Queries

There are various ways to retrieve objects from an ObjectDB database , as shown in section 6.3 ... SQL for RDBMS. It provides object retrieval from the database according to a specified selectioPlan ... . If the query compilation succeeds, the Extent of Person instances in the database is iterated object by

Which API should I use - JPA or JDO?

databases is more important than general portability to both object and relational databases . JPA is designated to be used mainly with relational databases . ObjectDB is the only object database ... databases and it is probably the most popular Java API for object databases today.

ObjectDB 1.0 Manual

Welcome to the ObjectDB for Java/JDO Developer's Guide. Here you can learn how to develop database applications using ObjectDB and JDO (Java Data Objects ), the revolutionary database programming ... and delete database objects . Chapter 7 - JDOQL Queries Describes JDOQL, the JDO Query Language. The last