BaseColumns以及自定义Column
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的更多相关文章
- DbEntry.Net.v3.5 快速教程
1.DbEntry 介绍 EN&Download——[DbEntry Framework下载][Tutorials For Version 3.5] CN&Summary:总体特性的介 ...
- easylui datagrid 动态生成列
function load(sdate) { $.getJSON("workorder/statistics.do", { sdate : sdate+'-01' }, funct ...
- step_by_step_Angularjs-UI-Grid使用简介
了解 Angularjs UI-Grid 起因:项目需要一个可以固定列和表头的表格,因为表格要显示很多列,当水平滚动条拉至后边时可能无法看到前边的某些信息. 以前在angularjs 1.x 中一直都 ...
- 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 ...
- 同步锁源码分析(一)AbstractQueuedSynchronizer原理
文章转载自 AbstractQueuedSynchronizer的介绍和原理分析 建议去看一下原文的评论,会有不少收获. 简介 AbstractQueuedSynchronizer 提供了一个基于FI ...
- 阿里内部分享:我们是如何?深度定制高性能MySQL的
阿里云资深数据库工程师赵建伟在“云栖大会上海峰会”的分享.核心是阿里云的数据库服务和MySQL分支的深度定制实践分享. 阿里巴巴MySQL在全球都是有名的.不仅是因为其性能,还因为其是全世界少数拥有M ...
- pandas之groupby分组与pivot_table透视
一.groupby 类似excel的数据透视表,一般是按照行进行分组,使用方法如下. df.groupby(by=None, axis=0, level=None, as_index=True, so ...
- 基于element-ui封装一个Table模板组件
大家在做后台管理系统的时候,写的最多的可能就是表格页面了,一般分三部分:搜索功能区.表格内容区和分页器区.一般这些功能都是使用第三方组件库实现,比如说element-ui,或者vuetify.这两个组 ...
- 更改DEVExpress的Column的DisplayFormat为自定义的方法。
更改DEVExpress的Column的DisplayFormat为自定义的方法. public partial class Form1 : XtraForm { public Form1() { I ...
随机推荐
- java订电影票系统
public class Test { public static void main(String[] args) { BookTicket bookTicket = new BookTicket( ...
- Eclips将lib打入war中
在项目的属性, java build path -> Libraries -> Add library.. -> Web app Libraries .即可. 在属性中, Deplo ...
- 【转】KMP算法
转载请注明来源,并包含相关链接.http://www.cnblogs.com/yjiyjige/p/3263858.html 网上有很多讲解KMP算法的博客,我就不浪费时间再写一份了.直接推荐一个当初 ...
- linux经典命令学习
本文介绍Linux系统的若干经典命令的常用方法. (一)grep 主要用于搜索文件内容,查看是否跟要求的pattern相匹配. 1.grep -l 'boss' * 显示所有包含boss ...
- Max批量导出工具
Max批量导出工具 http://www.paulneale.com/scripts/batchItMax/batchItMax.htm Scripts Batch It Max: Batch It ...
- __stdcall,__cdecl,__fastcall的区别
__stdcall,__cdecl,__fastcall的区别 标签: dll编译器pascalclassimportinitialization 2009-12-09 15:07 10472人阅读 ...
- C++中构造函数详解及显式调用构造函数
C++构造函数详解及显式调用构造函数 c++类的构造函数详解 一. 构造函 ...
- Matlab的曲线拟合工具箱CFtool使用简介
http://phylab.fudan.edu.cn/doku.php?id=howtos:matlab:mt1-5 一. 单一变量的曲线逼近Matlab有一个功能强大的曲线拟合工具箱 cftool ...
- Linux 中的 wheel 组和 staff 组
wheel 组的概念 wheel 组的概念继承自 UNIX.当服务器需要进行一些日常系统管理员无法执行的高级维护时,往往就要用到 root 权限:而“wheel” 组就是一个包含这些特殊权限的用户池: ...
- [Effective JavaScript 笔记]第28条:不要信赖函数对象的toString方法
js函数有一个非凡的特性,即将其源代码重现为字符串的能力. (function(x){ return x+1 }).toString();//"function (x){ return x+ ...