這個類只是提供了兩個字段,一個是"_id"一個是"_count",便于調用數據庫時導致拼寫錯誤,你也可以擴展它,或者自定義這么個,然后直接調用它的常量名,防止寫sql語句時把列名拼錯
/** 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";
}