ObjectDB Database Search

51-100 of 200 results

Delete object from collection versus delete from JPQL

Delete object from collection versus delete from JPQL

jakarta.persistence.criteria.CollectionJoin

: PluralJoin , Join , From , Path , FetchParent , Expression , Selection , TupleElement The CollectionJoin ... cannot be changed or reassigned. Returns the same selection item. Inherited from Selection ... : may result in a runtime failure. Inherited from Expression Parameters: type - intended type

jakarta.persistence.criteria.ListJoin

, From , Path , FetchParent , Expression , Selection , TupleElement The ListJoin interface is the type ... reassigned. Returns the same selection item. Inherited from Selection Parameters: name - alias Returns ... . Inherited from Expression Parameters: type - intended type of the expression Returns: new

JPA Persistable Types

only once, even if they are referenced multiple times. Referencing instances of other persistable types from ... can be. In most cases, ObjectDB can manage a missing no-argument constructor. Aside from these constraints ... and double . Equivalent wrapper classes from package java.lang: Boolean , Byte , Short , Character

Privacy Policy

the use of the Service or from the Service infrastructure itself (for example, the duration of a page visit and user actions during page views). Website  refers to ObjectDB Website, accessible from ... where the data protection laws may differ than those from Your jurisdiction. Your consent to this Privacy

jakarta.persistence.criteria.Join

: - the source type of the join - the target type of the join Super Interfaces: From , Path , FetchParent ... Persistence (JPA) 2.0 The FROM clause (JPQL / Criteria API) article explains how to use Join . Public ... , an alias cannot be changed or reassigned. Returns the same selection item. Inherited from

jakarta.persistence.criteria.Root

: - the entity type referenced by the root Super Interfaces: From , Path , FetchParent , Expression , Selection , TupleElement A root type in the from clause. Query roots always reference entities. Since: Jakarta Persistence (JPA) 2.0 The FROM clause (JPQL / Criteria API) article explains how to use Root

JPA Entity Fields

its methods or code. This state is reflected by its persistent fields, including fields inherited from ... when a Department entity is retrieved from the database. ObjectDB accomplishes this by effectively running the following query, where :d represents the Department entity: SELECT e FROM Employee e WHERE e.department

JPA Shared (L2) Entity Cache

that the EntityManager already manages returns the existing instance from the persistence context, not a newly ... from its superclass. Using the shared cache When enabled, the shared cache automatically provides ... the persistence context. If an entity is not in the shared cache, it is retrieved from the database

Query Parameters in JPA

a Country object from the database by its name: public Country getCountryByName( EntityManager em, String name) { TypedQuery query = em. createQuery ( "SELECT c FROM Country c WHERE c.name = :name ... is inferred from the context. In the preceding example, comparing :name to a field of type String

Deleting JPA Entities

You can delete existing entities from the database either explicitly by calling the remove method or implicitly as a result of a cascade operation. Explicit remove To delete an entity from ... ); em. getTransaction (). commit (); The entity is deleted from the database when the transaction

Running JPA Queries

to run this query, as it can return multiple objects: TypedQuery query = em. createQuery ("SELECT c FROM ... . createQuery ("SELECT c FROM Country c"); List results = query. getResultList (); Casting ... result object. However, you must then extract the object from the result collection, for example, by

Database Explorer

of your ObjectDB installation. It depends on the objectdb.jar file. You can run it from the command ... databases from the File Recent Connections menu. By default, the Explorer automatically tries ... , specify a name, and click OK . You can access bookmarked entities from the Database window

JPA Primary Key

, and automatic sequential value generation . This powerful feature is absent from many other object-oriented ... are not recycled when entities are deleted from the database. You can access an entity's primary key ... , int , long , float , and double . Equivalent wrapper classes from the java.lang package: Byte

Index Definition

, long , float , double Equivalent wrapper classes from the java.lang package: Byte , Short , Character ... -tree keys are all the unique values from the indexed field (or arrays of values for composite indexes ... FROM Point p WHERE p.x = 100 SELECT p FROM Point p WHERE p.x BETWEEN 50 AND 80 SELECT p FROM Point p

JPA Class Enhancer

.jar file. You can run it from the command line as follows: $ java -cp objectdb.jar com.objectdb ... on Unix/Linux) from the ObjectDB bin directory. To use that script, you must edit the paths ... " The "*.class" expression is enclosed in quotes to prevent the shell from expanding the wildcard. The output

JPA Named Queries

strings from Java code. This practice also enforces the use of query parameters instead of embedding ... " that retrieves all Country objects from the database: @NamedQuery ( name ="Country.findAll", query ="SELECT c FROM Country c") The @NamedQuery annotation has four elements: two required

Eclipse Public License - v 1.0

additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or ... , such as lost profits; iii) states that any provisions which differ from this Agreement are offered

ObjectDB Object Database Features

, derived attributes, grouping queries and aggregate queries) which are usually missing from Object Oriented ... can manage databases of various sizes efficiently, ranging from kilobytes to terabytes . Platform ... from failure by using a  recovery file and double writing. Additional recovery layer

