ObjectDB Database Search

1-50 of 200 results

Posting Sample Code

( no persistence unit ). Keep the test as simple as possible - remove unnecessary code (but keep it complete

Eclipse Public License - v 1.0

code and documentation distributed under this Agreement, and b) in the case of each subsequent ... , if any, and such derivative works, in source code and object code form. b) Subject to the terms ... the Contribution of such Contributor, if any, in source code and object code form. This patent

JPA Class Enhancer

ObjectDB Enhancer is a post compilation tool that improves performance by modifying the byte code ... 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

SELECT clause (JPQL / Criteria API)

code needed. Notice that query results must always be specified explicitly - JPQL does not support ... cell contains the capital city name ( c.capital.name ). The following code demonstrates running ... = capitalName;   } } The following code demonstrates running this query: String queryStr

Database Management Settings

per database) requires specifying a valid activation code using an  element.  Activation codes ... the command line. Every machine requires a specific activation code , but multiple elements can be specified in the same configuration. This way the same configuration file (with multiple activation codes

Storing JPA Entity Objects

or implicitly as a result of a cascade operation. Explicit Persist The following code stores ... managed by the EntityManager ) or by commit . Referenced Embedded Objects The following code stores ... that the Address class in the code above is defined as an entity class. In this case, the referenced Address

Apache License, Version 2.0, January 2004

to software source code , documentation source, and configuration files. "Object" form shall mean any form ... to compiled object code , generated documentation, and conversions to other media types. "Work" shall ... , including but not limited to communication on electronic mailing lists, source code control systems

FROM clause (JPQL / Criteria API)

the following code : CriteriaQuery q = cb. createQuery (Country.class); Root c1 = q. from (Country.class ... a criteria query using the following code : CriteriaQuery q = cb. createQuery (Country.class); Root c = q ... Country c JOIN FETCH c.capital can be built as a criteria query using the following code

JPA Named Queries

named queries instead of dynamic queries may improve code  organization by separating the JPQL query strings from the Java code . It also enforces the use of query  parameters ... the above code ObjectDB will include MyEntity in searching named queries.

Online Backup

of the original database file. For example, backing up a  test.odb  database file using the code ... .getSingleResult(); The code  above, for instance, could create a backup at  c:\backup ... side. For example, in client-server mode the code  above could create the backup file on the server

Step 7: Run the Spring Web App

server and open the database file in ObjectDB Explorer : To enable on the fly enhancement ( weaving ... the server node and select Restart. When using GlassFish - on the fly enhancement ( weaving ) is automatically

Step 7: Run the Spring Web App

automatic enhancement ( weaving ) in Tomcat it has to be run with ObjectDB as a Java agent ( javaagent:objectdb.jar). When using GlassFish - on the fly enhancement ( weaving ) is automatically enabled

ObjectDB Object Database Features

fast - much faster than any other JPA solution. General Highly optimized code (as a result of many ...  from other managed objects. Transparent update - changes are detected automatically. Code

What are the main benefits of using ObjectDB?

. The ability to store ordinary objects in the database directly can simplify the code significantly. Less (and more simple) code to write, debug and test, as well as a much easier learning curve leads

JPA Query API

with an EntityManager (represented by em in the following code snippets), which serves as a factory ... . createQuery ("SELECT c FROM Country c", Country.class); In the above code , the same JPQL query

ObjectDB - JPA Object Database for Java

- start writing more effective database code using Java classes and objects! Try an ObjectDB / JPA

Database Explorer

defined methods can be supported by the Explorer only when the code of these methods is available using

JPA Lifecycle Events

(e.g. in the code above, Object can be replaced by a more specific type). The listener class

JPA Entity Fields

the @Transient annotation). Storing an entity object in the database does not store methods or code

Locking in JPA

a PESSIMISTIC_READ lock on that database object. For example, consider the following code fragment: em1

Retrieving JPA Entity Objects

. Given an EntityManager em , the following code fragment demonstrates the retrieval of an Employee

Is ObjectDB better than Object Relational Mapping (ORM)?

databases when necessary - with exactly the same code .

Eclipse Distribution License - v 1.0

Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice

CRUD Database Operations with JPA

Given an EntityManager , em , that represents a JPA connection to the object database, we can use it to store, retrieve, update and delete database objects. Storing New Entity Objects The following code fragment stores 1,000 Point  objects in the database: em. getTransaction (). begin

Defining a JPA Entity Class

Entity Classes Storing an entity object in the database does not store methods and code

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

Running JPA Queries

and the code is simple: Query query = em. createQuery ("SELECT COUNT(c) FROM Country c"); long countryCount

Logical Operators in JPQL and Criteria API

, cb. isTrue (isInUN), cb. isTrue (isInEU)); In the above  code non Predicate boolean expressions

Paths and Types in JPQL and Criteria API

. get ("capital"); Path captialName = capital. get ("name"); The path expressions in the above code

Literals in JPQL and Criteria Queries

of the entity class (e.g. Country). That is equivalent to Country.class in Java code . Notice

Setting and Tuning of JPA Queries

, JDOQL and ObjectDB extensions. Setting "JPQL" is useful to enforce portable JPA code by ObjectDB

[ODB1] Chapter 6 - Persistent Objects

the following code : pm.currentTransaction().begin(); Person person = new Person("George", "Bush"); Address ... code is legal and equivalent to the code above: Person person = new Person("George", "Bush"); Address ... ( ... ) ). Persistence By Reachability The Address instance in the code above also starts out as a transient object

