DataSource Programming: Overview

Web Central data access layer implements declarative object-relational mapping, secure data access, and transparent data localization using metadata defined in Archibus data dictionary.

The DataSource is a programming interface to the Web Central data access layer. You can define the DataSource in an AXVW file, or create it programmatically in Java code. When you use the DataSource to read or write some data, it transparently performs Archibus-specific processing:

The following are general rules:

Data records loaded by the DataSource are represented as instances of the com.archibus.datasource.data.DataRecord class in the event-handler Java code.

DataRecord field values are Java objects whose type corresponds to the Archibus field type:

The diagram below shows how the data objects are interchanged between Web Central application layers.


The Archibus neutral format is defined as a String produced by the toString() method of a corresponding Java class, except for date/time types. The date and time neutral formats are defined in \WEB-INF\config\context\compatibility\afm-config.xml, in preferences\locale element. The time format is defined with three digits for milliseconds, so that precise time values would survive the roundtrip from the database to the client and back. This is especially important for time values used as primary keys. The date format is defined with four digits for year.