Android 数据库声明常量格式

不确实描述是否有误,只是觉得格式舒服

public final class TableContanst {
    
    public static final String STUDENT_TABLE = "student";
    
    public static final class StudentColumns {
        public static final String ID = "_id";
        public static final String NAME = "name";
        public static final String AGE = "age";
        public static final String SEX = "sex";
        public static final String LIKES = "likes";
        public static final String PHONE_NUMBER = "phone_number";
        public static final String TRAIN_DATE = "train_date";
        public static final String MODIFY_TIME = "modify_time";
    }
}

 

posted @ 2013-05-14 17:00  似水流云  阅读(283)  评论(0编辑  收藏  举报