Internal Website Search
51-100 of 200 resultsEmbedded in JDO metadata not working in objectDB 2.x ? Hi, I am using JDO access to the database with the persistence defined in package.jdo XML metadata files. In those metadata files I have few persistence-capable classes which had extents in ObjectDB ... and own OID) in those few peristence-capable ones. Example of JDO metadata:   | |
IN expression in a Criteria Query is with Criteria Language. This code: In inExpression = cb. in (root.get(Computer_.employeeEntity ... by ObjectDB. They are listed in the issue tracking system , and unfortunately subqueries ... Support Hi, I am seeing the same issue of " IN (:bindVar)" generates a syntax error in version 2.5.3 | |
Database Schema Evolution of an entity class are detected by ObjectDB. New entity objects have to be stored in the new class schema, and old entity objects, which were stored previously in the old class schema, have to be converted to the new schema. Note: In client-server mode the ObjectDB server must be restarted | |
Working with JPA Entity Objects Entity objects are in -memory instances of entity classes (persistable user defined classes), which can represent physical objects in the database. Managing an ObjectDB Object Database using JPA ... . In this state the object is not yet associated with an EntityManager and has no representation in | |
JPA Class Enhancer not need to be enhanced. Enhancement improves efficiency in three ways: Enhanced code enables ... (as explained in chapter 3 ). This is done by adding special code to enhanced classes ... reflection. Command Line Enhancement ObjectDB Enhancer is a Java console application. It is contained in | |
JPA Primary Key Every entity object that is stored in the database has a primary key. Once assigned, the primary key cannot be modified. It represents the entity object as long as it exists in the database. As ... that is absent from other object oriented databases. Entity Identification Every entity object in | |
JPA Criteria API Queries fills at runtime in a form that contains many optional fields - is expected to be cleaner when using ... (both methods are equivalent). In the example above a CriteriaQuery instance is created for representing the built query. Then a Root instance is created to define a range variable in the FROM | |
JPA Query API Queries are represented in JPA 2 by two interfaces - the old Query interface, which was the only interface available for representing queries in JPA 1, and the new TypedQuery interface that was introduced in JPA 2. The TypedQuery interface extends the Query interface. In JPA 2 the Query interface | |
JPA Lifecycle Events ). @PostPersist - after storing a new entity in the database (during commit or flush ). @PostLoad ... the EntityManager . @PostUpdate - after updating an entity in the database (during commit or flush ). @PreRemove - when an entity is marked for removal in the EntityManager. @PostRemove | |
Database Management Settings on the server side and in embedded mode. The default configuration file contains the following element ... of a page in a database file. The default 2KB is appropriate for most applications. The element ... is much faster in writing data to a database, but true might be safer in production. By default, the recovery | |
SELECT clause (JPQL / Criteria API) the ability to use almost any valid JPQL expression in SELECT clauses. Specifying the required query results more precisely can improve performance and in some cases can also reduce the amount of Java ... the "SELECT *" expression (which is commonly used in SQL). Projection of Path Expressions JPQL | |
Setting and Tuning of JPA Queries (); These methods can be invoked in a single expression with getResultList since the setter methods in Query and TypedQuery support method chaining (by returning the query object ... of other EntityManager instances). JPA implementations can easily make uncommitted changes visible in simple JPA | |
JPA Query Structure (JPQL / Criteria). Having an SQL-like syntax in JPA queries is an important advantage because SQL is a very powerful query ... 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 | |
Shared (L2) Entity Cache. the broader scope of this cache makes it useful in applications that use many short term EntityManager instances. In addition to the EntityManager 's L1 cache and the EntityManagerFactory 's L2 ... client machines. Setting the Shared Cache The shared (L2) cache is configured in three scopes: Globally | |
WHERE clause (JPQL / Criteria API) The WHERE clause adds filtering capabilities to the FROM-SELECT structure. It is essential in any ... over all the Country objects in the database using the c range variable. Before passing these Country ... to function as a filter. The boolean expression in the WHERE clause, which is also known as | |
Database Connection using JPA connections during their lifetime. For instance, in a web application it is common to establish a separate ... a persistence unit name. To use ObjectDB embedded directly in your application (embedded mode ... ; "objectdb:my-db.tmp" ). To use client server mode, a URL in the format objectdb://host:port/path | |
Database Server ObjectDB Server is a tool that manages ObjectDB databases in a separate dedicated process, making these databases accessible to client applications in other processes including ones on other remote machines. The main benefits in running an ObjectDB server and using the client-server mode | |
Database Replication and Clustering, the same database is managed on multiple machines (nodes), possibly in different geographic locations. This could help in achieving high availability, fault tolerance and prompt disaster recovery. In ... / Write operations. The other (slave) nodes in the cluster manage identical copies of the same database | |
JPA Persistence Unit is optional when using ObjectDB, but required by JPA. persistence.xml Persistence units are defined in a persistence.xml file, which has to be located in the META-INF directory in the classpath ... to instantiate an EntityManagerFactory in JPA (as explained in the JPA Overview section) requires | |
Auto Generated Values for entity objects with no primary key fields defined (as explained in the previous section ). The same ... , as explained in the previous section . The Identity Strategy The IDENTITY strategy is very similar ... in one or more fields in one or more classes. The @SequenceGenerator annotation is used to define | |
Schema Update The configuration element supports renaming packages, classes and fields in ObjectDB databases as a complementary operation to renaming or moving these elements in the IDE during source code refactoring. Only these schema changes are specified in the configuration file. As explained in chapter 2 | |
JPA Metamodel API types (which are referred to as managed types) in the persistent object model ... classes: Set allEmbeddableTypes = metamodel. getEmbeddables (); If managed classes are not listed in ... . This includes all the types whose instances are already stored in the database. Three additional | |
Chapter 6 - Configuration: ... ... ... ... ... ... ... Each one of these seven configuration elements is explained in a separate section: This page explains how ObjectDB configuration works in general. The Configuration Path By default ... ) is derived from the location of the objectdb.jar file. It is defined as the path to the directory in | |
Online Backup while the database is offline (i.e. when it is not open in an ObjectDB server and not in use by any application), since an ObjectDB database is stored as an ordinary file in the file system. ObjectDB supports also online backup, for backing up an ObjectDB database while it is in use. This is useful | |
Detached Entity Objects Detached entity objects are objects in a special state in which they are not managed by any EntityManager but still represent objects in the database. Compared to managed entity objects, detached objects are limited in functionality: Many JPA methods do not accept detached objects (e.g. lock | |
ObjectDB License organization in one building, and in addition also covers installation of ObjectDB on: Home computers and laptops of employees in that workplace. Servers that are leased or rented from third party web ... applications that use ObjectDB are developed and managed only by employees in that workplace. Purchase | |
Updating JPA Entity Objects Modifying existing entity objects that are stored in the database is based on transparent ... Once an entity object is retrieved from the database (no matter which way) it can simply be modified in memory ... (); The entity object is physically updated in the database when the transaction is committed | |
ORDER BY clause (JPQL / Criteria API) include an ORDER BY clause produces results in an undefined and non-deterministic order. ORDER BY ... expressions in the SELECT clause are allowed in the ORDER BY clause. The following query, for example ... expressions can be used in the ORDER BY clause. Some JPA implementations are more restrictive. Path | |
Obtaining a JPA Database Connection In JPA a database connection is represented by the EntityManager interface. Therefore, in order ... to get an EntityManager instance. JPA requires the definition of a persistence unit in an XML file in order ... persistence unit in an XML file or you can simply provide the file path of the ObjectDB database | |
Deleting JPA Entity Objects method or implicitly as a result of a cascade operation. Explicit Remove In order to delete an object from the database it has to first be retrieved (no matter which way) and then in an active ... that are contained in the entity object are also deleted. If the transaction is rolled back and not | |
Running JPA Queries - for use when exactly one result object is expected. Query.getResultList - for general use in any ... - for use when exactly one result object is expected. TypedQuery.getResultList - for general use in any other case. In addition, the Query interface defines a method for running DELETE and UPDATE queries | |
ObjectDB Object Database Features Client-Server mode (TCP/IP). Secure Client-Server mode ( SSL over TCP/IP ). In process embedded database ... Database with built in support for JPA 2 . Java Persistence API (JPA) Most features of JPA 2 are supported. Support for remaining features is in progress - see issue tracking (requires login | |
General Settings and Logging: The path attribute specifies a directory in which the temporary files are generated. The $temp prefix ... in seconds, where 0 indicates never (no inactivity timeout). The inactivity timeout (when 0 ... in embedded mode. Specifying an inactivity timeout may solve firewall related issues. In general | |
Server Configuration is affected also by other elements in the configuration file, particularly the and the configuration elements ... . If another port is specified it also has to be specified by clients in the URL connection string when connecting to the database (as explained in the JPA Overview section in chapter 3). The max attribute | |
JPA Named Queries rather than embedding literals dynamically into the query string and results in more efficient queries. @NamedQuery ... whose name is "Country.findAll" that retrieves all the Country objects in the database ... to the same entity class requires wrapping them in a @NamedQueries annotation, as follows: @Entity | |
Defining a JPA Entity Class To be able to store Point objects in the database using JPA we need to define an entity class ... that is marked (annotated) as having the ability to represent objects in the database. Conceptually ... Entity Class The following Point class, which represents points in the plane, is marked as an entity | |
Criteria Query Selection and Results The JPA Criteria API interfaces in this group are used for setting the SELECT and ORDER BY clauses ... clause in a criteria query is represented by Selection : Because Selection is a super interface ... of Selection : See the SELECT in Criteria Queries section for more details and examples. ORDER BY | |
Criteria Query From Elements The interfaces in this group are in use for setting a criteria query FROM clause. Criteria Query Variables The FROM clause in JPA queries (as in SQL) defines the query variables. Query variables are represented in criteria queries by descendant interfaces of the From interface: Range | |
Database Transaction Replayer ObjectDB can record its internal engine operations in special binary recording (journal) files. Recording is enabled by default and can be disabled in the configuration . The ObjectDB Replayer tool ... default, the recording directory is generated in the directory that contains the database file | |
Database Doctor fresh database file and then copying all the recoverable data in the corrupted database file ... of the Operating System, Java or ObjectDB). Copying a database file while it is open and in use ... over FTP in ASCII mode (BINARY mode should be used). Deleting an ObjectDB database recovery file or | |
Step 7: Run the Spring Web App redirection to the controller path: Assuming that Tomcat 6.0 is installed as a server in your NetBeans ... F6 ): You can select the server in the Run category of the project properties window (right click ... ; jetty:run in the Goals field and click OK . Open your browser at http://localhost:8080 | |
JPA Tutorials tutorial demonstrates how to use ObjectDB and JPA in a console application: Quick Start with JPA Tutorial Only basic Java experience is required in order to follow this tutorial. Web Application Tutorials The web application tutorials demonstrate how to use JPA in web applications. Understanding | |
Step 2: Entity Class and Persistence Unit To store objects in an ObjectDB database using JPA we need to define an entity class: Open the [New Entity Class] dialog box, e.g. by right clicking the project node ( in the [Projects] window ... - use exactly that case sensitive package name. Click Next to create the new entity class. In | |
Step 2: Entity Class and Persistence Unit To store objects in an ObjectDB database using JPA we need to define an entity class: Right click the project node ( in the [Package Explorer] window), select New Source Folder ... right clicking the new source directory node ( in the [Package Explorer] window) and selecting  | |
Step 2: Entity Class and Persistence Unit To store objects in an ObjectDB database using JPA we need to define an entity class: Open the [New Entity Class] dialog box, e.g. by right clicking the project node ( in the [Projects] window ... entity class. In the [Provider and Database] step click Finish to generate a default persistence.xml | |
Step 2: Entity Class and Persistence Unit To store objects in an ObjectDB database using JPA we need to define an entity class: Open the [New Java Class] dialog box, e.g. by right clicking the project node ( in the [Package Explorer] window ... objects in the database was created in the project (under Java Resources: src guest). Use copy | |
Step 6: Set the Spring XML another xml configuration file. Open the web.xml file (under src/main/webapp/WEB-INF) in a text ... and then moving to the Source tab in the editor window). Use copy and paste to replace the default content ... to the Spring dispatcher servlet. Additional spring configuration is set in another XML file | |
Step 6: Set the Spring XML another xml configuration file. Open the web.xml file (under Web Pages WEB-INF) in a text editor (by right clicking and selecting Edit or by double click and then moving to the XML tab in the editor window ... configuration is set in another XML file (whose name is derived from the name of the Spring dispatcher | |
Step 7: Run the Spring Web App redirection to the controller path: If Tomcat 6.0 is installed as a server in your Eclipse - you can run the application now by right clicking the project node ( in the [Project Explorer] window ... ; jetty:run in the Goals field and click Run . Open your browser at http://localhost:8080/Guestbook | |
Step 4: Create an ObjectDB Data Set Queries against the database are represented in BIRT as data sets. To create the data set: Open the [New Data Set] dialog box by right clicking the Data Sets node in the [Data Explorer] window and selecting New Data Set . Select the data source that was created in the previous step (e.g. ObjectDB |