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


Java SqlUtils类代码示例

本文整理汇总了Java中de.greenrobot.dao.internal.SqlUtils的典型用法代码示例。如果您正苦于以下问题:Java SqlUtils类的具体用法?Java SqlUtils怎么用?Java SqlUtils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getSelectDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
protected String getSelectDeep() {
    if (selectDeep == null) {
        StringBuilder builder = new StringBuilder("SELECT ");
        SqlUtils.appendColumns(builder, "T", getAllColumns());
        builder.append(',');
        SqlUtils.appendColumns(builder, "T0", daoSession.getBUserDao().getAllColumns());
        builder.append(',');
        SqlUtils.appendColumns(builder, "T1", daoSession.getBThreadDao().getAllColumns());
        builder.append(" FROM BMESSAGE T");
        builder.append(" LEFT JOIN BUSER T0 ON T.'SENDER'=T0.'_id'");
        builder.append(" LEFT JOIN BTHREAD T1 ON T.'THREAD_DAO_ID'=T1.'_id'");
        builder.append(' ');
        selectDeep = builder.toString();
    }
    return selectDeep;
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:17,代码来源:BMessageDao.java

示例2: loadDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
public BMessage loadDeep(Long key) {
    assertSinglePk();
    if (key == null) {
        return null;
    }

    StringBuilder builder = new StringBuilder(getSelectDeep());
    builder.append("WHERE ");
    SqlUtils.appendColumnsEqValue(builder, "T", getPkColumns());
    String sql = builder.toString();
    
    String[] keyArray = new String[] { key.toString() };
    Cursor cursor = db.rawQuery(sql, keyArray);
    
    try {
        boolean available = cursor.moveToFirst();
        if (!available) {
            return null;
        } else if (!cursor.isLast()) {
            throw new IllegalStateException("Expected unique result, but count was " + cursor.getCount());
        }
        return loadCurrentDeep(cursor, true);
    } finally {
        cursor.close();
    }
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:27,代码来源:BMessageDao.java

示例3: loadDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
public BThread loadDeep(Long key) {
    assertSinglePk();
    if (key == null) {
        return null;
    }

    StringBuilder builder = new StringBuilder(getSelectDeep());
    builder.append("WHERE ");
    SqlUtils.appendColumnsEqValue(builder, "T", getPkColumns());
    String sql = builder.toString();
    
    String[] keyArray = new String[] { key.toString() };
    Cursor cursor = db.rawQuery(sql, keyArray);
    
    try {
        boolean available = cursor.moveToFirst();
        if (!available) {
            return null;
        } else if (!cursor.isLast()) {
            throw new IllegalStateException("Expected unique result, but count was " + cursor.getCount());
        }
        return loadCurrentDeep(cursor, true);
    } finally {
        cursor.close();
    }
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:27,代码来源:BThreadDao.java

示例4: loadDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
public BLinkedAccount loadDeep(Long key) {
    assertSinglePk();
    if (key == null) {
        return null;
    }

    StringBuilder builder = new StringBuilder(getSelectDeep());
    builder.append("WHERE ");
    SqlUtils.appendColumnsEqValue(builder, "T", getPkColumns());
    String sql = builder.toString();
    
    String[] keyArray = new String[] { key.toString() };
    Cursor cursor = db.rawQuery(sql, keyArray);
    
    try {
        boolean available = cursor.moveToFirst();
        if (!available) {
            return null;
        } else if (!cursor.isLast()) {
            throw new IllegalStateException("Expected unique result, but count was " + cursor.getCount());
        }
        return loadCurrentDeep(cursor, true);
    } finally {
        cursor.close();
    }
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:27,代码来源:BLinkedAccountDao.java

示例5: getSelectDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
protected String getSelectDeep() {
    if (selectDeep == null) {
        StringBuilder builder = new StringBuilder("SELECT ");
        SqlUtils.appendColumns(builder, "T", getAllColumns());
        builder.append(',');
        SqlUtils.appendColumns(builder, "T0", daoSession.getBUserDao().getAllColumns());
        builder.append(',');
        SqlUtils.appendColumns(builder, "T1", daoSession.getBUserDao().getAllColumns());
        builder.append(" FROM CONTACT_LINK T");
        builder.append(" LEFT JOIN BUSER T0 ON T.'BUSER_DAO_ID'=T0.'_id'");
        builder.append(" LEFT JOIN BUSER T1 ON T.'LINK_OWNER_BUSER_DAO_ID'=T1.'_id'");
        builder.append(' ');
        selectDeep = builder.toString();
    }
    return selectDeep;
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:17,代码来源:ContactLinkDao.java

示例6: loadDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
public ContactLink loadDeep(Long key) {
    assertSinglePk();
    if (key == null) {
        return null;
    }

    StringBuilder builder = new StringBuilder(getSelectDeep());
    builder.append("WHERE ");
    SqlUtils.appendColumnsEqValue(builder, "T", getPkColumns());
    String sql = builder.toString();
    
    String[] keyArray = new String[] { key.toString() };
    Cursor cursor = db.rawQuery(sql, keyArray);
    
    try {
        boolean available = cursor.moveToFirst();
        if (!available) {
            return null;
        } else if (!cursor.isLast()) {
            throw new IllegalStateException("Expected unique result, but count was " + cursor.getCount());
        }
        return loadCurrentDeep(cursor, true);
    } finally {
        cursor.close();
    }
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:27,代码来源:ContactLinkDao.java

示例7: getSelectDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
protected String getSelectDeep() {
    if (selectDeep == null) {
        StringBuilder builder = new StringBuilder("SELECT ");
        SqlUtils.appendColumns(builder, "T", getAllColumns());
        builder.append(',');
        SqlUtils.appendColumns(builder, "T0", daoSession.getBUserDao().getAllColumns());
        builder.append(',');
        SqlUtils.appendColumns(builder, "T1", daoSession.getBThreadDao().getAllColumns());
        builder.append(" FROM USER_THREAD_LINK T");
        builder.append(" LEFT JOIN BUSER T0 ON T.'BUSER_DAO_ID'=T0.'_id'");
        builder.append(" LEFT JOIN BTHREAD T1 ON T.'BTHREAD_DAO_ID'=T1.'_id'");
        builder.append(' ');
        selectDeep = builder.toString();
    }
    return selectDeep;
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:17,代码来源:UserThreadLinkDao.java

示例8: loadDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
public UserThreadLink loadDeep(Long key) {
    assertSinglePk();
    if (key == null) {
        return null;
    }

    StringBuilder builder = new StringBuilder(getSelectDeep());
    builder.append("WHERE ");
    SqlUtils.appendColumnsEqValue(builder, "T", getPkColumns());
    String sql = builder.toString();
    
    String[] keyArray = new String[] { key.toString() };
    Cursor cursor = db.rawQuery(sql, keyArray);
    
    try {
        boolean available = cursor.moveToFirst();
        if (!available) {
            return null;
        } else if (!cursor.isLast()) {
            throw new IllegalStateException("Expected unique result, but count was " + cursor.getCount());
        }
        return loadCurrentDeep(cursor, true);
    } finally {
        cursor.close();
    }
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:27,代码来源:UserThreadLinkDao.java

示例9: getSelectDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
protected String getSelectDeep() {
    if (selectDeep == null) {
        StringBuilder builder = new StringBuilder("SELECT ");
        SqlUtils.appendColumns(builder, "T", getAllColumns());
        builder.append(',');
        SqlUtils.appendColumns(builder, "T0", daoSession.getBUserDao().getAllColumns());
        builder.append(',');
        SqlUtils.appendColumns(builder, "T1", daoSession.getBUserDao().getAllColumns());
        builder.append(" FROM FOLLOWER_LINK T");
        builder.append(" LEFT JOIN BUSER T0 ON T.'BUSER_DAO_ID'=T0.'_id'");
        builder.append(" LEFT JOIN BUSER T1 ON T.'LINK_OWNER_BUSER_DAO_ID'=T1.'_id'");
        builder.append(' ');
        selectDeep = builder.toString();
    }
    return selectDeep;
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:17,代码来源:FollowerLinkDao.java

示例10: loadDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
public FollowerLink loadDeep(Long key) {
    assertSinglePk();
    if (key == null) {
        return null;
    }

    StringBuilder builder = new StringBuilder(getSelectDeep());
    builder.append("WHERE ");
    SqlUtils.appendColumnsEqValue(builder, "T", getPkColumns());
    String sql = builder.toString();
    
    String[] keyArray = new String[] { key.toString() };
    Cursor cursor = db.rawQuery(sql, keyArray);
    
    try {
        boolean available = cursor.moveToFirst();
        if (!available) {
            return null;
        } else if (!cursor.isLast()) {
            throw new IllegalStateException("Expected unique result, but count was " + cursor.getCount());
        }
        return loadCurrentDeep(cursor, true);
    } finally {
        cursor.close();
    }
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:27,代码来源:FollowerLinkDao.java

示例11: loadDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
public operators loadDeep(Long key) {
    assertSinglePk();
    if (key == null) {
        return null;
    }

    StringBuilder builder = new StringBuilder(getSelectDeep());
    builder.append("WHERE ");
    SqlUtils.appendColumnsEqValue(builder, "T", getPkColumns());
    String sql = builder.toString();
    
    String[] keyArray = new String[] { key.toString() };
    Cursor cursor = db.rawQuery(sql, keyArray);
    
    try {
        boolean available = cursor.moveToFirst();
        if (!available) {
            return null;
        } else if (!cursor.isLast()) {
            throw new IllegalStateException("Expected unique result, but count was " + cursor.getCount());
        }
        return loadCurrentDeep(cursor, true);
    } finally {
        cursor.close();
    }
}
 
开发者ID:cowthan,项目名称:AyoRxJava,代码行数:27,代码来源:operatorsDao.java

示例12: loadDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
public alloperators loadDeep(Long key) {
    assertSinglePk();
    if (key == null) {
        return null;
    }

    StringBuilder builder = new StringBuilder(getSelectDeep());
    builder.append("WHERE ");
    SqlUtils.appendColumnsEqValue(builder, "T", getPkColumns());
    String sql = builder.toString();
    
    String[] keyArray = new String[] { key.toString() };
    Cursor cursor = db.rawQuery(sql, keyArray);
    
    try {
        boolean available = cursor.moveToFirst();
        if (!available) {
            return null;
        } else if (!cursor.isLast()) {
            throw new IllegalStateException("Expected unique result, but count was " + cursor.getCount());
        }
        return loadCurrentDeep(cursor, true);
    } finally {
        cursor.close();
    }
}
 
开发者ID:cowthan,项目名称:AyoRxJava,代码行数:27,代码来源:alloperatorsDao.java

示例13: loadDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
public User loadDeep(Long key) {
    assertSinglePk();
    if (key == null) {
        return null;
    }

    StringBuilder builder = new StringBuilder(getSelectDeep());
    builder.append("WHERE ");
    SqlUtils.appendColumnsEqValue(builder, "T", getPkColumns());
    String sql = builder.toString();
    
    String[] keyArray = new String[] { key.toString() };
    Cursor cursor = db.rawQuery(sql, keyArray);
    
    try {
        boolean available = cursor.moveToFirst();
        if (!available) {
            return null;
        } else if (!cursor.isLast()) {
            throw new IllegalStateException("Expected unique result, but count was " + cursor.getCount());
        }
        return loadCurrentDeep(cursor, true);
    } finally {
        cursor.close();
    }
}
 
开发者ID:Kamshak,项目名称:BrainPhaser,代码行数:27,代码来源:UserDao.java

示例14: loadDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
public Completion loadDeep(Long key) {
    assertSinglePk();
    if (key == null) {
        return null;
    }

    StringBuilder builder = new StringBuilder(getSelectDeep());
    builder.append("WHERE ");
    SqlUtils.appendColumnsEqValue(builder, "T", getPkColumns());
    String sql = builder.toString();
    
    String[] keyArray = new String[] { key.toString() };
    Cursor cursor = db.rawQuery(sql, keyArray);
    
    try {
        boolean available = cursor.moveToFirst();
        if (!available) {
            return null;
        } else if (!cursor.isLast()) {
            throw new IllegalStateException("Expected unique result, but count was " + cursor.getCount());
        }
        return loadCurrentDeep(cursor, true);
    } finally {
        cursor.close();
    }
}
 
开发者ID:Kamshak,项目名称:BrainPhaser,代码行数:27,代码来源:CompletionDao.java

示例15: loadDeep

import de.greenrobot.dao.internal.SqlUtils; //导入依赖的package包/类
public Statistics loadDeep(Long key) {
    assertSinglePk();
    if (key == null) {
        return null;
    }

    StringBuilder builder = new StringBuilder(getSelectDeep());
    builder.append("WHERE ");
    SqlUtils.appendColumnsEqValue(builder, "T", getPkColumns());
    String sql = builder.toString();
    
    String[] keyArray = new String[] { key.toString() };
    Cursor cursor = db.rawQuery(sql, keyArray);
    
    try {
        boolean available = cursor.moveToFirst();
        if (!available) {
            return null;
        } else if (!cursor.isLast()) {
            throw new IllegalStateException("Expected unique result, but count was " + cursor.getCount());
        }
        return loadCurrentDeep(cursor, true);
    } finally {
        cursor.close();
    }
}
 
开发者ID:Kamshak,项目名称:BrainPhaser,代码行数:27,代码来源:StatisticsDao.java


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