W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
java.lang.Object
|---ohos.data.dataability.DataAbilityUtils
public class DataAbilityUtils
extends Object
為數(shù)據(jù)庫操作提供靜態(tài)方法的實用程序類。
此類提供了從 DataAbilityPredicates 對象創(chuàng)建 OrmPredicates 和 RdbPredicates 對象的接口。
修飾符和類型 | 方法 | 描述 |
---|---|---|
static <T extends OrmObject>OrmPredicates | createOrmPredicates(DataAbilityPredicates dataAbilityPredicates, Class<T> klass) | 從 DataAbilityPredicates 對象創(chuàng)建 OrmPredicates 對象。 |
static RdbPredicates | createRdbPredicates(DataAbilityPredicates dataAbilityPredicates, String tableName) | 從 DataAbilityPredicates 對象創(chuàng)建 RdbPredicates 對象。 |
從類 java.lang.Object 繼承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
public static RdbPredicates createRdbPredicates(DataAbilityPredicates dataAbilityPredicates, String tableName)
從 DataAbilityPredicates 對象創(chuàng)建 RdbPredicates 對象。
RdbPredicates 對象可用于執(zhí)行數(shù)據(jù)庫操作。
參數(shù):
參數(shù)名稱 | 參數(shù)描述 |
---|---|
dataAbilityPredicates | 指示用于創(chuàng)建 RdbPredicates 對象的 DataAbilityPredicates 對象。 |
tableName | 表示表名。 |
返回:
返回 RdbPredicates 對象。
Throws:
Throw名稱 | Throw描述 |
---|---|
IllegalArgumentException | 如果 tableName 為 null 或無法從 DataAbilityPredicates 對象創(chuàng)建 RdbPredicates 對象,則引發(fā)此異常。 |
public static <T extends OrmObject> OrmPredicates createOrmPredicates(DataAbilityPredicates dataAbilityPredicates, Class<T> klass)
從 DataAbilityPredicates 對象創(chuàng)建 OrmPredicates 對象。
OrmPredicates 對象可用于執(zhí)行數(shù)據(jù)庫操作。
參數(shù):
參數(shù)名稱 | 參數(shù)描述 |
---|---|
dataAbilityPredicates | 指示用于創(chuàng)建 OrmPredicates 對象的 DataAbilityPredicates 對象。 |
klass | 表示類。 |
返回:
返回 OrmPredicates 對象。
Throws:
Throw名稱 | Throw描述 |
---|---|
IllegalArgumentException | 如果 klass 為 null 或無法從 DataAbilityPredicates 對象創(chuàng)建 OrmPredicates 對象,則引發(fā)此異常。 |
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: