ObjectDB Database Search

51-100 of 200 results

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

Jakarta Persistence (JPA) Method in jakarta.persistence.Query Query 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.EntityManager.find(Class,Object,Map)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T find (    Class entityClass ,    Object primaryKey ,    Map properties ) Find by primary key, using the specified properties. Search for an entity of the specified class and primary key

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

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T find (    Class entityClass ,    Object primaryKey ,    LockModeType lockMode ) Find by primary key and obtain the given lock type for the resulting entity. Search for an entity of the specified

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

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T find (    Class entityClass ,    Object primaryKey ,    LockModeType lockMode ,    Map properties ) Find by primary key and lock the entity, using the specified properties. Search

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

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

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

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T find (    Class entityClass ,    Object primaryKey ,    FindOption... options ) Find an instance of the given entity class by primary key, using the specified options . Search for an entity

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

Jakarta Persistence (JPA) Method in jakarta.persistence.PersistenceUtil boolean isLoaded (    Object entity ,    String attributeName ) Determine the load state of a given persistent attribute. Parameters: attributeName - name of attribute whose load state is to be determined

jakarta.persistence.PersistenceUtil.isLoaded(Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.PersistenceUtil boolean isLoaded (    Object entity ) Determine the load state of an entity. This method can be used to determine the load state of an entity passed as a reference. An entity is considered loaded if all attributes

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

Jakarta Persistence (JPA) Method in jakarta.persistence.Query Query 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.Query.setHint(String,Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.Query Query setHint (    String hintName ,    Object value ) Set a query property or hint. The hints elements may be used to specify query properties and hints. Properties defined by this specification must be observed by

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

Jakarta Persistence (JPA) Method in jakarta.persistence.Cache boolean contains (    Class cls ,    Object primaryKey ) Whether the cache contains data for the given entity. Parameters: cls - entity class primaryKey - primary key Returns: boolean indicating whether the entity is in the cache. Since: Jakarta Persistence (JPA) 1.0

Retrieving JPA Entities

Jakarta Persistence (JPA) provides various ways to retrieve objects from the database. Retrieving objects does not require an active transaction because it does not change the database content ... the persistence context, JPA constructs a new object and populates it with data from the database or

Database Explorer

the approach of traditional visual database tools. Each row represents an object , each column represents a persistent field, and each cell contains the value of a field for a specific object . This type of viewer is useful for viewing data in a simple object model. In most cases, the Tree window

FROM clause (JPQL / Criteria API)

The FROM clause declares query identification variables for iterating over objects in the database ... because both are used to iterate over objects . Range variables Range variables are query identification variables that iterate over all the database objects of a specific entity class hierarchy, which includes

SELECT clause (JPQL / Criteria API)

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

Running JPA Queries

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 ... ()) The following query retrieves all the Country objects in the database. Use the getResultList() method

GROUP BY and HAVING clauses

of the resulting groups instead of individual objects and fields. In the query execution order ... . 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

Storing JPA Entities

. getTransaction (). commit (); The Employee instance is constructed as an ordinary Java object , and its initial state is New. An explicit call to persist associates the object with an owner EntityManager , em ... class instance. Only entity class instances can be stored in the database independently. Objects

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

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 ... . When an entity is first created, its state is New . In this state, the object is not yet associated

JPA Optimistic and Pessimistic Locking

at transaction commit. ObjectDB checks any database object that is being updated or deleted. An exception is thrown if the check finds that another transaction has already updated the object ... objects are locked during the transaction, and any lock conflicts are detected immediately

Paths and Types in JPQL and Criteria API

as arguments. Path expressions that navigate from one object to another. Instances of user-defined ... fields to other objects and values. For example, in the expression c.capital , c represents a Country ... identification variable iterates over all the Country objects in the database. For a country with no capital

Defining a JPA Entity Class

To store Point objects in a database using JPA, you must define an entity class . A JPA entity class is a POJO (Plain Old Java Object ), an ordinary Java class that is marked (annotated) to indicate that it can represent objects in the database. Conceptually, this is similar to serializable classes

Deleting JPA Entities

is committed. Any embedded objects that the entity contains are also deleted. If the transaction is rolled back, the object is not deleted. The remove method throws an IllegalArgumentException ... that the Address object references. Orphan removal JPA supports a more aggressive cascading removal mode

JPA Primary Key

cannot be modified and represents the entity for as long as it exists in the database. As an object database, ObjectDB supports implicit object IDs, so an explicit primary key is not required. However, ObjectDB ... , and automatic sequential value generation . This powerful feature is absent from many other object -oriented

JPA Lifecycle Events

( Object o) {} @PostPersist void onPostPersist( Object o) {} @PostLoad void onPostLoad( Object o) {} @PreUpdate void onPreUpdate( Object o) {} @PostUpdate void onPostUpdate( Object o) {} @PreRemove void onPreRemove( Object o) {} @PostRemove void onPostRemove( Object o) {} } External callback methods

JPA Query Structure (JPQL / Criteria)

operates on Java classes and objects . For example, a JPQL query can retrieve entities, unlike SQL, 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

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 ... expression in the WHERE clause, also known as the predicate, determines which objects to accept

Apache License, Version 2.0, January 2004

to software source code, documentation source, and configuration files. " Object " form shall mean any form ... to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as

What is ObjectDB?

ObjectDB is an Object Oriented Database Management System (ODBMS). It provides all the standard ... , etc.), but it uses an object oriented model to store and manage data. You can easily store ordinary objects (and graphs of objects ) in an ObjectDB database directly. There's no need to define tables

