亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? deliveryorder.java

?? J2ME MIDP_Example_Applications
?? JAVA
字號(hào):
// Copyright 2002 Nokia Corporation. 
// 
// THIS SOURCE CODE IS PROVIDED 'AS IS', WITH NO WARRANTIES WHATSOEVER, 
// EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY, FITNESS 
// FOR ANY PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE 
// OR TRADE PRACTICE, RELATING TO THE SOURCE CODE OR ANY WARRANTY OTHERWISE 
// ARISING OUT OF ANY PROPOSAL, SPECIFICATION, OR SAMPLE AND WITH NO 
// OBLIGATION OF NOKIA TO PROVIDE THE LICENSEE WITH ANY MAINTENANCE OR 
// SUPPORT. FURTHERMORE, NOKIA MAKES NO WARRANTY THAT EXERCISE OF THE 
// RIGHTS GRANTED HEREUNDER DOES NOT INFRINGE OR MAY NOT CAUSE INFRINGEMENT 
// OF ANY PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OWNED OR CONTROLLED 
// BY THIRD PARTIES 
// 
// Furthermore, information provided in this source code is preliminary, 
// and may be changed substantially prior to final release. Nokia Corporation 
// retains the right to make changes to this source code at 
// any time, without notice. This source code is provided for informational 
// purposes only. 
// 
// Nokia and Nokia Connecting People are registered trademarks of Nokia
// Corporation.
// Java and all Java-based marks are trademarks or registered trademarks of
// Sun Microsystems, Inc.
// Other product and company names mentioned herein may be trademarks or
// trade names of their respective owners.
// 
// A non-exclusive, non-transferable, worldwide, limited license is hereby 
// granted to the Licensee to download, print, reproduce and modify the 
// source code. The licensee has the right to market, sell, distribute and 
// make available the source code in original or modified form only when 
// incorporated into the programs developed by the Licensee. No other 
// license, express or implied, by estoppel or otherwise, to any other 
// intellectual property rights is granted herein.


package example.delivery;

import java.util.*;
import javax.microedition.rms.*;

// The DeliveryOrder class is a singleton which wraps the 'DeliverOrder'
// record store. There are six records in that record store.
// After the records are first created in a new 'DeliveryOrder'
// record store, no new records are ever added. So the recordId's
// always have known fixed values between 1 and 6, and never 7 .. MAXINT.
// See the recordId index values defined below.


public class DeliveryOrder
{
    // Allowed status values: OPENED ... SENDERDOESNOTEXIST.
    public  static final String OPENED = "Opened"; // server-side status value
    public  static final String NOJOB = "No job";
    public  static final String ASSIGNED = "Assigned";
    public  static final String PICKEDUP = "Picked up";
    public  static final String COURIERCANCELLED = "Courier cancelled";
    public  static final String RETURNEDTOSENDER = "Returned to sender";
    public  static final String COMPLETED = "Delivery completed";
    public  static final String SENDERDOESNOTEXIST = "Sender does not exist";

    // recordId's: ID ... NOTE
    private static final int ID = 1;
    private static final int STATUS = 2;
    private static final int DESCRIPTION = 3;
    private static final int SENDERADDRESS = 4;
    private static final int RECIPIENTADDRESS = 5;
    private static final int NOTE = 6;
    private static final byte[] empty = new byte[0];
    public  static final String RSNAME = "DeliveryOrder";
    private static RecordStore rs = null;
    private static DeliveryOrder instance = null;


    // The unique singleton instance of this class.

    static DeliveryOrder getInstance()
        throws RecordStoreException
    {
        if (null == instance)
        {
           instance = new DeliveryOrder();
        }
        return instance;
    }


    private DeliveryOrder()
        throws RecordStoreException
    {
        if (rs == null)
        {
            openRecordStore();
            if (rs.getNumRecords() == 0)
            {
                init();
            }
        }
    }


    static void openRecordStore()
        throws RecordStoreException
    {
        // At most, one rs should ever be open.
        if (rs == null)
        {
            rs = RecordStore.openRecordStore(RSNAME, true);
        }
    }


    static void closeRecordStore()
        throws RecordStoreException
    {
        if (rs != null)
        {
            rs.closeRecordStore();
            rs = null;
        }
    }


    // Method newRecordStore can also be used to delete all records.

    private void newRecordStore()
        throws RecordStoreException
    {
        // Note: To perform a deleteRecordStore, rs should first be closed as
        //       many times as it was opened. In this class, that's at most once.

        closeRecordStore();
        try
        {
            RecordStore.deleteRecordStore(RSNAME);
        }
        catch(RecordStoreNotFoundException e)
        {
            // It may not exist the first time newRecordStore is called.
        }
        openRecordStore();
    }


    void init()
        throws RecordStoreException
    {
        init("", NOJOB, "", "", "", "");
    }


