当前位置: 首页>>代码示例>>Java>>正文


Java Speakers类代码示例

本文整理汇总了Java中com.google.samples.apps.iosched.provider.ScheduleContract.Speakers的典型用法代码示例。如果您正苦于以下问题:Java Speakers类的具体用法?Java Speakers怎么用?Java Speakers使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Speakers类属于com.google.samples.apps.iosched.provider.ScheduleContract包,在下文中一共展示了Speakers类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateSessionSearchIndex

import com.google.samples.apps.iosched.provider.ScheduleContract.Speakers; //导入依赖的package包/类
/**
 * Updates the session search index. This should be done sparingly, as the queries are rather
 * complex.
 */
static void updateSessionSearchIndex(SQLiteDatabase db) {
    db.execSQL("DELETE FROM " + Tables.SESSIONS_SEARCH);

    db.execSQL("INSERT INTO " + Qualified.SESSIONS_SEARCH
            + " SELECT s." + Sessions.SESSION_ID + ",("

            // Full text body
            + Sessions.SESSION_TITLE + "||'; '||"
            + Sessions.SESSION_ABSTRACT + "||'; '||"
            + "IFNULL(GROUP_CONCAT(t." + Speakers.SPEAKER_NAME + ",' '),'')||'; '||"
            + "'')"

            + " FROM " + Tables.SESSIONS + " s "
            + " LEFT OUTER JOIN"

            // Subquery resulting in session_id, speaker_id, speaker_name
            + "(SELECT " + Sessions.SESSION_ID + "," + Qualified.SPEAKERS_SPEAKER_ID
            + "," + Speakers.SPEAKER_NAME
            + " FROM " + Tables.SESSIONS_SPEAKERS
            + " INNER JOIN " + Tables.SPEAKERS
            + " ON " + Qualified.SESSIONS_SPEAKERS_SPEAKER_ID + "="
            + Qualified.SPEAKERS_SPEAKER_ID
            + ") t"

            // Grand finale
            + " ON s." + Sessions.SESSION_ID + "=t." + Sessions.SESSION_ID
            + " GROUP BY s." + Sessions.SESSION_ID);
}
 
开发者ID:google,项目名称:iosched,代码行数:33,代码来源:ScheduleDatabase.java


注:本文中的com.google.samples.apps.iosched.provider.ScheduleContract.Speakers类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。