DELETE Queries in JPA/JPQL

: Retrieve the entities into an EntityManager . Remove these objects from the EntityManager ... + an optional variable ObjectDB supports using the java.lang. Object class in queries as an extension to JPA, so you can use the following query to delete all objects in the database: DELETE FROM Object

JPA Query API

is Object . When a more specific result type is expected, use the TypedQuery interface. The TypedQuery ... and TypedQuery objects : Query q1 = em. createQuery ("SELECT c FROM Country c"); TypedQuery q2 = em. createQuery ... , which retrieves all Country objects from the database, is represented by both q1 and q2 . When you build

Query Parameters in JPA

a Country object from the database by its name: public Country getCountryByName( EntityManager em ... filters the query results to Country objects whose name field is equal to :name . The :name identifier ... , parameters and other query elements are represented by objects (of type ParameterExpression or

JPA Queries

with full type safety. General query objects Execute SELECT, UPDATE and DELETE queries in JPA using ... EntityManager  methods such as createQuery to build  query objects using: Direct JPQL query strings ("SELECT ... FROM ... WHERE ..."); or Criteria query objects , as described below. For detailed usage

What is the Java Persistence API (JPA)?

) is that in JPA data is represented by classes and objects rather than by tables and records as in JDBC. Using plain old Java objects (POJO) to represent persistent data can significantly simplify ... . These implementations are Object Relational Mapping (ORM) tools. The mapping bridges between the data

What are the main benefits of using ObjectDB?

. The ability to store ordinary objects in the database directly can simplify the code significantly ... ObjectDB is especially designed to store and manage graphs of objects efficiently. That can accelerate the execution time of object oriented applications significantly. For instance, collection and map

CRUD Database Operations with JPA

, you can use it to store, retrieve, update, and delete objects . Storing new entities The following code fragment stores 1,000 Point objects in the database: em. getTransaction (). begin (); for (int i = 0 ... } } em. getTransaction (). commit (); In the preceding example, all the Point objects whose x coordinate

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.

jakarta.persistence.EntityManager

associated with a persistence context are considered managed objects , with a well-defined lifecycle ... that there is no explicit "update" operation; since an entity is a managed object , modifications ... contains ( Object entity ) Determine if the given object is a managed entity instance belonging

jakarta.persistence.criteria.CriteriaBuilder

( Class targetEntity ) Create a CriteriaDelete query object to perform a bulk delete operation. Parameters: targetEntity - target type for delete operation Returns: the query object . Since: Jakarta ... query object to perform a bulk update operation. Parameters: targetEntity - target type for update

jakarta.persistence.StoredProcedureQuery

and getSingleResult are called on a StoredProcedureQuery object , the provider calls execute ... is called on a StoredProcedureQuery object , the provider will call execute on an unexecuted stored ... of the first result the query object was set to retrieve. Returns 0 if setFirstResult was not

Setting and Tuning of JPA Queries

because the setter methods in Query and TypedQuery support method chaining by returning the query object ... to all result objects that the query retrieves. For example, the following code sets a pessimistic WRITE lock on all the result objects : List results = query. setLockMode ( LockModeType . PESSIMISTIC_WRITE

JPA Named Queries

" that retrieves all Country objects from the database: @NamedQuery ( name ="Country.findAll", query ... of named queries. However, because mapping files are mainly useful for Object -Relational Mapping (ORM ... all the managed classes that it is aware of, which includes all entity classes that have objects in

JPA Metamodel and Graphs

object model at runtime. It allows developers to programmatically examine entities, embeddables ... integration Integrate metamodel objects with the Criteria API using the following interface: Represents objects that can be bound to a Path in a Criteria query, mainly to define FROM variables

Database Schema Evolution

happens automatically in memory each time the entity is loaded. The object in the database is updated ... , as long as the elements are convertible (for example, from int[] to ArrayList ). From any object to any collection or array that can contain that object as an element. From any map type to any

Can I use ObjectDB to access a relational database?

To access relational databases using the Java Persistence API (JPA) you will need an Object ... . The DataNucleus ORM implementation supports also the Java Data Objects (JDO) API. ObjectDB is a full featured standalone Object Database Management System (ODBMS) and not an ORM tool, so it is not intended and cannot be used to access other database management systems.

Eclipse Public License - v 1.0

, if any, and such derivative works, in source code and object code form. b) Subject to the terms ... the Contribution of such Contributor, if any, in source code and object code form. This patent ... to distribute the Program in object code form under its own license agreement, provided that: a) it complies

Comparison in JPQL and Criteria API

rather than object identity. Data and Time values: Any comparison operator can be used ... rather than object identity. boolean and Boolean values: Can be compared using the equality operators ... . For embeddable objects , e1 = e2 is true if e1 and e2 have the same content. ObjectDB supports comparisons

Step 2: Define a JPA Entity Class

To store objects in an ObjectDB database using JPA we need to define an entity class: Open ... to create the new class. The new class should represent Guest objects in the database. Use copy ... ; The new class should represent Guest objects in the database. Besides the @Entity annotation

Which API should I use - JPA or JDO?

You can use ObjectDB with either the Java Persistence API (JPA) or the Java Data Objects (JDO) API ... , tutorials and sample code. When to prefer JDO JDO might be preferred when portability to other object databases is more important than general portability to both object and relational databases. JPA