    void init(String id,
              String status,
              String description,
              String senderAddress,
              String recipientAddress,
              String note)
        throws RecordStoreException
    {
        newRecordStore();
        addRecord(id);               // recordId ID (1)
        addRecord(status);           // recordId STATUS (2)
        addRecord(description);      // recordId DESCRIPTION (3)
        addRecord(senderAddress);    // recordId SENDERADDRESS (4)
        addRecord(recipientAddress); // recordId RECIPIENTADDRESS (5)
        addRecord(note);             // recordId NOTE (6)
    }


    boolean isStatusCourierModifyable()
        throws RecordStoreException
    {
        String status = getStatus();
        return (status.equals(DeliveryOrder.ASSIGNED) ||
                status.equals(DeliveryOrder.PICKEDUP));
    }


    String getId()
        throws RecordStoreException
    {
        return getRecord(ID);
    }


    void setId(String str)
        throws RecordStoreException
    {
        setRecord(ID, str);
    }


    String getStatus()
        throws RecordStoreException
    {
        byte[] barray = rs.getRecord(STATUS);
        if (barray == null || barray.length == 0)
        {
            return NOJOB;
        }
        else
        {
            return new String(barray);
        }
    }


    void setStatus(String str)
        throws SetStatusException, RecordStoreException
    {
        if (isValidStatus(str))
        {
            setRecord(STATUS, str);
        }
        else
        {
            SetStatusException excp =
                new SetStatusException("invalid status: '" + str + "'");
            throw excp;
        }
    }


    private boolean isValidStatus(String status)
    {
        boolean isValid = (status != null) &&
                          (status.equals(NOJOB) ||
                           status.equals(OPENED) ||
                           status.equals(ASSIGNED) ||
                           status.equals(PICKEDUP) ||
                           status.equals(COURIERCANCELLED) ||
                           status.equals(RETURNEDTOSENDER) ||
                           status.equals(SENDERDOESNOTEXIST) ||
                           status.equals(COMPLETED));
        return isValid;
    }


    String getDescription()
        throws RecordStoreException
    {
        return getRecord(DESCRIPTION);
    }


    void setDescription(String str)
        throws RecordStoreException
    {
        setRecord(DESCRIPTION, str);
    }


    String getRecipientAddress()
        throws RecordStoreException
    {
        return getRecord(RECIPIENTADDRESS);
    }


    void setRecipientAddress(String str)
        throws RecordStoreException
    {
        setRecord(RECIPIENTADDRESS, str);
    }


    String getSenderAddress()
        throws RecordStoreException
    {
        return getRecord(SENDERADDRESS);
    }


    void setSenderAddress(String str)
        throws RecordStoreException
    {
        setRecord(SENDERADDRESS, str);
    }


    String getNote()
        throws RecordStoreException
    {
        return getRecord(NOTE);
    }


    void setNote(String str)
        throws RecordStoreException
    {
        setRecord(NOTE, str);
    }


    private void addRecord(String str)
        throws RecordStoreException
    {
        if (str == null || str.length() == 0)
        {
            rs.addRecord(null, 0, 0);
        }
        else
        {
            rs.addRecord(str.getBytes(), 0, str.length());
        }
    }


    String getRecord(int ix)
        throws RecordStoreException
    {
        String str = null;
        byte[] barray = rs.getRecord(ix);
        if (barray == null || barray.length == 0)
        {
            str = "";
        }
        else
        {
            str = new String(barray);
        }
        return str;
    }


