ObjectDB Database Search
51-100 of 200 resultsjakarta.persistence.EntityManager.remove(Object) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager void remove ( Object entity ) Mark a managed entity instance as removed, resulting in its deletion from the database when the persistence context is synchronized with the database. This operation cascades | |
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.EntityManager.find(EntityGraph,Object,FindOption...) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T find ( EntityGraph entityGraph , Object primaryKey , FindOption... options ) Find an instance of the root entity of the given EntityGraph by primary key, using the specified options | |
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 | |
jakarta.persistence.EntityManager.getReference(Class,Object) Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T getReference ( Class entityClass , Object primaryKey ) Obtain a reference to an instance of the given entity class with the given primary key, whose state may be lazily fetched. If the requested | |
jakarta.persistence.criteria.Expression.in(Object...) Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.Expression Predicate in ( Object ... values ) Create a predicate to test whether the expression is a member of the argument list. Parameters: values - values to be tested against Returns: predicate testing for membership. Since: Jakarta Persistence (JPA) 1.0 | |
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 | |
Database Explorer of bookmarked entity objects . The [Schema] window shows the user defined persistable types (entity ... a single object , every column represents a persistent field, and the content of a cell is the value of a single field in a single database object . This type of viewer is useful for viewing data | |
SELECT clause (JPQL / Criteria API) The ability to retrieve managed entity objects is a major advantage of JPQL. For example, the following query returns Country objects that become managed by the EntityManager em : TypedQuery query ... (); Because the results are managed entity objects they have all the support that JPA provides | |
JPA Primary Key Every entity object that is stored in the database has a primary key. Once assigned, the primary key cannot be modified. It represents the entity object as long as it exists in the database. As an object database, ObjectDB supports implicit object IDs, so an explicitly defined primary key is not | |
Locking in JPA in ObjectDB (and in JPA) is always at the database object level, i.e. each database object is locked separately. Optimistic locking is applied on transaction commit. Any database object ... is being performed on an old version of a database object , for which another update has already been committed | |
FROM clause (JPQL / Criteria API) The FROM clause declares query identification variables that represent iteration over objects in ... a program, since both are used for iteration over objects . Range Variables Range variables are query identification variables that iterate over all the database objects of a specific entity | |
GROUP BY and HAVING clauses properties of generated groups instead of individual objects and fields. The position of a GROUP BY ... clause. When a GROUP BY clause exists in a JPQL query, database objects (or tuples of database objects ... over all the Country objects in the database. The GROUP BY clause groups these Country objects by | |
Running JPA Queries - for use when exactly one result object is expected. Query.getResultList - for general use in any ... .getSingleResult - for use when exactly one result object is expected. TypedQuery.getResultList ... Query Execution (with getResultList) The following query retrieves all the Country objects in | |
Shared (L2) Entity Cache Every EntityManager owns a persistence context , which is a collection of all the entity objects ... an entity object that is already managed by the EntityManager returns the existing instance from the persistence context, rather than a newly instantiated entity object . The scope of the persistence | |
Paths and Types in JPQL and Criteria API are assigned as arguments. Path expressions that navigate from one object to another. Instances of user ... expression) and uses the dot ( . ) operator to navigate through persistent fields to other objects and values. For example - c.capital , where c represents a Country entity object uses the capital | |
JPA Entity Fields the @Transient annotation). Storing an entity object in the database does not store methods or code. Only the persistent state of the entity object , as reflected by its persistent fields (including persistent fields that are inherited from ancestor classes), is stored. When an entity object is stored in | |
DELETE Queries in JPA/JPQL As explained in chapter 2 , entity objects can be deleted from the database by: Retrieving the entity objects into an EntityManager . Removing these objects from the EntityManager   ... DELETE queries provide an alternative way for deleting entity objects . Unlike SELECT queries | |
Defining a JPA Entity Class To be able to store Point objects in the database using JPA we need to define an entity class . A JPA entity class is a POJO (Plain Old Java Object ) class, i.e. an ordinary Java class that is marked (annotated) as having the ability to represent objects in the database. Conceptually | |
Database Schema Evolution of an entity class are detected by ObjectDB. New entity objects have to be stored in the new class schema, and old entity objects , which were stored previously in the old class schema ... that enables transparent use of old entity objects after schema change. When an entity object | |
JPA Lifecycle Events objects of the subclasses unless that callback method is overridden by the subclass. Implementation ... methods and should not access any other entity objects . If a callback method throws an exception ... onPrePersist( Object o) {} @PostPersist void onPostPersist( Object o) {} @PostLoad void onPostLoad( Object o | |
UPDATE SET Queries in JPA/JPQL Existing entity objects can be updated, as explained in chapter 2 , by: Retrieving the entity objects into an EntityManager . Updating the relevant entity object fields  ... provide an alternative way of updating entity objects . Unlike SELECT queries, which are used | |
JPA Query Structure (JPQL / Criteria) classes and objects . For example, a JPQL query can retrieve and return entity objects rather than just field values from database tables, as with SQL. That makes JPQL more object oriented friendly ... Query The following query retrieves all the Country objects in the database: SELECT c FROM Country | |
WHERE clause (JPQL / Criteria API) JPQL query that retrieves selective objects from the database. Out of the four optional clauses ... over all the Country objects in the database using the c range variable. Before passing these Country objects to the SELECT clause for collecting as query results, the WHERE clause gets an opportunity | |
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 | |
Setting and Tuning of JPA Queries in Query and TypedQuery support method chaining (by returning the query object ... automatic optimistic locking to prevent concurrent changes to entity objects by multiple users. JPA 2 ... on all the result objects that the query retrieves. For example, the following query execution sets | |
Index Definition Querying without indexes requires iteration over entity objects in the database one by one. This may take a significant amount of time if many entity objects have to be examined. Using proper indexes the iteration can be avoided and complex queries over millions of objects can be executed quickly | |
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 | |
Query Parameters in JPA) The following method retrieves a Country object from the database by its name: public Country ... ). getSingleResult (); } The WHERE clause reduces the query results to Country objects whose name field value ... that is built by using the JPA Criteria API - parameters (as other query elements) are represented by objects | |
CRUD Database Operations with JPA Given an EntityManager , em , that represents a JPA connection to the object database, we can use it to store, retrieve, update and delete database objects . Storing New Entity Objects The following code fragment stores 1,000 Point objects in the database: em. getTransaction (). begin | |
JPA Exceptions JPA exceptions are represented by a hierarchy of unchecked exceptions: java.lang. Object java.lang ... because of an attempt to store a new entity object with a primary key that is already in use by another existing entity object , the nested exception is: Other common causes for RollbackException are lock failures | |
JPA Persistable Types class can only be stored in the database as embedded objects , i.e. as part of a containing entity object . A class is declared as embeddable by marking it with the Embeddable annotation: @Embeddable ... ;String zip; } Instances of embeddable classes are always embedded in other entity objects and do not | |
Auto Generated Values number generator for every database. This number generator is used to generate automatic object IDs for entity objects with no primary key fields defined (as explained in the previous section ). The same ... for every new entity object . These generated values are unique at the database level and are never recycled | |
JPA Query API results and the lowest known common denominator of all the result objects is Object ... which retrieves all the Country objects in the database is represented by both q1 and q2 . When building ... objects ), a TypedQuery is preferred. There is another advantage of using TypedQuery in | |
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 | |
ORDER BY clause (JPQL / Criteria API) produces objects for examination and the WHERE clause selects which objects to collect as results ... Country objects ordered by currency as the primary sort key and by name as the secondary sort key ... receives groups rather than individual objects and ORDER BY can order these groups. For example: SELECT c | |
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 | |
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 |