ObjectDB Database Search

151-200 of 200 results

Duplicate Entity class names causes Exception in Query

( name = "objdbTest.Singleton.getItem", query = "SELECT o FROM Item o WHERE o.cachedKey = :cachedKey"), @NamedQuery( name = "objdbTest.Singleton.count", query = "SELECT COUNT(x) FROM Item x") }) public ... ( name = "objdbTest.Singleton.count", query = "SELECT COUNT(x) FROM objdbTest.Item x

Is named-query supported in orm.xml

I prefer to keep custom JPQL named queries in an external file, e.g. orm.xml, rather than in ... -type.2.4.a: Invalid content was found starting with element ' named - query '. One of '{"http://java ... }' is expected. Does ObjectDB support externalised named queries , if so what's the recommended way

jakarta.persistence.NamedQuery

: Annotation Target: Type Declares a named query written in the Jakarta Persistence query language. Query names are scoped to the persistence unit. A named query may be executed by calling EntityManager.createNamedQuery . The following is an example of the definition of a named query written in

jakarta.persistence.criteria.MapJoin

Instance Methods Selection alias ( String name ) Assigns an alias to the selection item ... Selection Parameters: name - alias Returns: selection item. Since: Jakarta Persistence (JPA) 1.0 ... . Inherited from FetchParent Parameters: attributeName - name of the attribute for the target of the join

jakarta.persistence.criteria.SetJoin

alias ( String name ) Assigns an alias to the selection item. Once assigned, an alias cannot be changed or reassigned. Returns the same selection item. Inherited from Selection Parameters: name - alias ... . Inherited from FetchParent Parameters: attributeName - name of the attribute for the target

jakarta.persistence.criteria.CollectionJoin

Instance Methods Selection alias ( String name ) Assigns an alias to the selection item. Once assigned ... Parameters: name - alias Returns: selection item. Since: Jakarta Persistence (JPA) 1.0 Expression ... attribute using an inner join. Inherited from FetchParent Parameters: attributeName - name

jakarta.persistence.criteria.ListJoin

alias ( String name ) Assigns an alias to the selection item. Once assigned, an alias cannot be changed or reassigned. Returns the same selection item. Inherited from Selection Parameters: name ... . Inherited from FetchParent Parameters: attributeName - name of the attribute for the target

jakarta.persistence.criteria.From

to the type. Since: Jakarta Persistence (JPA) 2.0 Public Instance Methods Selection alias ( String name ... the same selection item. Inherited from Selection Parameters: name - alias Returns: selection item ... FetchParent Parameters: attributeName - name of the attribute for the target of the join Returns

jakarta.persistence.criteria.Join

Instance Methods Selection alias ( String name ) Assigns an alias to the selection item. Once assigned ... Selection Parameters: name - alias Returns: selection item. Since: Jakarta Persistence (JPA) 1.0 Expression ... attribute using an inner join. Inherited from FetchParent Parameters: attributeName - name

jakarta.persistence.criteria.Subquery

Instance Methods Selection alias ( String name ) Assigns an alias to the selection item. Once assigned ... Parameters: name - alias Returns: selection item. Since: Jakarta Persistence (JPA) 1.0 Expression ... a subquery root correlated to a root of the enclosing query . Parameters: parentRoot - a root

JPA Lifecycle Events

and take no arguments. They can have any name and any access level ( public , protected , package , or ... with the database operation that triggers the event, callback methods must not call EntityManager or Query methods

jakarta.persistence.PersistenceConfiguration

via this API reflect the similarly- named elements of the persistence.xml file. This API may not be used ... EntityManagerFactory configure() { return new PersistenceConfiguration() . name ("DocumentData") .nonJtaDataSource ... name of the JDBC driver class. Since: Jakarta Persistence (JPA) 1.0 JDBC_PASSWORD Password for JDBC

WHERE clause (JPQL / Criteria API)

for retrieving a specific subset of objects from the database. How a WHERE clause works The following query ... FROM Country c WHERE c.population :p The FROM clause of this query defines an iteration ... to the SELECT clause to be collected as query results, the WHERE clause acts as a filter. The boolean

jakarta.persistence.metamodel.EntityType

Methods Attribute getAttribute ( String name ) Return the attribute of the managed type that corresponds to the specified name . Inherited from ManagedType Parameters: name - the name of the represented attribute Returns: attribute with given name . Throws: IllegalArgumentException - if attribute

jakarta.persistence.metamodel.IdentifiableType

Persistence (JPA) 2.0 Public Instance Methods Attribute getAttribute ( String name ) Return the attribute of the managed type that corresponds to the specified name . Inherited from ManagedType Parameters: name - the name of the represented attribute Returns: attribute with given name . Throws

jakarta.persistence.metamodel.ManagedType

Attribute getAttribute ( String name ) Return the attribute of the managed type that corresponds to the specified name . Parameters: name - the name of the represented attribute Returns: attribute with given name . Throws: IllegalArgumentException - if attribute of the given name is not present in

jakarta.persistence.metamodel.EmbeddableType

Attribute getAttribute ( String name ) Return the attribute of the managed type that corresponds to the specified name . Inherited from ManagedType Parameters: name - the name of the represented attribute Returns: attribute with given name . Throws: IllegalArgumentException - if attribute of the given name

jakarta.persistence.metamodel.MappedSuperclassType

Persistence (JPA) 2.0 Public Instance Methods Attribute getAttribute ( String name ) Return the attribute of the managed type that corresponds to the specified name . Inherited from ManagedType Parameters: name - the name of the represented attribute Returns: attribute with given name . Throws

JPA Runtime Tuning & Configuration

dynamic options that control runtime behavior and allow you to adjust settings per session, query , or ... every operation in that session. Query (definition): Settings applied to a Query object override session defaults for that query . Operation (argument): Settings passed to specific EntityManager operations ( find

jakarta.persistence.NamedStoredProcedureQuery

recognized by a provider must be ignored. All parameters of a named stored procedure query ... Implemented Interfaces: Annotation Target: Type Declares and names a stored procedure, its parameters ... superclass. The name element is the name that is passed as an argument to the EntityManager

jakarta.persistence.ColumnResult

ConstructorResult annotation to map a column of the SELECT list of a SQL query . The name element references the name of a column in the SELECT list — i.e., column alias, if applicable. Scalar result types ... name (Required) The name of a column in the SELECT clause of a SQL query Since: Jakarta Persistence

JPA Criteria FROM and JOIN

clause of a query . These interfaces define query variables, including entity roots and various join types ... is structured as follows: Criteria Query From Components in Jakarta Persistence (JPA) 3.2  Criteria query variables The FORM clause in queries defines query variables, which act as loop

jakarta.persistence.criteria.ParameterExpression

, TupleElement Type of criteria query parameter expressions. Since: Jakarta Persistence (JPA) 2.0 Public Instance Methods Selection alias ( String name ) Assigns an alias to the selection item ... Selection Parameters: name - alias Returns: selection item. Since: Jakarta Persistence (JPA) 1.0

Database Transaction Replayer

When recording is enabled , ObjectDB maintains a recording directory for each database file. The name of the recording directory is the database file name with the .odr (ObjectDB Recording) suffix. By ... of files: Backup files, with names in the format .odb Recording files, with names in the format .odr

jakarta.persistence.SqlResultSetMapping

= "item_ name ") }) See Also: Query StoredProcedureQuery NamedNativeQuery NamedStoredProcedureQuery ... query or stored procedure. Example: Query q = em.createNativeQuery( "SELECT o.id AS order_id, " + "o.quantity AS order_quantity, " + "o.item AS order_item, " + "i. name AS item_ name , " + "FROM Order o

jakarta.persistence.criteria.CriteriaUpdate

Methods Root from ( Class entityClass ) Create and add a query root corresponding to the entity ... that is being updated. Parameters: entityClass - the entity class Returns: query root corresponding to the given entity. Since: Jakarta Persistence (JPA) 1.0 Root from ( EntityType entity ) Create and add a query root

jakarta.persistence.Parameter

of the parameter Type for query parameter objects. See Also: Query TypedQuery Since: Jakarta Persistence (JPA) 2.0 Chapter 4 - JPA Queries (JPQL / Criteria) explains how to use Parameter . Public Instance Methods String getName () Return the parameter name , or null if the parameter is not a named

Named Query Exception

Wurm Thank you for this report. This could indicate an attempt to create a query using a closed

JPA Metamodel API

an EntityManager instance named em , you can get a Metamodel instance as follows: Metamodel ... - including inherited: Attribute strAttr1 = managedType. getAttribute (" name "); // Get a specific attribute - excluding inherited: Attribute strAttr2 = managedType. getDeclaredAttribute (" name

jakarta.persistence.ConstructorResult

is retrieved for the constructed object. Example: Query q = em.createNativeQuery( "SELECT c.id, c. name ... to map the SELECT clause of a SQL query to a constructor. Applies a constructor for the target class ... " + "WHERE o.cid = c.id " + "GROUP BY c.id, c. name ", "CustomerDetailsResult"); @SqlResultSetMapping( name

Auto Generated Values

only within that hierarchy. The SEQUENCE Strategy The sequence strategy has two parts: defining a named sequence ... . It takes a name , an initial value (default is 1), and an allocation size (default is 50). A sequence ... the SEQUENCE strategy in the @GeneratedValue annotation to attach the field to a previously defined named

JPA Fetch Graphs Annotations

Named entity graphs provide a static mechanism for defining fetch plans using annotations ... named entity graphs at the class level using the following annotations: Specifies a named entity graph ... and nested relationships: Specifies an individual attribute node within a named entity graph or subgraph

jakarta.persistence.FieldResult

the SELECT list of a SQL query to the properties or fields of an entity class. Example: Query q = em ... "); @SqlResultSetMapping( name = "OrderResults", entities = { @EntityResult( entityClass = com.acme.Order.class, fields = { @FieldResult( name = "id", column = "order_id"), @FieldResult( name = "quantity

Logical Operators in JPQL and Criteria API

Logical operators in JPQL and JPA criteria queries combine simple Boolean expressions to form ... , while Java uses its own notation, which is also used by the JDO Query Language (JDOQL). ObjectDB supports both notations. Binary AND (&&) operator The following query retrieves countries whose population

JPA Exceptions

locking wait times. Query exceptions Exceptions specific to query execution and result retrieval: Thrown by Query .getSingleResult() when the query returns no results. Thrown by Query .getSingleResult() when the query returns more than one result. Thrown when a query exceeds the specified timeout limit

jakarta.persistence.criteria.CriteriaQuery

, CommonAbstractCriteria The CriteriaQuery interface defines functionality that is specific to top-level queries . Since: Jakarta Persistence (JPA) 2.0 The JPA Criteria API Queries article explains how to use ... query results are eliminated. A true value will cause duplicates to be eliminated. A false value

Step 2: Entity Class and Persistence Unit

, enter src/main/java as Folder Name and click Finish . Open the [New Java Class] dialog box, e.g. by ... ; New Class . Enter  guest as the package name - use  exactly that case sensitive package name . Enter  Guest as the class name - use  exactly that case sensitive class name . Click

Step 2: Entity Class and Persistence Unit

) and selecting  New Class . Enter  guest as the package name - use  exactly that case sensitive package name . Enter  Guest as the class name - use  exactly that case sensitive class name . Click  Finish to create the new class. A new class that should represent Guest

Step 2: Entity Class and Persistence Unit

Guest as the class name - use exactly that case sensitive class name . Enter guest as the package name - use exactly that case sensitive package name . Click Next to create the new entity class. In ... name ; private Date signingDate; // Constructors: public Guest() { } public Guest(String name

Step 2: Entity Class and Persistence Unit

  Next ). Enter Guest as the class name - use exactly that case sensitive class name . Enter guest as the package name - use exactly that case sensitive package name . Click Next to create the new ... name ; private Date signingDate; // Constructors: public Guest() { } public Guest(String name

Step 2: Define a JPA Entity Class

) and selecting New Class . Enter guest as the package name - use exactly that case sensitive package name . Enter Guest as the class name - use exactly that case sensitive class name . Click Finish ... String name ; private Date signingDate; // Constructors: public Guest() { } public Guest(String name

Step 2: Define a JPA Entity Class

) and selecting New Java Class ... Enter Guest as the class name - use exactly that case sensitive class name . Enter guest as the package name - use exactly that case sensitive package name . Click Finish ... @GeneratedValue Long id; private String name ; private Date signingDate; // Constructors: public

