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;
}

最新文章

  1. 生成格式化的json
  2. UML类图五种关系与代码的对应关系
  3. Sea.js &amp; Require.js
  4. NetBeans平台中调用状态栏
  5. linux查看文件个数命令
  6. shell记录
  7. ios专题 - GCD(1)
  8. gridView自己定义做时间排版
  9. 仓储Repository
  10. Hbase FilterList使用总结
  11. sshpass做秘钥分发,ansible做自动化运维工具
  12. 自学OpenCV时遇到的一些错误(捂脸ing,当年确实好多不懂...)
  13. 软件测试_Fiddler抓包工具一
  14. C#语言中字段和属性相关知识剖析
  15. vb.bet 控件
  16. Jupyter Notebook入门教程
  17. AJPFX讲解外汇保证金交易的货币符号和外汇的报价方式
  18. 3D Math Keynote
  19. vue 权限管理深度探究
  20. javascript正则表达式 - 学习笔记

热门文章

  1. debian , ubuntu 截取下拉菜单
  2. DLUTOJ 1331 Maximum Sum
  3. [Angularjs]视图和路由(三)
  4. AspectJ AOP学习基础
  5. Java初学(四)
  6. 用开源Look&amp;Feel (Substance)写 漂亮的Swing应用程序
  7. Mongodb c#增删改查
  8. Java面试宝典2015版(绝对值得收藏超长版)
  9. NBUT1541 Rainwater 题解
  10. C++ Primer Plus第6版18个重点笔记