|
Java Persistent Objects (JPOX) version 1.0 provides a fully-compliant implementation of the JDO 1.0 specification.
JPOX version 1.1 moves this forward being fully-compliant with the JDO 2.0 specification. This page defines the main changes
that you will see in JPOX 1.1 compared with 1.0 and how you can adapt your application to take advantage of the new features.
JDO 2.0 new features currently included in JPOX 1.1 :
- From JPOX 1.1.2 all JPOX jars are OSGi compliant bundles
- JDO 2.0 compliant Meta-Data definition. In JDO 1.0 (JPOX 1.0) many things were JPOX extensions to the JDO standard
Meta-Data. In JDO 2.0 the Meta-Data has been expanded significantly with the effect that many things that were JPOX
extensions are now 'standard'. The changes here are significant so please try out the
Meta-Data Migrator tool and refer to the
Meta-Data Reference Guide for details. If in doubt ask on the
Forum.
- JDO 2.0 O/R mapping : complete implementation of the object-relational mapping part of the 2.0 specification.
- JDO 2.0 identity generators : JPOX now provides the complete range of the JDO 2.0 identity generators -
identity, sequence, UUID, incremental, and factory types. Moreover, you can even plug in your own
custom generators!
- JDO 2.0 attach/detach : JPOX now provides a feature where you can detach an
object from the persistence framework, work on it in your application, and attach it again later. JPOX also allows
the user to request automatic detachment of their objects when commit() is called on the transaction. This means
that persistence becomes very transparent with no need to detach objects directly in that situation.
Will provide significant usability benefits to users.
- Queries : you can now define Named Queries in the Meta-Data for your
classes and call them via the PersistenceManager newNamedQuery method. This provides the convenience
of defining your queries up front and then just calling them. You still have the JDO 1.0 method of dynamically
creating your queries, just that this provides more flexibility.
- Queries : you can now specify whether the result of a JDOQL query will be "Unique"
(via the Query setUnique method). This means that the object returned from the query will be of the type of your
object, removing the need to extract it.
- Queries : you can now set the "Range" of results from a JDOQL query, so that
if a query returns 100 elements, you select a lower limit of 12 and upper limit of 20, and you get 8 elements returned.
- Queries : you can now specify JDOQL queries in a Single-String rather than
via mutator methods for the different parts of the query.
- Queries : you can now set the "Result Class" of results from a JDOQL/SQL query
- Object Identity : in JDO 1.0 you were forced to define your own primary key class whenever you wanted to use
application identity. With JDO 2.0 you can omit the specification where you have a single primary key field only,
and a SingleFieldIdentity will be provided for you, wrapping the single field.
- More control over the columns in the datastore, including the ability to define the nullability of the column and the
ability to specify your own indexes on columns and define unique columns. You can give columns a default value
for when they aren't always populated. You can control the primary-key of join tables. You can also control
foreign-key generation.
- Various convenience accessors have been added to the PersistenceManager (refreshAll(JDOException),
putUserObject(key,value), getUserObject(key), removeUserObject(key), getObjectsById)
and Transaction (setRollbackOnly, getRollbackOnly) to assist.
- JPOX 1.0 provided several things that were not part of JDO 1.0, but that have now been included in JDO 2.0. Things
like queries using SQL, and the various query methods on objects (containsKey,
containsValue on Maps, and various on Strings). Users are now free to use these without compromising the portability
of their application
- JDO 2.0 FetchPlan/FetchGroup : implementation of the ability to
control the fetched fields list.
- JDO 2.0 DependentField : implementation of the long awaited Cascade-Delete facility.
- Addition of the ability to use 1-N Foreign-Key unidirectional relationships
- Addition of the ability to use 1-N Join-Table bidirectional relationships
- Addition of the ability to use 1-1 bidirectional relationships with a single foreign key
- Addition of support for JDO 2.0 Embedded Objects
- Addition of support for JDO 2.0 Serialised Objects
- Addition of support for JDO 2.0 Secondary Tables
- JDO 2.0 Lifecycle Listeners allowing monitoring of events in the persistence process.
- JDO 2.0 Datastore Sequences allowing generation of sequence values.
- JDO 2.0 Compund Identity Relationships : implementation of an often used type
of relationships where the PK fields can include a persisted object.
In addition we also now have
- Enhanced support for persisting arrays. You can now persist a wider set of simple arrays, and you can persist them
either serialised or using a join table. You can now persist arrays of PersistenceCapable objects either serialised,
using a join table, or via a foreign-key link in the table of the PersistenceCapable object.
- Working Level 2 Cache, with plugins for Tangosol Coherence, EHCache, OSCache and SwarmCache
caching products
- The list of basic JDOQL supported methods has been significantly enhanced with
many JPOX extensions, such as the ability to refer to day/month/year of Date fields, or hour/minute/second of Time
fields, or use of log and exp methods and much more.
- Plugin for SpringFramework allowing closer coupling between Spring and JPOX.
- Eclipse Plugin allowing enhancement, schema generation and metadata generation.
- Changed to be runnable on JDK 1.3 onwards.
- Much more control over the output ResultSet from queries.
- Plugins for DBCP, C3P0, Proxool connection pooling
- Support for Java 5 enums via a plugin
- Support for Java 5 annotations (JDO2, or JPA) via a plugin
|