Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3



These areas are similar to:

  • Hibernate UserTypes - heck we could reuse the hibernate staging area
  • The AttributeReader design, there was a clean separation between the AttributeReader who read from the file, and the FeatureReader who combined the results into a Feature
  • Andrea has talked about populating a cache either "by rows" (ie entire features at a time) or "by columns" ie only grab the attributes needed for the current query

Hibernate and UserTypes

For background (before we talk), have a look at how hibernate hoists stuff into it's a staging area (basically raw objects) before using those objects to create a POJO and populate its fields.

If you look at the hibernate "UserType" you can just see how it is designed as a callback object for the staging area. The "data accessors" would be punting up raw arrays of primitive objects, and this UserType part would be processing them into good objects for the cache.

We have implemented a UserType for JTS Geometry previously.


  • can someone find me the hibernate cache information? They use several but ship with one ...
  • can someone find me the name of the staging area in hibernate

The BIG Idea


So here is the Workflow:

  • FILE or DATABASE FORMAT -> primitives -> USERTYPES -> objects -> STAGING AREA -> features
No Format
Feature (id| geom, name, age, range )

ID | Geom  | Attrb1 | Attrb2 | Attrb3
 1 | Point | john   | 24     | Range

line | Geom  | A1     | A2     | A3 | A4 |
   1 | bytes |"john  "|"    24"| 1  | 3  |