org.jSyncManager.API.Conduit.SatelliteForms
Class SFTable
java.lang.Objectorg.jSyncManager.API.Conduit.SatelliteForms.SFTable
public class SFTable
extends java.lang.Object
This class takes the AppBlock returned from a SatelliteForms table and will
produce a HashMap of data table columns (column name is the String key) of
the abstract
SFColumntype.
How to use Conduit.SatelliteForms:
As you should know from using jSyncManager, a Palm DB has an
"AppBlock" in addition to the data table. What SatelliteForms does
is to store the "column definitions" for the data table in the
AppBlock. Pass the AppBlock (as a jSyncManager DLPRecord type)
to the constructor for this class, and it will parse the structure,
allowing you to get at data from the corresponding data records.
See the documentation for the various methods on this class
to see how to get at data.
static int | SFBYTESIZE- The size of an SF byte (in bytes)
|
static int | SFCOLDEFSIZE- The size of a SF column definition structure
|
static int | SFDBVER- The SF data version stamp supported by this library
|
static int | SFINTSIZE- The size of an SF integer type (in bytes)
|
static int | SFLONGSIZE- The size of an SF long type (in bytes)
|
HashMap | getColumns()- This method returns a HashMap of data columns.
|
HashMap | getColumns(DLPRecord d)- Load the table's internal column set with data from the
DLPRecord passed in.
|
DLPRecord | getDataRecord()- Make a SatelliteForms record out of the current columns contents
of this class.
|
static void | main(String[] args)
|
void | setColumn(String key, String value)- Set the column named by "key" to the value specified in "value."
This method, the
getColumns method, and the
getDataRecord method provide all you need to read and
write data to/from a SatelliteForms application.
|
SFBYTESIZE
public static final int SFBYTESIZE
The size of an SF byte (in bytes)
SFCOLDEFSIZE
public static final int SFCOLDEFSIZE
The size of a SF column definition structure
SFDBVER
public static final int SFDBVER
The SF data version stamp supported by this library
SFINTSIZE
public static final int SFINTSIZE
The size of an SF integer type (in bytes)
SFLONGSIZE
public static final int SFLONGSIZE
The size of an SF long type (in bytes)
SFTable
public SFTable(DLPBlock d)
throws SFTableException Construct the SFTable from the AppBlock for the table. The DLPBlock
contains a description of the columns that are embedded in each record of
the database.
d - The AppBlock in raw form.
getColumns
public HashMap getColumns()
This method returns a HashMap of data columns. This version of the method
returns the map "as it is." Upon table initialization, this is the
columns as scanned from the constructor data. We don't recommend using
this one, since it is hard to know what data is stored in here.
getColumns
public HashMap getColumns(DLPRecord d)
Load the table's internal column set with data from the
DLPRecord passed in. So long as the DLPRecord is a data
record from the SatelliteForms table whose AppBlock was used
as this instance's constructor, the result is a HashMap
whose keys are the SatelliteForms column names and whose
values are
SFColumn subclasses that may be used
to get or set the data stored in that column.
getDataRecord
public DLPRecord getDataRecord()
throws SFTableException Make a SatelliteForms record out of the current columns contents
of this class. That DLPRecord is suitable for write back to the
Palm device with jSyncManager.
main
public static void main(String[] args)
setColumn
public void setColumn(String key,
String value)
throws SFTableException Set the column named by "key" to the value specified in "value."
This method, the getColumns method, and the
getDataRecord method provide all you need to read and
write data to/from a SatelliteForms application. The
getColumns method provides a means to read data.
This method provides the means to write data, and the
getDataRecord method provides a DLPRecord you can
send back to the Palm device with jSyncManager to save your
changes on the handheld.