新聞中心
StoreConfig

站在用戶的角度思考問(wèn)題,與客戶深入溝通,找到建甌網(wǎng)站設(shè)計(jì)與建甌網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗(yàn),讓設(shè)計(jì)與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個(gè)性化、用戶體驗(yàn)好的作品,建站類型包括:成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、國(guó)際域名空間、虛擬空間、企業(yè)郵箱。業(yè)務(wù)覆蓋建甌地區(qū)。
java.lang.Object
|---ohos.data.rdb.StoreConfig
public class StoreConfig
extends Object管理關(guān)系數(shù)據(jù)庫(kù)配置。
嵌套類摘要
| 修飾符和類型 | 類 | 描述 |
|---|---|---|
| static class | StoreConfig.Builder | 表示 StoreConfig 的構(gòu)建器。 |
| static class | StoreConfig.JournalMode | 描述數(shù)據(jù)庫(kù)的日志模式。 |
| static class | StoreConfig.StorageMode | 枚舉存儲(chǔ)模式。 |
| static class | StoreConfig.SyncMode | 枚舉數(shù)據(jù)庫(kù)同步模式。 |
字段摘要
| 修飾符和類型 | 字段 | 描述 |
|---|---|---|
| static int | MAX_ENCRYPT_KEY_SIZE | 加密密鑰的最大大小。 |
方法總結(jié)
| 修飾符和類型 | 方法 | 描述 |
|---|---|---|
| DatabaseFileSecurityLevel | getDatabaseFileSecurityLevel() | 獲取數(shù)據(jù)庫(kù)文件的安全級(jí)別。 |
| DatabaseFileType | getDatabaseFileType() | 獲取此 StoreConfig 對(duì)象中的數(shù)據(jù)庫(kù)文件類型。 |
| byte[] | getEncryptKey() | 獲取此 StoreConfig 對(duì)象中的加密密鑰。 |
| StoreConfig.JournalMode | getJournalMode() | 獲取此 StoreConfig 對(duì)象中的日志模式。 |
| String | getName() | 獲取數(shù)據(jù)庫(kù)名稱。 |
| StoreConfig.StorageMode | getStorageMode() | 獲取存儲(chǔ)模式。 |
| StoreConfig.SyncMode | getSyncMode() | 獲取此 StoreConfig 對(duì)象中的同步模式。 |
| boolean | isReadOnly() | 檢查數(shù)據(jù)庫(kù)是否是只讀的。 |
| static StoreConfig | newDefaultConfig(String name) | 通過(guò)指定數(shù)據(jù)庫(kù)名稱使用默認(rèn)配置創(chuàng)建數(shù)據(jù)庫(kù)配置。 |
| static StoreConfig | newMemoryConfig() | 創(chuàng)建內(nèi)存數(shù)據(jù)庫(kù)配置。 |
| static StoreConfig | newReadOnlyConfig(String name) | 通過(guò)指定數(shù)據(jù)庫(kù)名稱創(chuàng)建只讀數(shù)據(jù)庫(kù)配置。 |
| 從類 java.lang.Object 繼承的方法 |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段詳細(xì)信息
MAX_ENCRYPT_KEY_SIZE
public static final int MAX_ENCRYPT_KEY_SIZE
加密密鑰的最大大小。
方法詳情
newDefaultConfig
public static StoreConfig newDefaultConfig(String name)
通過(guò)指定數(shù)據(jù)庫(kù)名稱使用默認(rèn)配置創(chuàng)建數(shù)據(jù)庫(kù)配置。
使用此配置創(chuàng)建的數(shù)據(jù)庫(kù)處于磁盤存儲(chǔ)模式,可讀寫。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| name | 表示數(shù)據(jù)庫(kù)名稱。 |
返回:
返回創(chuàng)建的數(shù)據(jù)庫(kù)配置。
newMemoryConfig
public static StoreConfig newMemoryConfig()
創(chuàng)建內(nèi)存數(shù)據(jù)庫(kù)配置。
使用此配置創(chuàng)建的數(shù)據(jù)庫(kù)處于內(nèi)存存儲(chǔ)模式,可讀寫。
返回:
返回創(chuàng)建的數(shù)據(jù)庫(kù)配置。
newReadOnlyConfig
public static StoreConfig newReadOnlyConfig(String name)
通過(guò)指定數(shù)據(jù)庫(kù)名稱創(chuàng)建只讀數(shù)據(jù)庫(kù)配置。
使用此配置創(chuàng)建的數(shù)據(jù)庫(kù)處于磁盤存儲(chǔ)模式。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| name | 表示數(shù)據(jù)庫(kù)名稱。 |
返回:
返回創(chuàng)建的數(shù)據(jù)庫(kù)配置。
getName
public String getName()
獲取數(shù)據(jù)庫(kù)名稱。
返回:
返回?cái)?shù)據(jù)庫(kù)名稱。
getStorageMode
public StoreConfig.StorageMode getStorageMode()
獲取存儲(chǔ)模式。
返回:
返回存儲(chǔ)模式。
getJournalMode
public StoreConfig.JournalMode getJournalMode()
獲取此 StoreConfig 對(duì)象中的日志模式。
返回:
返回此 StoreConfig 對(duì)象中的日志模式。
getSyncMode
public StoreConfig.SyncMode getSyncMode()
獲取此 StoreConfig 對(duì)象中的同步模式。
返回:
返回此 StoreConfig 對(duì)象中的同步模式,如 SyncMode 中所枚舉。
getEncryptKey
public byte[] getEncryptKey()
獲取此 StoreConfig 對(duì)象中的加密密鑰。
返回:
返回此 StoreConfig 對(duì)象中的加密密鑰。
isReadOnly
public boolean isReadOnly()
檢查數(shù)據(jù)庫(kù)是否是只讀的。
返回:
如果數(shù)據(jù)庫(kù)是只讀的,則返回 true; 否則返回 false。
getDatabaseFileType
public DatabaseFileType getDatabaseFileType()
獲取此 StoreConfig 對(duì)象中的數(shù)據(jù)庫(kù)文件類型。
返回:
返回?cái)?shù)據(jù)庫(kù)文件類型,如 DatabaseFileType 中所枚舉。
getDatabaseFileSecurityLevel
public DatabaseFileSecurityLevel getDatabaseFileSecurityLevel()
獲取數(shù)據(jù)庫(kù)文件的安全級(jí)別。
返回:
返回安全級(jí)別。
文章題目:創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OSStoreConfig
網(wǎng)頁(yè)URL:http://www.5511xx.com/article/djgjjjc.html


咨詢
建站咨詢
