superpettrackerdatabase.java

来自「Android从入门到精通」· Java 代码 · 共 36 行

JAVA
36
字号
package com.androidbook.SuperPetTracker;

import android.provider.BaseColumns;

//FYI: This is the same setup as PetTracker, same schema
public final class SuperPetTrackerDatabase {

    private SuperPetTrackerDatabase() {}
    
    // Pets table
    public static final class Pets implements BaseColumns {

        private Pets() {}
        
        public static final String PETS_TABLE_NAME = "table_pets";
        
        public static final String PET_NAME = "pet_name";
        public static final String PET_TYPE_ID = "pet_type_id";

        public static final String DEFAULT_SORT_ORDER = "pet_name ASC";
    }
    
    
    
    // Pet Type table
    public static final class PetType implements BaseColumns {

        private PetType() {}
        
        public static final String PETTYPE_TABLE_NAME = "table_pettypes";
        
        public static final String PET_TYPE_NAME = "pet_type";
        
        public static final String DEFAULT_SORT_ORDER = "pet_type ASC";
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?