DataTable< DTOBJ extends DataTableObject > class

The DataTable class in the AJAPI encapsulates the synchronization of a data table.

Syntax

public abstract class DataTable< DTOBJ extends DataTableObject > extends AgentryJavaBackEndManagedObject

Members

All members of DataTable< DTOBJ extends DataTableObject >, including inherited members.

Variables
Modifier and Type Variable Description
protected SycloCalendar _clientLastDataUpdateTime Client's last data update date.
protected DataTableSession _session Storage for the session that was passed into the constructor.
Methods
Modifier and Type Method Description
public DataTable(DataTableSession, GregorianCalendar) Constructs a new DataTable.
public SycloCalendar getClientLastDataUpdateTime() Returns the client's last data update date and time.
public DataTableSession getSession() Returns the session data for this data table transmission.
public void initialize() This method is called after this object is constructed.
public abstract boolean isOutOfDate() Returns whether the client's data is out of date, based on the last update date passed in via the constructor.
public abstract Iterator< DTOBJ > iterator() Builds an Iterator object that will iterate through the DataTableObject objects that contain the rows for the data table.

Usage

When a data table is created in the Agentry Editor, a subclass is automatically defined that extends this class. The designer must implement this subclass in order to retrieve the data for the data table. Such an implementation should retrieve the data table's data from some source, construct a list or set of DataTableObject objects, and then return an iterator object that iterates over that list.

The DataTable class provides two main pieces of functionality. First, it determines if the data table needs to be reloaded and, second, it provides the factory method to construct a Iterator object to process the returned data.

The Agentry server will call the methods of this class in the following sequence:
  1. Constructor
  2. initialize()
  3. isOutOfDate()
  4. iterator() (only if isOutOfDate() returned true)

Note that for each client transmit, a new instance of this class is created by the Agentry server.