JPA Lifecycle Events

). @PostLoad : Invoked after an entity is retrieved from the database. @PreUpdate : Invoked ... is marked for removal (when remove() is called). @PostRemove : Invoked after an entity is deleted from ... unit definition in persistence.xml . To exclude an entity class and its subclasses from using

Apache License, Version 2.0, January 2004

resulting from mechanical transformation or translation of a Source form, including but not limited ... , that is based on (or derived from ) the Work and for which the editorial revisions, annotations ... . For the purposes of this License, Derivative Works shall not include works that remain separable from , or merely

Managing JPA Entities

. Entities that an EntityManager retrieves from the database are also in the Managed state. The Retrieving ... the EntityManager 's remove method within an active transaction. The entity's state changes from Managed to Removed , and the object is physically deleted from the database when the transaction is committed

Database Management Settings

can improve performance by reducing file fragmentation that can result from frequent resize operations ... than the number of available CPU cores but not so large that it causes performance degradation from ... . Activation codes are generated by running the Activator utility from the command line: $ java -cp objectdb

Setting and Tuning of JPA Queries

method specifies the starting point of the result window by defining how many results to skip from ... the page number (starting from 0 for the first page), the following code retrieves the results ... the cache. Setting query hints (Scopes) You can set query hints in the following scopes, from

Server User List