    private void setRecord(int ix, String str)
        throws RecordStoreException
    {
        if (str == null || str.length() == 0)
        {
            rs.setRecord(ix, empty, 0, 0);
        }
        else
        {
            rs.setRecord(ix, str.getBytes(), 0, str.length());
        }
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久亚洲午夜电影| 国产亚洲精品超碰| 国产成人亚洲精品青草天美 | 麻豆freexxxx性91精品| 偷偷要91色婷婷| 久久激五月天综合精品| 国产电影一区在线| 欧美中文字幕久久| 欧美videos大乳护士334| 中文av字幕一区| 一区二区三区资源| 国产主播一区二区三区| 不卡的av电影在线观看| 在线一区二区三区四区五区| 91精品国产高清一区二区三区| 2020国产精品自拍| 亚洲日本va午夜在线影院| 日本美女视频一区二区| 91视频在线看| 欧美成人女星排行榜| 亚洲欧美日韩系列| 国内成+人亚洲+欧美+综合在线 | 欧美日韩一区二区三区视频| 久久精品夜夜夜夜久久| 欧美bbbbb| 欧美视频一二三区| 《视频一区视频二区| 激情综合色播激情啊| 欧美日本在线视频| 亚洲男女一区二区三区| 岛国一区二区三区| 久久综合一区二区| 亚洲国产aⅴ成人精品无吗| 成人夜色视频网站在线观看| 日韩精品综合一本久道在线视频| 亚洲黄色性网站| 91视频免费播放| 国产拍欧美日韩视频二区| 精品午夜一区二区三区在线观看| 欧美福利电影网| 日韩在线一区二区三区| 欧美色视频在线观看| 亚洲资源在线观看| 色天使久久综合网天天| 亚洲影院理伦片| 日韩一区二区在线观看视频| 男女男精品网站| 精品国产乱码久久久久久久久 | 天堂影院一区二区| 91精品国产乱码| 国产一区二区三区在线看麻豆| 26uuu色噜噜精品一区| 久久国产精品99久久久久久老狼| 精品粉嫩超白一线天av| 国产91精品入口| 午夜伦欧美伦电影理论片| 欧美三级视频在线观看| 精品系列免费在线观看| 中文字幕国产一区二区| 欧美三级日韩在线| 激情综合色丁香一区二区| 国产精品成人免费| 在线91免费看| 国产风韵犹存在线视精品| 一级特黄大欧美久久久| 精品免费视频.| 欧洲一区二区三区在线| 国产精品亚洲综合一区在线观看| 亚洲码国产岛国毛片在线| 制服丝袜国产精品| 91原创在线视频| 国内一区二区视频| 亚洲成人av中文| 国产精品不卡一区二区三区| 欧美一区二区国产| 色婷婷香蕉在线一区二区| 国产一区美女在线| 手机精品视频在线观看| 亚洲视频中文字幕| 国产日韩欧美不卡在线| 欧美一级高清片在线观看| 在线精品视频免费观看| 岛国精品一区二区| 国产成人亚洲精品狼色在线| 日韩精品一二三| 亚洲成人自拍一区| 天天av天天翘天天综合网色鬼国产| 中文字幕一区二区三中文字幕| 国产日韩欧美a| 国产精品久久久久久久久免费桃花| 日韩欧美一区二区不卡| 欧美一区二区三区喷汁尤物| 在线视频亚洲一区| 欧美中文字幕一区二区三区 | 99在线精品观看| 国产一区二区三区四区五区美女 | 亚洲欧美日韩国产综合在线 | 综合色中文字幕| 亚洲精品成人a在线观看| 中文字幕亚洲在| 国产精品美女一区二区| 亚洲人成7777| 五月天欧美精品| 蜜桃av噜噜一区二区三区小说| 日韩 欧美一区二区三区| 狠狠网亚洲精品| 成人福利视频网站| 欧美少妇性性性| 色综合久久综合| 一本一道久久a久久精品| 色婷婷亚洲综合| 91精品国产全国免费观看| 欧美不卡一区二区三区| 久久综合色之久久综合| 国产精品丝袜黑色高跟| 亚洲伦理在线免费看| 天天做天天摸天天爽国产一区 | 日韩精品视频网| 国产成a人亚洲精品| 欧美天堂亚洲电影院在线播放| 26uuuu精品一区二区| 亚洲人午夜精品天堂一二香蕉| 亚洲第一在线综合网站| 国产福利精品一区| 欧美日韩一本到| 国产精品视频一二三区| 国产精品国产成人国产三级| 欧洲日韩一区二区三区| 欧美不卡一区二区三区| 亚洲色图欧美偷拍| 国产一区二区免费在线| 欧美老人xxxx18| 国产亚洲一本大道中文在线| 日韩国产欧美视频| 在线免费观看日本一区| 日本一区二区高清| 麻豆成人久久精品二区三区小说| 在线免费一区三区| 国产精品人成在线观看免费 | 三级欧美韩日大片在线看| 91在线视频官网| 国产精品国产三级国产普通话蜜臀| 久久精品国产免费看久久精品| 欧美亚洲高清一区| 亚洲韩国一区二区三区| 99麻豆久久久国产精品免费优播| 欧美三级日韩三级国产三级| 蜜乳av一区二区| 欧美色图在线观看| 亚洲国产精品天堂| 99久久伊人精品| 一区二区三区 在线观看视频| 成人激情免费电影网址| 久久久久久久免费视频了| 免费不卡在线视频| 精品国产乱码久久久久久蜜臀| 久久99精品久久久久久| 欧美α欧美αv大片| 国产乱对白刺激视频不卡| 日本一区二区三区四区在线视频 | 亚洲日本护士毛茸茸| 91成人国产精品| 奇米888四色在线精品| 久久久久久久精| 色婷婷综合久久久久中文一区二区| 婷婷综合五月天| 日本一区二区三区久久久久久久久不| 成人激情黄色小说| 亚洲高清久久久| 国产亲近乱来精品视频| 欧美日韩一区不卡| 国产一区二区成人久久免费影院| 国产精品久久国产精麻豆99网站 | 欧美日韩一区二区三区视频 | 欧美性生交片4| 久久99最新地址| 亚洲色图欧洲色图| 欧美成人a视频| 99久久久久久| 久久精品国产精品亚洲综合| 久久久久97国产精华液好用吗| 在线观看日韩一区| 国产成人综合网| 舔着乳尖日韩一区| 中文字幕欧美一区| 精品美女在线播放| 欧美亚洲一区三区| 成人天堂资源www在线| 日本免费新一区视频| 亚洲精品视频在线观看免费 | 成人app在线| 亚洲123区在线观看| 欧美高清在线精品一区| 一本色道亚洲精品aⅴ| 精品一区精品二区高清| 日本成人中文字幕| 久久黄色级2电影| 国产.欧美.日韩| 色婷婷一区二区| 日韩亚洲欧美综合|