Internal Website Search
1-50 of 200 resultsSELECT clause (JPQL / Criteria API) = em. createQuery (" SELECT c FROM Country c", Country.class); List results = query. getResultList ... the ability to use almost any valid JPQL expression in SELECT clauses. Specifying the required query ... the " SELECT *" expression (which is commonly used in SQL). Projection of Path Expressions JPQL | |
Criteria Query Selection and Results The JPA Criteria API interfaces in this group are used for setting the SELECT and ORDER BY clauses and for representing query results as tuples. SELECT Clause Elements The content of the SELECT clause in a criteria query is represented by Selection : Because Selection is a super interface | |
javax.persistence.SharedCacheMode.ENABLE_SELECTIVE JPA Enum Constant in javax.persistence.SharedCacheMode ENABLE _ SELECTIVE Caching is enabled for all entities for Cacheable(true) is specified. All other entities are not cached. Since: JPA 2.0 | |
CriteriaQuery.select(selection) - JPA Method JPA Method in javax.persistence.criteria.CriteriaQuery CriteriaQuery select ( Selection selection ) Specify the item that is to be returned in the query result. Replaces the previously specified selection (s), if any. Note: Applications using the string-based API may need | |
Shared (L2) Entity Cache to one of the following values: NONE - cache is disabled. ENABLE _ SELECTIVE - cache is disabled except for selected entity classes (see below). DISABLE_ SELECTIVE - cache is enabled except for selected ... regardless of the set mode. Entity Class Cache Settings The ENABLE _ SELECTIVE mode indicates | |
javax.persistence.criteria.Selection JPA Interface Selection Type Parameters: - the type of the selection item Super Interfaces: TupleElement The Selection interface defines an item that is to be returned in a query result. Since: JPA 2.0 The SELECT clause (JPQL / Criteria API) article explains how to use Selection . Public Methods | |
CriteriaQuery.multiselect(selections) - JPA Method; Selection ... selections ) Specify the selection items that are to be returned in the query result. Replaces the previously specified selection (s), if any. The type of the result of the query ... array-valued compound selection item. The semantics of this method are as follows: If the type | |
CriteriaBuilder.array(selections) - JPA Method JPA Method in javax.persistence.criteria.CriteriaBuilder CompoundSelection array ( Selection ... selections ) Create an array-valued selection item. Parameters: selections - selection items Return: array-valued compound selection Throws: IllegalArgumentException - if an argument is a tuple- or array-valued selection item Since: JPA 2.0 | |
CriteriaBuilder.tuple(selections) - JPA Method JPA Method in javax.persistence.criteria.CriteriaBuilder CompoundSelection tuple ( Selection ... selections ) Create a tuple-valued selection item. Parameters: selections - selection items Return: tuple-valued compound selection Throws: IllegalArgumentException - if an argument is a tuple- or array-valued selection item Since: JPA 2.0 | |
CriteriaBuilder.construct(resultClass,selections) - JPA Method;Class resultClass, Selection ... selections ) Create a selection item ... whose instance is to be constructed selections - arguments to the constructor Return: compound selection item Throws: IllegalArgumentException - if an argument is a tuple- or array-valued selection item Since: JPA 2.0 | |
Selection | |
Selection | |
Selection | |
javax.persistence.SharedCacheMode.DISABLE_SELECTIVE JPA Enum Constant in javax.persistence.SharedCacheMode DISABLE_ SELECTIVE Caching is enabled for all entities except those for which Cacheable(false) is specified. Entities for which Cacheable(false) is specified are not cached. Since: JPA 2.0 | |
Subquery.select(expression) - JPA Method JPA Method in javax.persistence.criteria.Subquery Subquery select ( Expression expression ) Specify the item that is to be returned as the subquery result. Replaces the previously specified selection , if any. Parameters: expression - expression specifying the item | |
Database Explorer Embedded... command and select a local database file. To open a database in client-server mode select File Open C/S Connection... and provide host, port, username and password for a client ... and embeddable classes) in the database and their persistent fields and indexes. The [Query] window enables | |
GROUP BY and HAVING clauses The GROUP BY clause enables grouping of query results. A JPQL query with a GROUP BY clause returns ... clause in the query execution order is after the FROM and WHERE clauses, but before the SELECT ... ) are sent to grouping by the GROUP BY clauses before arriving at the SELECT clause. GROUP BY as DISTINCT | |
Setting and Tuning of JPA Queries . Result Range (setFirstResult, setMaxResults) The setFirstResult and setMaxResults methods enable ... at the level of a specific query, by overriding the default EntityManager setting: // Enable query time flush at the EntityManager level: em. setFlushMode ( FlushModeType . AUTO ); // Enable query time | |
SSL Configuration contains the following element: The enabled attribute of the ssl element (whose value is "true" or "false" ) specifies if SSL is used. As shown above, SSL is disabled by default. It could be enabled ... algorithm). A Truststore file that functions as a certificate that enables the client to validate the server | |
Database Management Settings When enabled , a recovery file is created by ObjectDB when a database is opened and deleted by ObjectDB ... the database. The element specifies the recovery file settings: The enabled attribute (whose value ... . When recording is enabled and recovery is disabled, recorded operations are used to automatically fix | |
FROM clause (JPQL / Criteria API) over all the Country objects in the database: SELECT c FROM Country AS c The AS keyword is optional, and the same query can also be written as follows: SELECT c FROM Country c By default, the name ... returns all the pairs of countries that share a common border: SELECT c1, c2 FROM Country c1, Country c2 | |
ORDER BY clause (JPQL / Criteria API) is at least one million people, ordered by the country name: SELECT c.name FROM Country c WHERE c.population 1000000 ... produces objects for examination and the WHERE clause selects which objects to collect as results. Then the SELECT clause builds the results by evaluating the result expressions. Finally the results | |
Database Transaction Replayer. Recording is enabled by default and can be disabled in the configuration . The ObjectDB Replayer tool ... is useful for two different purposes: It enables recovery from a database failure by replaying the recorded operations. It enables reproducing problems during debugging by repeating a failure. Backup | |
Query Parameters in JPA Query parameters enable the definition of reusable queries. Such queries can be executed ... getCountryByName( EntityManager em, String name) { TypedQuery query = em. createQuery ( " SELECT c FROM ... ( EntityManager em, String name) { TypedQuery query = em. createQuery ( " SELECT c FROM Country c | |
JPA Entity Fields the following query (where :d represents the Department entity): SELECT e FROM Employee e WHERE e ... of the following query: SELECT e FROM Employee e WHERE e.department = :d ORDER BY e.name The specified field ... from the inverse query results by specifying a selected key field using the MapKey annotation | |
Logical Operators in JPQL and Criteria API Logical operators in JPQL and in JPA criteria queries enable composition of complex JPQL boolean ... query retrieves countries whose population and area (both) exceed specified limits: SELECT c FROM ... The following query retrieves countries whose population or area exceeds a specified limit: SELECT c | |
WHERE clause (JPQL / Criteria API) The WHERE clause adds filtering capabilities to the FROM- SELECT structure. It is essential in any JPQL query that retrieves selective objects from the database. Out of the four optional clauses ... : SELECT c FROM Country c WHERE c.population :p The FROM clause of this query defines an iteration | |
JPA Queries;(e.g. " SELECT c FROM Country" ). Criteria Query API Building dynamic queries with a structure ... Query API , as a cleaner alternative that enables building a dynamic query by using instances ... are organized in this reference into three groups. SELECT and ORDER BY elements (including tuples): FROM clause | |
JPA Query Structure (JPQL / Criteria) and easier to use in Java. JPQL Query Structure As with SQL, a JPQL SELECT query also consists of up to 6 clauses in the following format: SELECT ... FROM ... [WHERE ...] [GROUP BY ... [HAVING ...]] [ORDER BY ...] The first two clauses, SELECT and FROM are required in every retrieval query | |
JPA Persistable Types is essential in this case to enable switching to the supported collection type when the entity ... using proxy classes that extend the original classes and enable transparent activation and transparent ... existing databases. The @Enumerated annotation enables choosing the internal representation: @Entity | |
Retrieving JPA Entity Objects with data that is retrieved from the database (or from the L2 cache - if enabled ). The new entity object ... annotations (currently ObjectDB does not distinguish between the two) enables cascading retrieval ... of JPA is JPQL (Java Persistence Query Language). It enables retrieval of objects from the database by | |
JPA Criteria API Queries: SELECT c FROM Country c An equivalent query can be built using the JPA criteria API as follows ... ); Root c = q. from (Country.class); q. select (c); The CriteriaBuilder interface serves as the main ... clause. Finally, the range variable, c , is also used in the SELECT clause as the query result | |
Literals in JPQL and Criteria Queries to enable selective retrieval by type . In JPQL an entity type literal is written simply as the name | |
Entity Management Settings, supported only on selected JVMs. The reflection attribute specifies how non enhanced classes ... is "true" or "false" ) specifies if lazy loading of entity objects content is enabled . Instantiating | |
JPA Class Enhancer not need to be enhanced. Enhancement improves efficiency in three ways: Enhanced code enables ... that automatically notifies ObjectDB whenever a persistent field is modified. Enhanced code enables lazy | |
Step 7: Run the Spring Web App - you should be able to run your application now by selecting Run Run Main Project from the main menu (or F6 ): You can select the server in the Run category of the project properties window (right click the project node and select Properties to open it). Alternatively you can run the web application using | |
Step 7: Run the Spring Web App), selecting Run As Run on Server , selecting the Tomcat 6.0 server and clicking Finish ... Maven Jetty plugin: Right click the project node and select Run As Maven Build... Enter  ... ; persistence.xml file - instead of RESOURCE_LOCAL you will have to specify JTA . To enable on the fly | |
[ODB1] Chapter 9 - ObjectDB Explorer side of the Explorer desktop enables execution of JDOQL queries. The first step in defining a query is selecting ... toolbar button) and in the Open dialog box select the desired local database file and click the "Open ... " button that opens the "Remote File Selection " dialog box. Closing the Database Use the "File | Close | |
Step 3: Add a Context Listener Class] dialog box by right clicking the guest package node (in the [Package Explorer] window), selecting New ... as the class name - use exactly that case sensitive class name. Click Next and then Select All to enable the Finish button. Click Finish to create the new listener class. Now replace the content | |
Step 2: Entity Class and Persistence Unit) and selecting New Entity Class ... (or New Other... Persistence Entity Class and clicking Next ). Enter ... fill the fields with arbitrary values to enable it. A new entity class that should represent Guest ... clicking and selecting Edit or by double click and then moving to the Source or XML tab in | |
Step 2: Entity Class and Persistence Unit) and selecting New Entity Class ... (or New Other... Persistence Entity Class and clicking ... fill the fields with arbitrary values to enable it. A new entity class that should represent Guest ... a text editor (by right clicking and selecting Edit or by double click and then moving to the XML | |
[ODB1] Chapter 6 - Persistent Objects storing method, Utilities.bind( ... ) . This method (discussed in the next section) enables ... one by one. If more selective retrieval is needed, a Query can be used to retrieve only objects ... are supported by ObjectDB but not by JDO. Retrieval by an Extent An Extent enables iteration | |
Spring MVC JPA Tutorial - IntelliJ Project zip file: Spring MVC JPA - Maven Project (8KB) Open the project in IntelliJ IDEA: Select File Open Project... . Select the guestbook-spring directory and click OK . Define the Server: Select File Settings Application Servers . Add Tomcat 6 Server if not set already (Tomcat | |
JPA Web App Tutorial - IntelliJ Project: Select File Open Project... . Select the guestbook-web directory and click OK . Define the Server: Select File Settings Application Servers . Add Tomcat 6 Server if not set already (Tomcat has to be downloaded separately). Define Run Configuration: Select Run Edit Configurations , click the + icon | |
Java EE 6 JPA Tutorial - IntelliJ Project the project in IntelliJ IDEA: Select File Open Project... . Select the guestbook-jee6 directory and click OK . Define the Server: Select File Settings Application Servers . Add ... : Select Run Edit Configurations , click the + icon and select Tomcat Server Local | |
[ODB1] Chapter 8 - ObjectDB Server system permissions have to be set on that directory to enable operations by the server process ... its log files. Appropriate file system permissions have to be set on that directory to enable ... above (which always represents the local machine) enables connecting to the database server only from the machine | |
[ODB1] Chapter 7 - JDOQL Queries. When a more selective retrieval is needed, JDOQL (JDO Query Language) is used. JDOQL for JDO is like ... is slightly more flexible because it enables using an Extent with or without subclass support ... "this.verified" is a valid query filter. It selects all the objects with the true value in that field | |
[ODB1] Chapter 3 - Persistent Classes , int , long , float and double . Selected classes in package java.lang : Boolean , Byte , Short , Character , Integer , Long , Float , Double , Number and String . Selected classes in package java ... , which enables transparent use of old schema instances. When an old instance is loaded into the memory | |
[ODB1] Chapter 5 - JDO Connections are usually required in a client server connection to enable user identification and permission ... value enables modifying persistent objects without an active transaction, but in this case changes | |
[ODB1] Chapter 4 - JDO Metadata because JDO enables declaring a persistent class as a subclass of a non persistent class. Of course, in ... ) By default, JDO manages an extent for every persistent class. An extent enables iteration |