Internal Website Search
41-50 of 200 resultsRefreshNumbers in JPQL and Criteria Queries (which are described above) are available also as JPA criteria query expressions. The api ... : api/java/jpa/criteria/Expression">Expression<Integer> path = country.api/java/jpa/criteria/Path/get_String">get("population"); api/java/jpa/criteria | |
CRUD Database Operations with JPA Given an api/java/jpa/EntityManager">EntityManager, em.api/java/jpa/EntityManager/getTransaction">getTransaction().api/java/jpa/EntityTransaction/begin">begin(); for (int i = 0; i < 1000; i | |
JPA Named Queries and @NamedQueries Annotations The following api/java/jpa/NamedQuery ... -java"> api/java/jpa/NamedQuery">@NamedQuery(api/java/jpa/NamedQuery/name">name="Country.findAll", api/java/jpa/NamedQuery/query">query="SELECT c FROM Country c | |
JPA Persistable Types a class as an entity is to mark it with the api/java/jpa/Entity">Entity annotation: import javax.persistence.Entity; api/java/jpa/Entity">@api/java/jpa/Entity">Entity public class MyEntity { } Entity | |
javax.persistence.criteria.CriteriaBuilder> in this API in order to work around the fact that Java generics are not compatible with varags. Learn how to define queries using the criteria API in ... method"> api/java/jpa/criteria/Expression" title | |
Running JPA Queries The api/java/jpa/Query">Query interface defines two methods for running SELECT queries: api/java/jpa/Query/getSingleResult ... . api/java/jpa/Query/getResultList">Query.getResultList | |
Detached Entity Objects#entity_object_life_cycle">state in which they are not managed by any api/java/jpa ... methods do not accept detached objects (e.g. api/java/jpa/EntityManager/lock_Object ... object) is constructed as a detached entity object since is not associated with any api | |
Query Parameters in JPA Country getCountryByName(api/java/jpa/EntityManager">EntityManager em, String name) { api/java/jpa/TypedQuery">TypedQuery<Country> query = em.api/java ... WHERE c.name = :name", Country.class); return query.api/java/jpa/TypedQuery/setParameter | |
JPA Lifecycle Events methods with empty implementations: api/java/jpa/Entity">@Entity public static class MyEntityWithCallbacks { api/java/jpa/PrePersist">@PrePersist void onPrePersist() {} api/java/jpa/PostPersist">@PostPersist void | |
Literals in JPQL and Criteria Queries specifying another name explicitly in the api/java/jpa/Entity">@Entity's api/java/jpa ... >api/java/jpa/criteria/CriteriaBuilder">CriteriaBuilder interface provides ... method, api/java/jpa/criteria/CriteriaBuilder/literal_T">literal, takes |