openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <>
Subject Re: What is the use of _impl and _fieldImpl in PCDataImpl class?
Date Tue, 15 May 2007 02:03:09 GMT
They're used to store the data from OpenJPAStateManager.getImplData()
and getImplData(int  field).

Those impl data slots, in turn, are available for use by StoreManager
implementations for random bits of per-field or per-instance state
that doesn't fit elsewhere but is useful for the StoreManager

This is similar to the 'intermediate data' concept, which you can see
in the get/set intermediate calls in that class.

OpenJPA uses intermediate data when it loads "extra" data from the
database that can be consumed later to materialize something, and impl
data for data that should be around for longer than just while the
field is not loaded.

For example, when OpenJPA loads an instance that has a -to-one
relation that is not eager, but not explicitly lazy, it will generate
SQL that selects the foreign key data for the relationship along with
the other primary-table data. That way, if you do lazily load the data
later, OpenJPA can go directly to cache, or at least bypass the join,
when loading the related data. That info is stored in an intermediate,
since either it or the relation itself can be loaded at any given

Based no code analysis, it looks like OpenJPA only uses impl data for
BLOBs currently.\


On 5/14/07, Daniel Lee <> wrote:
> Hi,
> I'm trying to understand OpenJPA open source code but having difficulties in
> figuring out the use of _impl and _fieldImpl fields in PCDataImpl.  Could
> someone help describe these 2 fields?  Many thanks in advance.
> Tsunfang

Patrick Linskey
202 669 5907

View raw message