美图齐众专注资阳网站设计 资阳网站制作 资阳网站建设
资阳网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

创新互联鸿蒙OS教程:鸿蒙OSDataAbilityUtils

DataAbilityUtils

创新互联公司专业为企业提供南开网站建设、南开做网站、南开网站设计、南开网站制作等企业网站建设、网页设计与制作、南开企业网站模板建站服务,十年南开做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。

java.lang.Object

|---ohos.data.dataability.DataAbilityUtils

public class DataAbilityUtils
extends Object

为数据库操作提供静态方法的实用程序类。

此类提供了从 DataAbilityPredicates 对象创建 OrmPredicates 和 RdbPredicates 对象的接口。

方法总结

修饰符和类型 方法 描述
static OrmPredicates createOrmPredicates(DataAbilityPredicates dataAbilityPredicates, Class klass) 从 DataAbilityPredicates 对象创建 OrmPredicates 对象。
static RdbPredicates createRdbPredicates(DataAbilityPredicates dataAbilityPredicates, String tableName) 从 DataAbilityPredicates 对象创建 RdbPredicates 对象。
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

方法详情

createRdbPredicates

public static RdbPredicates createRdbPredicates(DataAbilityPredicates dataAbilityPredicates, String tableName)

从 DataAbilityPredicates 对象创建 RdbPredicates 对象。

RdbPredicates 对象可用于执行数据库操作。

参数:

参数名称 参数描述
dataAbilityPredicates 指示用于创建 RdbPredicates 对象的 DataAbilityPredicates 对象。
tableName 表示表名。

返回:

返回 RdbPredicates 对象。

Throws:

Throw名称 Throw描述
IllegalArgumentException 如果 tableName 为 null 或无法从 DataAbilityPredicates 对象创建 RdbPredicates 对象,则引发此异常。

createOrmPredicates

public static OrmPredicates createOrmPredicates(DataAbilityPredicates dataAbilityPredicates, Class klass)

从 DataAbilityPredicates 对象创建 OrmPredicates 对象。

OrmPredicates 对象可用于执行数据库操作。

参数:

参数名称 参数描述
dataAbilityPredicates 指示用于创建 OrmPredicates 对象的 DataAbilityPredicates 对象。
klass 表示类。

返回:

返回 OrmPredicates 对象。

Throws:

Throw名称 Throw描述
IllegalArgumentException 如果 klass 为 null 或无法从 DataAbilityPredicates 对象创建 OrmPredicates 对象,则引发此异常。

当前标题:创新互联鸿蒙OS教程:鸿蒙OSDataAbilityUtils
文章源于:http://www.zsjierui.cn/article/djjicph.html

其他资讯