Step 4: Add a Controller Class

) and selecting  New Class . The package name should be  guest . Enter  GuestController as the class name - use  exactly that case sensitive class name . Click  Finish to create ... name = request.getParameter(" name "); if ( name != null) guestDao.persist(new Guest( name

Step 4: Add a Servlet Class

... Enter GuestServlet as the class name - use exactly that case sensitive class name . The Java package name should be guest. Click Finish to create the new servlet class. Now replace the content ... .http.HttpServletResponse; @WebServlet( name ="GuestServlet", urlPatterns={"/guest"}) public class

Step 4: Add a Servlet Class

; New Other... Web Servlet and clicking  Next . The Java package name should be guest. Enter GuestServlet as the class name - use exactly that case sensitive class name . Click Finish to create ... .http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet( name

Step 4: Add a Servlet Class

  New Other... Web Servlet and clicking  Next . The Java package name should be guest. Enter GuestServlet as the class name - use exactly that case sensitive class name . Click Finish ... a new guest (if any): String name = request.getParameter(" name "); if ( name != null) { em

Step 4: Add a Controller Class

New Java Class ... Enter GuestController as the class name - use exactly that case sensitive class name . The Package should be guest. Click Finish to create the new Spring Controller class. Now ... (HttpServletRequest request) { // Handle a new guest (if any): String name = request.getParameter(" name

Step 4: Add a Servlet Class

... Enter GuestServlet as the class name - use exactly that case sensitive class name . The Java package name should be guest. Click Finish to create the new servlet class. Now replace the content ... = emf.createEntityManager(); try { // Handle a new guest (if any): String name = request

[ODB1] Chapter 2 - A Quick Tour

ArrayList list; 18 try { 19 // Retrieve the list from the database by its name : 20 list = (ArrayList ... the database by its name "Hello World" using the getObjectById( ... ) method (line 20 ... to the database with the name "Hello World", using the Utilities.bind( ... ) static method (line 25

[ODB1] Chapter 8 - ObjectDB Server

configuration file. ObjectDB is shipped with a default server configuration file named default.xml ... com.objectdb.Server -conf config.xml start If you name your configuration file server.xml ... element. The required name and password attributes specify a username and a password to be used