Internal Website Search
1-50 of 200 resultsSELECT clause (JPQL / Criteria API) The ability to retrieve managed entity objects is a major advantage of JPQL. For example ... queries can also return results that are not entity objects. For example , the following query returns ... variable in the FROM clause. Nested path expressions are also supported. For example , the following | |
Strings in JPQL and Criteria Queries (usually a parameter or literal). For example : c.name LIKE '_r%' is TRUE for 'Brazil' and FALSE ... an escape character, which is also specified. For example : '100%' LIKE '%\%' ESCAPE '\'   ... returns the number of characters in the argument string as an int . For example : LENGTH('United | |
FROM clause (JPQL / Criteria API) at the WHERE clause level by using a type expression . For example , in the following query, c iterates ... name annotation element. Multiple range variables are allowed. For example , the following query ... is avoided. The above query, for example , can be executed as follows. An outer loop iterates with c1 | |
Literals in JPQL and Criteria Queries ) are also supported. Following are examples of valid numeric literals in JPQL: int : 100, -127, 0, 07777 long ... for date literals: Date - {d 'yyyy-mm-dd'} - for example : {d '2019-12-31'} Time - {t 'hh:mm:ss'} - for example : {t '23:59:59'} Timestamp - {ts 'yyyy-mm-dd hh:mm:ss'} - for example : {ts '2020-01-03 13:59:59 | |
Retrieving JPA Entity Objects object is already managed by the EntityManager ). In the example above, when an Employee instance ... for the field. In the above example , when an Employee instance is retrieved all the referenced Project ... with the database and makes database programming easier. For example , after retrieving an Employee instance | |
Numbers in JPQL and Criteria Queries and JDO. JPA follows Java numeric promotion principles. For example , the resulting type ... , which is always a positive number or zero. For example : ABS(-5) is evaluated to 5 ABS(10.7) is evaluated ... an extension). For example : MOD(11, 3) is evaluated to 2 (3 goes into 11 three times with a remainder of 2 | |
Collections in JPQL and Criteria Queries The IS [NOT] EMPTY operator checks whether a specified collection is empty or not. For example : c.languages ... of elements in a specified collection. For example : SIZE(c.languages) is evaluated ... if a specified element is contained in a specified persistent collection field. For example : 'English' MEMBER | |
JPA Persistable Types to the requested mode. For example , fields date1 , date2 and date3 above may be initialized as new Date() , i.e ... will switch to a similar supported type when the data is retrieved from the database. For example , the Arrays ... persistence. For example , a collection that is stored as an instance of java.util.ArrayList | |
Privacy Policy the use of the Service or from the Service infrastructure itself (for example , the duration of a page ... gifs) that permit the Company, for example , to count users who have visited those pages or opened an email and for other related website statistics (for example , recording the popularity of a certain | |
JPA Metamodel API method or by the EntityManager 's getMetamodel method (both methods are equivalent). For example ... to as attributes). For example : // Get all the attributes - including inherited: Set attributes1 ... and the version attributes and the super type. For example : // Get the super type: IdentifiableType superType | |
UPDATE SET Queries in JPA/JPQL;may break its synchronization with the database. For example , the EntityManager may not be aware ... of a specified entity class in the database (including instances of subclasses). For example , the following ... . For example : UPDATE Country SET population = 0, area = 0 UPDATE queries are executed using the  | |
Paths and Types in JPQL and Criteria API and values. For example - c.capital , where c represents a Country entity object uses the capital ... . For example , c.capital.name is a nested path expression that continues from the Capital entity object ... . For example , the following criteria expression checks if the type of a specified entity e is not  | |
Setting and Tuning of JPA Queries maximum is ignored. These methods support the implementation of efficient result paging. For example ... on all the result objects that the query retrieves. For example , the following query execution sets ... (unless it is overridden in a more local scope). For example , setting a query hint in | |
Schema Update and fields in that package. The elements above specify renaming of the com. example .old1 and com. example .old2 packages. The com. example .old3 package is not renamed, but rename operations are specified | |
DELETE Queries in JPA/JPQL may break its synchronization with the database. For example , the EntityManager may not be aware ... of a specified entity class (including instances of subclasses) from the database. For example ... entity objects, is supported. For example , the following query deletes the countries with population | |
WHERE clause (JPQL / Criteria API) them to the SELECT clause. For example , the following query retrieves all the countries with population size ... if any). For example , the following JPQL query: SELECT c FROM Country c WHERE c.population :p ... the WHERE clause content (overriding previously set WHERE content if any): For example , the following JPQL query: SELECT c FROM Country WHERE c.population :p AND c.area | |
Deleting JPA Entity Objects = CascadeType . REMOVE ) private Address address; : } In the example above, the Employee entity class contains ... the response to disconnecting a relationship. For example , such as when setting the address field ... for collection and map fields. For example : @Entity class Employee { : @OneToMany ( orphanRemoval | |
Running JPA Queries. The query result collection functions as any other ordinary Java collection. For example , a  ... our expectation for a single object result might fail, depending on the database content. For example ... (with executeUpdate) DELETE and UPDATE queries are executed using the executeUpdate method. For example | |
Criteria Query Selection and Results of Selection : See the SELECT in Criteria Queries section for more details and examples . ORDER BY ... ;for more details and examples . Query Results as Tuples JPA 2 introduces a new way to represent ... Criteria Queries for more details and examples . These interfaces are defined outside the javax | |
Shared (L2) Entity Cache explicitly. For example : @Cacheable // or @Cacheable(true) @Entity public class ... explicitly. For example : @Cacheable (false) @Entity public class MyNonCacheableEntityClass extends ... operation. For example : em. find (MyEntity2.class, Long.valueOf(1), Collections. singletonMap | |
Online Backup of the original database file. For example , backing up a test.odb database file using the code ... side. For example , in client-server mode the code above could create the backup file on the server ... can be used, for example , for waiting until the backup is completed.   | |
GROUP BY and HAVING clauses calculations - the GROUP BY functions merely as a DISTINCT operator. For example , the above query ... /WHERE objects (or object tuples) are considered as one group. For example , the following query ... and HAVING clauses. For example , the following JPQL query: SELECT c.currency, SUM(c.population) FROM | |
ORDER BY clause (JPQL / Criteria API) expressions in the SELECT clause are allowed in the ORDER BY clause. The following query, for example ... receives groups rather than individual objects and ORDER BY can order these groups. For example : SELECT c ... . For example , the following JPQL query: SELECT c FROM Country c ORDER BY c.currency, c.population DESC | |
Locking in JPA a PESSIMISTIC_READ lock on that database object. For example , consider the following code fragment: em1 ... operation. For example , the find method has a form that accepts a lock mode: Employee employee = em. find ... pessimistic locking, timeout can be specified as a property. For example : Map properties = new HashMap | |
JPA Exceptions subclasses of PersistenceException . For example , an attempt to update the database with no active ... ; (which can be obtained by the getCause method) . For example , if a transaction fails ... : Exceptions can also be thrown on an attempt to retrieve entity objects from the database. For example | |
JPA Primary Key primary key fields. Each primary key field must be one of the supported types listed above. For example ... for getting the object ID (primary key) of a specified managed entity object. For example ... an example , consider a real time system that detects events from various sensors and stores | |
JPA Entity Fields Hibernate) or to change default field settings. For example : @Entity public class EntityWithFieldSettings ... , the side that stores the data (the Employee class in our example ) is the owner. Only changes | |
Database Replication and Clustering, only the first URL (the master database in this example ) is used. But when the first URL becomes unavailable ... this example to the slave database) until the first URL becomes available again. | |
Detached Entity Objects; : } In the example above, the Employee entity class contains an address field that references ... ) private Address address; : } In the example above, the Employee entity class contains an address field | |
Is ObjectDB better than competing object databases? is also unique in supporting features that are usually available only in relational databases. For example ... that during development you may find that an essential feature is missing. For example , some competing products | |
JPA Query Structure (JPQL / Criteria) classes and objects. For example , a JPQL query can retrieve and return entity objects ... . JPQL keywords, for example , can appear in queries either in upper case (e.g. SELECT) or in lower | |
JPA Class Enhancer into the JVM by running the application with objectdb.jar as a Java agent. For example , if objectdb ... above. First, currently it only works on Sun JDK 6 or above (and not on JRE 6 for example ). Second | |
Query Parameters in JPA appearing in the query string. The parameter type is inferred by the context. In the above example ... section. For example , the following invocation passes a Date object as a pure date (no time): query | |
Eclipse Public License - v 1.0 responsibility to secure any other intellectual property rights needed, if any. For example ... . For example , a Contributor might include the Program in a commercial product offering, Product X | |
Comparison in JPQL and Criteria API which, for example , null == null is true . All the other operators implement the SQL logic in ... comparison of any two values that belong to the same group as detailed above. Therefore, for example | |
JPA Criteria API Queries;the criteria API may be preferred. For example , building a dynamic query based on fields that a user ... (both methods are equivalent). In the example above a CriteriaQuery instance is created | |
JPA Persistence Unit” in the example ) identifies the persistence unit when instantiating an EntityManagerFactory ... classes become known to ObjectDB, for example when a first instance of the class is stored in the database. | |
Criteria Query From Elements and examples . Join Fetch Elements Join Fetch is managed in criteria queries by the following interfaces: See the FROM in Criteria Queries section for more details and an example . | |
Chapter 1 - Quick Tour This chapter demonstrates basic ObjectDB and JPA concepts by introducing a simple example program. After reading this chapter you should be able to write basic programs that create, open and close ... ) on ObjectDB databases. The example program that this chapter presents manages a simple database | |
Database Server, which is much more efficient. As a result, embedded mode should be preferred when possible. For example ... (excluding the start , stop and the restart server commands). For example : server.exe -client -Xmx256m | |
Database Explorer execution plan. This is useful, for example , for checking which indexes are used. The Reset button clears ... ( Cut , Copy and Paste ). For example , an entity object can be selected and copied as a reference | |
Criteria Query Expressions The following interfaces are in use in representing general expressions in criteria queries: See the Query Expressions section for more details and examples . | |
JPA Lifecycle Events Callback methods are user defined methods that are attached to entity lifecycle events and are invoked automatically by JPA when these events occur. Internal Callback Methods Internal callback methods are methods that are defined within an entity class. For example , the following entity class | |
[ODB1] Chapter 3 - Persistent Classes support for additional types is to define new persistent classes. For example , the class java.awt ... is stored in the database. For example , a field whose type is Number (which is an abstract class ... . For example : On Windows command: set classpath=%classpath%;.;c:\objectdb\lib\odbfe.jar;c:\objectdb\lib\jdo | |
[ODB1] Chapter 7 - JDOQL Queries instance is constructed by one of the PersistenceManager 's newQuery( ... ) methods. For example , in ... .Collection instance and managed like any ordinary Java collection. For example , the number of retrieved ... the scope of the candidate class. For example , "this.age = 18" is a valid filter if the candidate | |
[ODB1] Chapter 6 - Persistent Objects ID is not allocated yet. Such an object ID is fixed on commit() . For example : pm.currentTransaction ... , which is a database object with an assigned name, can be retrieved by using its name. For example , a root ... . For example , after retrieving a Person instance from the database, its address field | |
[ODB1] Chapter 5 - JDO Connections (for example , per web request in a web application). In some cases, however, a single ... -user desktop application using an embedded ObjectDB database (for example , a personal organizer). In ... block (unlike code working with files and I/O, for example , in which handling a checked exception | |
[ODB1] Chapter 4 - JDO Metadata class if it is also persistent. In the above metadata example , class C is probably defined as a subclass ... f0 , changes a field that is transient by default to persistent. For example , a field ... (for example , when a field has to be persistent in serialization). A field that is declared as | |
[ODB1] Chapter 2 - A Quick Tour . If such an ArrayList is not found in the database (on the first run for example ), an exception is thrown ... objects (like list in this example ) are called persistent objects . An object retrieved from | |
[ODB1] Chapter 8 - ObjectDB Server). For example : server.exe -client -Xmx256m -port 6666 The specified arguments override conflicting ... separated list and using a hyphen (-) to indicate a range. For example , a value "192.18.0.0-192.18.194 |