The data view is a means of receiving and supplying data for client-facing components, such as web pages or web services.
In other words, a data-view allows information to be moved intelligently between processing tiers, mapping between what the user wants to see and what the data store holds.
A data-view can be inbound (for client input), outbound (present fields read from persistent storage) and combinations of in- and outbound.
The data-view also has data aggregation and manipulation features:
there can be an underlying entity (the 'initial entity') and attributes of entities related to that can be included in the data-view
virtual (calculated) fields can be presented
attributes in persistent storage can be calculated from input fields.
Data-views can be updated.
In the standard implementation, data-views are read by direct SQL calls (to optimise performance) with the SQL being build automatically,
but updated via entity beans or their .NET equivalent (to reuse validation and entity processing logic).
Validation can be specified on the data view or its fields, and this is additional to the validation from information tied to persistent storage.
Data-views are typically processed by one or more session bean methods.
Therefore, the data-view is a way of specifying the data required for a UML use case and how that is mapped onto the data tier.
Data views can be related to a number of other data views.
For example, an Order/OrderLine screen could require a set of information for the Order and a related set of information for the OrderLine.
This is represented as a relationship between data-views, in just the same way that entities or data-base tables are related.
The data-view pattern is a superset of the 'transfer object assembler' Core J2EE pattern.
A value object (also known as the transfer object) is automatically generated for the data-view.
Dataview uses "select for update", locking the row for the transaction.
Columnar locking (ie. select for update of ... ) is unavailable.
Not for use on linked dataviews.
Type
boolean
Default
false
14.16.2 Property 'viewIsReferencedByPage'
Description
Set this flag to 'true' by patterns to note that the view is referenced by a page.
Type
boolean
Default
false
Copyright (c) 2001-2008 New Technology/enterprise Ltd.