to connect to the server only from the specified IP addresses. For example, "127.0.0.1" (the local computer ... of "192.18.0.0-192.18.194.255,127.0.0.1" allows connections from any IP address in the range 192.18.0.0 - 192.18.194.255 and from 127.0.0.1 . The admin attribute, with a value of true or false , specifies

jakarta.persistence.metamodel.EntityType

that corresponds to the specified name. Inherited from ManagedType Parameters: name - the name ... getAttributes () Return the attributes of the managed type. Inherited from ManagedType Returns: attributes ... of the represented entity or attribute is returned. Inherited from Bindable Returns: Java type

jakarta.persistence.metamodel.MappedSuperclassType

the attribute of the managed type that corresponds to the specified name. Inherited from ManagedType ... from ManagedType Returns: attributes of the managed type. Since: Jakarta Persistence (JPA) 1.0 ... attribute of the managed type that corresponds to the specified name and Java element type. Inherited from

Schema Update

... ... A element has two roles: If you specify the optional new-name attribute, the package name changes from ... , the class name changes from the original name (specified by the required name attribute) to the new name ... or unqualified. If it is unqualified, ObjectDB uses the new-name value from the parent element as

Logical Operators in JPQL and Criteria API

and area exceed specified limits: SELECT c FROM Country c WHERE c.population :population AND c.area ... a specified limit: SELECT c FROM Country c WHERE c.population :population OR c.area :area Valid operands ... The following query retrieves all countries whose population does not exceed a specified limit: SELECT c FROM

JPA Queries

("SELECT ... FROM ... WHERE ..."); or Criteria query objects, as described below. For detailed usage ... for creating criteria queries and their elements (predicates, expressions, etc.). Obtain it from   ... the query clauses. Elements used to define the SELECT and ORDER BY clauses. Elements for the FROM

JPA Query API

and TypedQuery objects: Query q1 = em. createQuery ("SELECT c FROM Country c"); TypedQuery q2 = em. createQuery ("SELECT c FROM Country c", Country.class); In the preceding code, the same JPQL query, which retrieves all Country objects from the database, is represented by both q1 and q2 . When you build

JPA Connections and Transactions

transactions. Transactions are managed by an EntityTransaction instance, which is obtained from ... instance is obtained from the EntityManagerFactory . Calling the close method is essential to release ... . This form is useful when you need to specify a username and password that are different from

Chapter 6 - Configuration

: The configuration path By default, the configuration file is loaded from $objectdb/objectdb.conf ... (the ObjectDB home directory) is derived from the location of the objectdb.jar file. It is the path ... , the configuration file is loaded from $objectdb/objectdb.conf . You can specify an alternative path by

Updating JPA Entities

detects and handles changes. Transparent update After an entity is retrieved from the database ... . If the transaction is rolled back, the update is discarded. On commit, the persist operation can be cascaded from ... when it is retrieved from the database and then compare that snapshot to the object's current state

Database Server

to access and use databases from different processes simultaneously. The ability to access and use ... is bundled in the objectdb.jar file. Run it from the command line as follows: $ java -cp objectdb.jar com ... must be preserved, because server.exe tries to locate and load objectdb.jar from the directory where it was started

SSL Configuration

certificates that the client uses to validate the server's signature. This file is generated from the keystore ... attack. Conversely, the server might allow connections from any client that provides a valid username ... keystore can be different from the server keystore. Setting the Configuration To use SSL, the enabled

JPA Listeners & Callbacks Annotations

when deleting entities from the database: Executes before the removal operation, allowing cleanup of related non-persistent resources. Executes after the entity has been removed from the database. Load events Trigger logic after retrieving data from the database: Executes after an entity is loaded into

jakarta.persistence.criteria.Subquery

, an alias cannot be changed or reassigned. Returns the same selection item. Inherited from Selection ... . Warning: may result in a runtime failure. Inherited from Expression Parameters: type - intended type ... required. Inherited from Expression Parameters: type - a basic type Returns: a scalar expression

jakarta.persistence.metamodel.IdentifiableType

of the managed type that corresponds to the specified name. Inherited from ManagedType Parameters ... Persistence (JPA) 1.0 Set getAttributes () Return the attributes of the managed type. Inherited from ... of the managed type that corresponds to the specified name and Java element type. Inherited from

jakarta.persistence.metamodel.EmbeddableType

to the specified name. Inherited from ManagedType Parameters: name - the name of the represented attribute ... the attributes of the managed type. Inherited from ManagedType Returns: attributes of the managed ... to the specified name and Java element type. Inherited from ManagedType Parameters: name - the name

jakarta.persistence.EntityGraph

if there is no existing node. Inherited from Graph Parameters: attributeName - name of the attribute ... . Inherited from Graph Parameters: attribute - attribute Returns: the attribute node. Throws ... is ignored and has no effect. Inherited from Graph Parameters: attributeName - name of the attribute

jakarta.persistence.Subgraph

. Inherited from Graph Parameters: attributeName - name of the attribute Returns: the attribute node ... attribute, or add a new attribute node if there is no existing node. Inherited from Graph Parameters ... . Inherited from Graph Parameters: attributeName - name of the attribute Throws

jakarta.persistence.StoredProcedureQuery

. The getOutputParameterValue methods are used to retrieve the values passed back from the procedure ... that will be in effect during query execution. Inherited from Query Since: Jakarta Persistence (JPA) 3 ... execution. Inherited from Query Since: Jakarta Persistence (JPA) 3.2 int getFirstResult () The position

Database Transaction Replayer

. This feature is useful for two purposes: Recovering from a database failure by replaying the recorded ... is bundled in the objectdb.jar file. You can run it from the command line: $ java -cp objectdb.jar com

Step 4: Add a Servlet Class

of guests: List guestList = em.createQuery( "SELECT g FROM Guest g", Guest.class).getResultList ... is retrieved from the application scope attribute, and then an EntityManager (representing a database ... are retrieved from the database and stored in the request's "guest" attribute. Then the processing

Step 3: Define an EJB Session Bean

getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class ... all the existing  Guest objects from the database. EJB classes are only supported by Java EE ... . By using EJB classes we can move some work from the application to the EJB container (i.e

Step 3: Define a Spring DAO Component

() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return ... ; Guest objects from the database. By using Spring components we can move some work from

Step 3: Define a Spring DAO Component

getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return ... ; Guest objects from the database. By using Spring components we can move some work from

Step 3: Define an EJB Session Bean

); } // Retrieves all the guests: public List getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM ... - for retrieving all the existing Guest objects from the database. EJB classes are only supported by ... Tomcat and Jetty. By using EJB classes we can move some work from the application to the EJB container

Step 4: Add a Servlet Class

.getTransaction().commit(); } // Display the list of guests: List guestList = em.createQuery( "SELECT g FROM ... on every http request: The EntityManagerFactory is retrieved from the application scope attribute ... and stored in the database. All the Guest entities are retrieved from the database and stored in