android provider 包下自带的BaseColumn

/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ package android.provider; public interface BaseColumns
{
/**
* The unique ID for a row.
* <P>Type: INTEGER (long)</P>
*/
public static final String _ID = "_id"; /**
* The count of rows in a directory.
* <P>Type: INTEGER</P>
*/
public static final String _COUNT = "_count";
}

基于basecolumn自定义自己表的Column

public static final class PhoneLabelColumns implements BaseColumns {
//必要的部分 ---begin-----
public static final String TABLE = "phone_label"; public static final String COUNT = "count";
public static final String NUMBER = "number";
public static final String LABEL = "label";
//必要的部分 ----end----- private static final String[] PROJECTION = {
_ID, //
NUMBER, //
LABEL, //
COUNT, //
}; public static int COLUMN_NUMBER = 1;
public static final int COLUMN_LABEL = 2;
public static final int COLUMN_COUNT = 3;
}

BaseColumns以及自定义Column的更多相关文章

  1. DbEntry.Net.v3.5 快速教程

    1.DbEntry 介绍 EN&Download——[DbEntry Framework下载][Tutorials For Version 3.5] CN&Summary:总体特性的介 ...

  2. easylui datagrid 动态生成列

    function load(sdate) { $.getJSON("workorder/statistics.do", { sdate : sdate+'-01' }, funct ...

  3. step_by_step_Angularjs-UI-Grid使用简介

    了解 Angularjs UI-Grid 起因:项目需要一个可以固定列和表头的表格,因为表格要显示很多列,当水平滚动条拉至后边时可能无法看到前边的某些信息. 以前在angularjs 1.x 中一直都 ...

  4. spring boot ----> jpa连接和操作mysql数据库

    环境: centos6.8,jdk1.8.0_172,maven3.5.4,vim,spring boot 1.5.13,mysql-5.7.23 1.引入jpa起步依赖和mysql驱动jar包 &l ...

  5. 同步锁源码分析(一)AbstractQueuedSynchronizer原理

    文章转载自 AbstractQueuedSynchronizer的介绍和原理分析 建议去看一下原文的评论,会有不少收获. 简介 AbstractQueuedSynchronizer 提供了一个基于FI ...

  6. 阿里内部分享:我们是如何?深度定制高性能MySQL的

    阿里云资深数据库工程师赵建伟在“云栖大会上海峰会”的分享.核心是阿里云的数据库服务和MySQL分支的深度定制实践分享. 阿里巴巴MySQL在全球都是有名的.不仅是因为其性能,还因为其是全世界少数拥有M ...

  7. pandas之groupby分组与pivot_table透视

    一.groupby 类似excel的数据透视表,一般是按照行进行分组,使用方法如下. df.groupby(by=None, axis=0, level=None, as_index=True, so ...

  8. 基于element-ui封装一个Table模板组件

    大家在做后台管理系统的时候,写的最多的可能就是表格页面了,一般分三部分:搜索功能区.表格内容区和分页器区.一般这些功能都是使用第三方组件库实现,比如说element-ui,或者vuetify.这两个组 ...

  9. 更改DEVExpress的Column的DisplayFormat为自定义的方法。

    更改DEVExpress的Column的DisplayFormat为自定义的方法. public partial class Form1 : XtraForm { public Form1() { I ...

随机推荐

  1. 【poj1012】 Joseph

    http://poj.org/problem?id=1012 (题目链接) 半年前的考试题..任然清晰的记得那次差10分就AK... 题意 约瑟夫环,有前k个好人,后k个坏人,要求使得后k个坏人先死的 ...

  2. android 读取sd卡中的图片

    一.获取读取SD卡的权限 <!--在SDCard中创建与删除文件权限  -->    <uses-permission android:name="android.perm ...

  3. linux在线学习

    https://www.shiyanlou.com/courses/running/291#note

  4. 代码重构-2 简单不变的 if else 用字典代替

    原代码 private string GetExDesc(string lotteryCode) { string exDesc = "抽奖"; if (lotteryCode.T ...

  5. 极大似然估计、贝叶斯估计、EM算法

    参考文献:http://blog.csdn.net/zouxy09/article/details/8537620 极大似然估计 已知样本满足某种概率分布,但是其中具体的参数不清楚,极大似然估计估计就 ...

  6. CSS小记

    1.元素居中 (1)水平居中:指定宽度,然后margin auto 即可 .middle{ max-width:400px; //width:400px;//当浏览器被缩小,宽度小于元素宽度时,元素会 ...

  7. GIT本地操作

    01. GIT简介(PPT) ================================================================================ 02. ...

  8. C# 检测操作系统是否空闲,实现系统空闲后做一些操作

    public class CheckComputerFreeState { /// <summary> /// 创建结构体用于返回捕获时间 /// </summary> [St ...

  9. WPF 窗口在右下角出现,识别分辨率

    直接上代码. Point brp = SystemParameters.WorkArea.BottomRight;//当前桌面右下角的位置

  10. margin标记可以带一个、二个、三个、四个参数,各有不同的含义。

    margin标记可以带一个.二个.三个.四个参数,各有不同的含义. margin: 20px;(上.下.左.右各20px.) margin: 20px 40px;(上.下20px:左.右40px.) ...