Java Data Sources > Overview of Java Data Sources > The Server/Java Data-Source Mapping > The Mechanism
 
The Mechanism
The mechanism of the Server/JavaTM data-source mapping is illustrated in Figure 17.2 and explained on the following pages.
Figure 17.2    Server/Java Mapping: Table Data Source Example
This diagram shows three distinct modules:
*The generic representation protocol
*Server/Java data-source mapping
*Java Swing / Rogue Wave JViews classes
The Generic Representation Protocol
Rogue Wave Server provides the connection to the object server by supplying the generic object model and representation model (classes ilog.server.jcomp.Representation and ilog.server.jcomp.RpObject).
The Server/Java Data Source Mapping
The Java Data Sources library (or jsds for short) builds its representation model on the two classes ilog.server.jcomp.Representation and ilog.server.jcomp.RpObject. The mapping offered by the jsds library is based on two categories of components:
Swing Components
*lists (package ilog.server.jsds.list).
*tables (package ilog.server.jsds.table),
*trees (package ilog.server.jsds.tree),
Rogue Wave JViews Components
*Rogue Wave® JViews Grapher (package ilog.server.jsds.graph),
*Gantt charts (package ilog.server.jsds.gantt),
*SDM (Stylable Data Mapper) components (package ilog.server.jsds.sdm).
All the classes from these packages derive from the class ilog.server.jcomp.RpObject or ilog.server.jsds.IlsDataSource. A data source object provides an easy way to communicate with representation objects such as IlsRpTable and IlsRpRow objects.
The Java Swing / Rogue Wave JViews Classes
Swing classes such as JTable or JTree, and JViews classes such as ilog.views.IlvGrapher and ilog.views.gantt..IlvGanttChart, together with the ilog.server.jsds.adapter and ilog.server.jsds.swing packages, provide graphical interfaces to display representations of Rogue Wave Server objects.
The purpose of the Server/Java data-source classes is to interface server objects with Java graphical objects such as instances of Java Swing or Rogue Wave JViews objects. Thus, server objects will be represented by rows in tables, nodes in trees, nodes and links in graphs, text in text fields, etc.
The package ilog.server.jsds.adapter provides basic adapter classes to trap any event that can affect the content of a data source (creation, deletion, or modification). You have different ways to extend these classes to fit your requirements. You can:
*subclass the adapter,
*use a predefined adapter strategy, or
*create you own adapter strategies.
Using adapter strategies is a smart way to dynamically extend adapters and reuse these extensions only when they are required.
For example, if you need a table adapter with a buffered line edition, but you do not want to manage line colors, you can use the class IlsTableDSJTableAdapter with the classIlsTableDS2JTableBufferedRowStrategy, but not the class IlsTableDS2JTableCellRendererStrategy. Combining different strategies offers you a powerful and flexible way of configuring your adapters.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.