See the WebSphere eXtreme Scale Wiki for links to eXtreme Scale Version 7.0 documentation.
If you log in
with your developerWorks ID, you can leave comments and feedback for the development team.
The EntityManager APIs use the existing Map based infrastructure underneath. It converts objects to Entities before storing them in the Map. An entity has a key tuple and a value tuple. A tuple is simply an array of primitive types.
With this new EntityManager feature introduced in the WebSphere Extended Deployment Version 6.1, a map can contain either POJOs or entities. In stream query world, a view map always stores entities, and a stream map can contain either POJOs or entities.
When configuring a stream or view, you can provide a value class. The reason why a value class is required for a stream map or view map is to know how to convert object attributes to the values of SQL columns, or vice versa.
A view map always stores entities because of the format nature of query results. Query results are in tuple format, so it makes the most sense to store them as entities to save conversion costs. You can always use Entity Manager APIs to project tuples into objects. See Introduction to the EntityManager API for more details.
Since view results are always stored as entities, you could utilize the entity configuration or annotations (for JDK 5.0) to configure stream query views. Refer to Stream query XML configurations and Stream query annotations for more details.
However, a stream map could store either POJOs or entities. As stated previously, the reason why a value class is required is to know how to convert object attributes to the values of SQL columns, or vice versa. Therefore, when the stream map stores entities, you could utilize the entity configuration to transform between the object attributes and column values.
Refer to Stream query XML configurations and Stream query annotations for information on how view entity metadata is used to configure stream query views.
© Copyright IBM Corporation 2007,2009. All Rights Reserved.