Code example for ContentValues

Methods: put

     * @param developerPayload the developer provided "payload" associated with 
     *     the order. 
    private void insertOrder(String orderId, String productId, PurchaseState state,
            long purchaseTime, String developerPayload) {
        ContentValues values = new ContentValues();
        values.put(HISTORY_ORDER_ID_COL, orderId);
        values.put(HISTORY_PRODUCT_ID_COL, productId);
        values.put(HISTORY_STATE_COL, state.ordinal());
        values.put(HISTORY_PURCHASE_TIME_COL, purchaseTime);
        values.put(HISTORY_DEVELOPER_PAYLOAD_COL, developerPayload);
        mDb.replace(PURCHASE_HISTORY_TABLE_NAME, null /* nullColumnHack */, values);
     * Updates the quantity of the given product to the given value. If the 
     * given value is zero, then the product is removed from the table. 
     * @param productId the product to update 
     * @param quantity the number of times the product has been purchased 
    private void updatePurchasedItem(String productId, int quantity) {