Code example for ContentValues

Methods: containsKeygetAsLong

0
        } 
 
        public Long getAsLong(String key) {
            if (mAfter != null && mAfter.containsKey(key)) {
                return mAfter.getAsLong(key);
            } else if (mBefore != null && mBefore.containsKey(key)) {
                return mBefore.getAsLong(key);
            } else { 
                return null; 
            } 
        } 
 
        public Integer getAsInteger(String key) {
            return getAsInteger(key, null);
        } 
 
        public Integer getAsInteger(String key, Integer defaultValue) {
            if (mAfter != null && mAfter.containsKey(key)) {
                return mAfter.getAsInteger(key);
            } else if (mBefore != null && mBefore.containsKey(key)) {
                return mBefore.getAsInteger(key);
            } else { 
                return defaultValue;
            } 
        } 
 
        public String getMimetype() {
            return getAsString(Data.MIMETYPE);
        } 
 
        public Long getId() {
            return getAsLong(mIdColumn);
        } 
 
        public void setIdColumn(String idColumn) {
            mIdColumn = idColumn;
        } 
 
        public boolean isPrimary() { 
            final Long isPrimary = getAsLong(Data.IS_PRIMARY);
            return isPrimary == null ? false : isPrimary != 0;
        } 
 
        public void setFromTemplate(boolean isFromTemplate) {
            mFromTemplate = isFromTemplate;
        } 
 
        public boolean isFromTemplate() { 
            return mFromTemplate;
        } 
 
        public boolean isSuperPrimary() { 
            final Long isSuperPrimary = getAsLong(Data.IS_SUPER_PRIMARY);
            return isSuperPrimary == null ? false : isSuperPrimary != 0;
        } 
 
        public boolean beforeExists() { 
            return (mBefore != null && mBefore.containsKey(mIdColumn));
        } 
 
        public boolean isVisible() { 
            // When "after" is present, then visible 
            return (mAfter != null);