Internal Website Search

11-20 of 200 resultsRefresh

JPA Named Queries

the JPQL query strings from the Java code. It also enforces the use of query jpa ... and @NamedQueries Annotations The following jpa/NamedQuery ... -java"> jpa/NamedQuery">@NamedQuery(jpa/NamedQuery/name">name

Running JPA Queries

The jpa/Query">Query interface defines two methods for running SELECT queries: jpa/Query/getSingleResult ... . jpa/Query/getResultList">Query.getResultList

JPA Query Structure (JPQL / Criteria)

of SQL. Having an SQL-like syntax in JPA queries is an important advantage because SQL ... ...] The first two clauses, jpa/query/jpql/select">SELECT and jpa/query/jpql/from">FROM are required in every retrieval query (update and delete queries

Query Parameters in JPA

Country getCountryByName(jpa/EntityManager">EntityManager em, String name) { jpa/TypedQuery">TypedQuery<Country> query = em.jpa/EntityManager/createQuery_String_Class_">createQuery( "SELECT c FROM Country c

JPA Lifecycle Events

and are invoked automatically by JPA when these events occur. jpa/Entity">@Entity public static class MyEntityWithCallbacks { jpa/PrePersist

JPA Primary Key

primary key is not required. But ObjectDB also supports explicit standard JPA primary keys, including composite primary keys and automatic jpa ... (and can be jpa/persistence/retrieve">retrieved from the database) by the combination of its type

JPA Query API

Queries are represented in JPA 2 by two interfaces - the old jpa/Query">Query interface, which was the only interface available for representing queries in JPA 1, and the new jpa/TypedQuery">TypedQuery interface

Deleting JPA Entity Objects

the jpa/EntityManager/remove_Object">remove method or implicitly ... which way) and then in an active transaction, it can be deleted using the jpa ... employee = em.jpa/EntityManager/find_Class__Object">find(Employee.class, 1

Obtaining a JPA Database Connection

In JPA a database connection is represented by the jpa ... an jpa/EntityTransaction">EntityTransaction instance. Obtaining an EntityManagerFactory Obtaining an jpa/EntityManager

JPA Queries

Queries are represented in JPA by the Query and TypedQuery interfaces: jpa/queries" select="Query|TypedQuery"> The jpa/query/api">JPA Query API section (in chapter 4