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. SQLServer复制表

    把a的表结构复制到a1表,1=2不复制数据,如果要复制数据,就不要whereselect * into a1 from a where 1=2注意:这种方式不能复制主键.索引等信息如果要全部复制,只能 ...

  2. Codeforces 578B "Or" Game

    传送门 B. "Or" Game time limit per test 2 seconds memory limit per test 256 megabytes input s ...

  3. Opencv不用每次创建项目配置vs2010 vc++目录 库目录等项

    可以设置成编译器的环境配置,VS2010相对其他版本虽然去掉了编译器配置 但可以通过属性管理器配置编译器环境. 设置对应的vc++目录 链接器就可以了,这样就是对整个编译器配置了 下次就不用再配了.

  4. 升级OSX 10.9 Mavericks后,会导致Finder始终无响应的一个问题

    刚升了OS X 10.9 Mavericks ,发现Finder始终“未响应”(Application Not Responding),查了苹果官网论坛,国内的论坛,解决方法都无效,最后各种尝试,发现 ...

  5. 用 xampp 在 windows/Linux 下搭建代理服务器

    背景:学校上网开始收费,但实验室免费,由于宿舍和实验室都有ipv6,所以在实验室搭建代理服务器,让宿舍通过之上网. Windows下 两步: 1.编辑httpd.comf,去掉关于proxy的注释 L ...

  6. mysql大表如何优化

    作者:哈哈链接:http://www.zhihu.com/question/19719997/answer/81930332来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处 ...

  7. spring mvc实现修改+删除

    1.在userController中添加修改的方法 a.首先点击修改,我们一般是到修改界面,并且上面有值,并且有提交按钮 b.修改后,提交到查看的页面 //进入修改界面 @RequestMapping ...

  8. WebService学习总结(三)——使用JDK开发WebService

    一.WebService的开发手段 使用Java开发WebService时可以使用以下两种开发手段 1. 使用JDK开发(1.6及以上版本) 2.使用CXF框架开发(工作中) 二.使用JDK开发Web ...

  9. Swift翻译之-关于Swift

    IMPORTANT 重要的 This is a preliminary document for an API or technology in development. Apple is suppl ...

  10. Jni中C++和Java的参数传递 参数对照

    Jni中C++和Java的参数传递 如何使用JNI的一些基本方法和过程在网上多如牛毛,如果你对Jni不甚了解,不知道Jni是做什么的,如何建立一个基本的jni程序,或许可以参考下面下面这些文章:利用V ...