[ODB1] Chapter 5 - JDO Connections

a PersistenceManagerFactory The following code demonstrates how to obtain a PersistenceManagerFactory instance: import java ... , and a value for that property. The two properties that are set in the code above are usually essential: javax ... .getPersistenceManagerFactory(properties); } finally { in.close(); } Notice that the code above may throw

Step 3: Add a Context Listener Class

code : package guest; import javax.persistence.*; import javax.servlet.*; @WebListener public class ... ().getAttribute("emf"); emf.close(); } } The code above: Invokes the Enhancer to enhance the entity class

Step 3: Add a Context Listener Class

of the new source file with the following code : package guest; import javax.persistence.*; import javax ... = (EntityManagerFactory)e.getServletContext().getAttribute("emf"); emf.close(); } } The code above: Invokes

[ODB1] Chapter 2 - A Quick Tour

a list of two strings "Hello World 0" and "Hello World 1". Program Source Code The program consists ... Source Code In addition to the two files from the previous section ( Person.java and package.jdo ... , is obtained using JDO portable code (slightly more complicated than the equivalent code in section 2

[ODB1] Chapter 3 - Persistent Classes

store methods and code . Only the state of the object as reflected by its persistent fields is stored ... the byte code of compiled classes. Classes to be enhanced must be located in class files and not in ... the byte code of these classes, and the result is classes that do implement the PersistenceCapable

[ODB1] Chapter 9 - ObjectDB Explorer

at the moment of query execution with Java code that implements the query. You can use that code to export JDOQL queries that you test in the Explorer into your Java code . Refreshing the Cache ... only when the code of these methods is available using the specified classpath. The "Server Configuration

[ODB1] Chapter 7 - JDOQL Queries

from this query: query.closeAll(); The complete code for printing all the people whose age is 18 or ... classes in queries, the user code must be available. In embedded mode, user classes are always available ... the field from the parameter. This code demonstrates the execution of a query with two different

Step 3: Add a Main Class

to create the class. Copy and paste the following code to the newly created class file: package

Step 2: Define a JPA Entity Class

the new class. Copy and paste the following code into the newly created Point class: package tutorial

Step 3: Add a Main Class

In this step we will add code to the Main class (that was generated with the project) in order to store Point objects in the database and then retrieve them from the database. Use copy and paste to replace the content of the Main class with the following content: package tutorial; import javax

Getting Started with JPA and Eclipse

well (dialog boxes and menus might look slightly different but the code would be the same). This tutorial consists of the following steps:

Getting Started with JPA and NetBeans

well (dialog boxes and menus might look slightly different but the code would be the same). This tutorial consists of the following steps:

Step 2: Define a JPA Entity Class

code : package guest; import java.io.Serializable; import java.sql.Date; import javax.persistence.Entity

Step 2: Define a JPA Entity Class

and paste to replace the new source file content with the following code : package guest; import java.io

Step 4: Add a Servlet Class

of the new source file with the following code : package guest; import java.io.IOException; import java

[ODB1] Chapter 1 - About ObjectDB

code . The JDO API is available today for most relational database systems (RDBMS), e.g. Oracle, IBM ... such mapping makes it possible to write clean Java code , but still requires some familiarity ... of Java objects in a database, visually, without writing a single line of code . Many object databases

[ODB1] Chapter 4 - JDO Metadata

element-type attributes because it is not specified in the Java code . For fields f0 and f1 ... ); The first argument to Utilities.startIndexBuilder( ... ) ( pm in the code

Which API should I use - JPA or JDO?

, tutorials and sample code . When to prefer JDO JDO might be preferred when portability to other object