Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (日本語) » Mobile Link - サーバ管理 » Mobile Link サーバ API » Java による同期スクリプトの作成 » Java 用 Mobile Link サーバ API リファレンス » DownloadTableData インタフェース

 

getLastDownloadTime メソッド

構文
public java.sql.Timestamp getLastDownloadTime( )
備考

このテーブルの最終ダウンロード時刻を返します。これは、テーブルごとのダウンロード・イベントの多くで渡される最終ダウンロード時刻と同じです。

最終ダウンロード時刻は、特定の同期に対してテーブル・ダウンロード・データを生成する場合に便利です。

戻り値

このダウンロード・テーブルの最終ダウンロード時刻

参照

次の例は、最終ダウンロード時刻を使用した挿入を含むダウンロードでテーブルを設定するコードを抜粋したものです。この例は、_cc という DBConnectionContext インスタンスがあることを前提としています。

// The method used for the handle_DownloadData event
public void handleDownload() throws SQLException {

    // Get the DownloadData for the current synchronization.
    DownloadData my_dd = _cc.getDownloadData();
 
    // Get the DownloadTableData for the remoteOrders table.
    DownloadTableData td = my_dd.getDownloadTableByName("remoteOrders");
 
    // get the inserts given a last download time
    ResultSet inserts_rs  = makeInsertsFromTimestamp(td.getLastDownloadTime());
 
    // fill the DownloadTableData using the inserts resultset.
    setDownloadInsertsFromRS(td, inserts_rs);
    inserts_rs.close();

    // ... 
}