Code example for ContentValues

Methods: putNull

0
    /** 
     * Ensure that our internal structure is ready for storing updates. 
     */ 
    private void ensureUpdate() { 
        if (mAfter == null) {
            mAfter = new ContentValues();
        } 
    } 
 
    public void put(String key, String value) {
        ensureUpdate(); 
        mAfter.put(key, value);
    } 
 
    public void put(String key, byte[] value) {
        ensureUpdate(); 
        mAfter.put(key, value);
    } 
 
    public void put(String key, int value) {
        ensureUpdate(); 
        mAfter.put(key, value);
    } 
 
    public void put(String key, long value) {
        ensureUpdate(); 
        mAfter.put(key, value);
    } 
 
    public void putNull(String key) {
        ensureUpdate(); 
        mAfter.putNull(key);
    } 
 
    public void copyStringFrom(ValuesDelta from, String key) {
        ensureUpdate(); 
        put(key, from.getAsString(key));