oaDMData
模块: oapy._oa._dm
导入: from oapy._oa import _dm
概览
oaDMData 在 oapy 中可用,可通过 _dm 模块访问。
本页汇总 oaDMData 当前在 oapy 中可用的 Python 接口。
详细说明
oaDMData objects represent database objects that can be associated with a DM library, cell, view or cellView and can be used to persistently store properties ( oaProp objects), groups ( oaGroup objects), group members ( oaGroupMember objects) and application objects (see oaAppObject )。 The oaDMData class provides the behavior that is common to oaLibDMData , oaCellDMData , oaViewDMData and oaCellViewDMData 。
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.close() |
| ✅ | obj.purge() |
| ✅ | obj.save() |
| ✅ | obj.save(saveRecoverType) |
| ✅ | obj.reopen(mode) |
| ✅ | obj.revert() |
| ✅ | obj.getLibName(libName) |
| ✅ | obj.getLibName(ns, libName) |
| ✅ | obj.getLib() |
| ✅ | obj.getMode() |
| ✅ | obj.getRefCount() |
| ✅ | obj.getTimeStamp(type) |
| ✅ | obj.isModified() |
| ✅ | obj.isRecovered() |
| ✅ | obj.getFeatures(dataModelRev, features) |
| ✅ | obj.getGroups() |
| ✅ | obj.getGroups(def) |
| ✅ | obj.getGroupsByName(name) |
| ✅ | obj.getAppDefsByDataType(dataType) |
| ✅ | obj.getAppObjects(def) |
| ✅ | obj.getAppObjectDefs() |
| ✅ | _dm.oaDMData.open(container, mode) |
| ✅ | _dm.oaDMData.recover(container, saveRecoverType) |
| ✅ | _dm.oaDMData.find(container) |
| ✅ | _dm.oaDMData.exists(container) |
| ✅ | _dm.oaDMData.exists(container, saveRecoverType) |
| ✅ | _dm.oaDMData.destroy(container) |
| ✅ | _dm.oaDMData.destroy(container, saveRecoverType) |
| ✅ | _dm.oaDMData.getRevNumber() |
| ✅ | _dm.oaDMData.getOpenDMDataObjs() |
方法说明
obj.close()
绑定状态: 已绑定
Python 调用: obj.close()
This function decrements the reference count of this DMData by one。 If the count goes to zero, this database is purged from memory。
异常
oacCloseOnDMDataBeingPurged。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.close()
obj.purge()
绑定状态: 已绑定
Python 调用: obj.purge()
This function closes and removes this DMData from memory, regardless of its reference count。 Applications sometimes inadvertently attempt to recursively purge databases, so set an exception is thrown to catch this。
异常
oacPurgeOnDMDataBeingPurged。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.purge()
obj.save()
绑定状态: 已绑定
Python 调用: obj.save()
This function attempts to save this oaSaveRecoverType database。
参数
saveRecoverType: Either oacAutoSaveType or oacCriticalSaveType。
异常
oacSaveReadOnlyDMData。oacInterfaceException。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.save()
obj.save(saveRecoverType)
绑定状态: 已绑定
Python 调用: obj.save(saveRecoverType)
This function attempts to save this oaDMdata database。
异常
oacSaveReadOnlyDMData。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.save(saveRecoverType)
obj.reopen(mode)
绑定状态: 已绑定
Python 调用: obj.reopen(mode)
This function attempts to reopen this oaDMData using the specified access mode。 The contents of the DMData may be reset or even truncated depending on the new access mode。 Note that the oaDMData's refCount is not affected。
参数
mode: mode in which to reopen this DMData database: 'r'ead-only, 'w'rite (truncate) or 'a'ppend。
异常
oacOpenUndefinedModeDMData。oacOpenOnDMDataBeingPurged。oacCannotLockDMData。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.reopen(mode)
obj.revert()
绑定状态: 已绑定
Python 调用: obj.revert()
This function reloads the contents of this oaDMData from disk。 If the oaDMData is opened in write mode, it will be truncated。 Note that the oaDMData's access mode is not affected。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.revert()
obj.getLibName(libName)
绑定状态: 已绑定
Python 调用: obj.getLibName(libName)
This function returns the library name for this DMData object in the specified ns namespace。
参数
ns: input parameter - the namespace to use for the returned library name。libName: the returned library name。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.getLibName(libName)
obj.getLibName(ns, libName)
绑定状态: 已绑定
Python 调用: obj.getLibName(ns, libName)
These functions returns the library name for this DMData object。
参数
libName: the returned library name。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.getLibName(ns, libName)
obj.getLib()
绑定状态: 已绑定
Python 调用: obj.getLib()
This function returns a pointer to the lib object that this dmData database is in。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.getLib()
obj.getMode()
绑定状态: 已绑定
Python 调用: obj.getMode()
This function returns the mode ('r'ead-only, 'w'rite, or 'a'ppend) with which this DMData database is currently opened。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.getMode()
obj.getRefCount()
绑定状态: 已绑定
Python 调用: obj.getRefCount()
This function returns the number of times this DMData has been opened without being closed。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.getRefCount()
obj.getTimeStamp(type)
绑定状态: 已绑定
Python 调用: obj.getTimeStamp(type)
This function returns the timeStamp value for the specified DM data dataType。
参数
type: an oaDMDataType value。
异常
oacInvalidDMDataTypeForTimeStamp。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.getTimeStamp(type)
obj.isModified()
绑定状态: 已绑定
Python 调用: obj.isModified()
This function returns a boolean indicating whether or not this oaDMData database has been modified but not saved。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.isModified()
obj.isRecovered()
绑定状态: 已绑定
Python 调用: obj.isRecovered()
This function returns a boolean indicating whether or not this oaDMData database has been recovered。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.isRecovered()
obj.getFeatures(dataModelRev, features)
绑定状态: 已绑定
Python 调用: obj.getFeatures(dataModelRev, features)
This function returns the data model revision number for the database, as well as an array of the features currently in the database。 The application can iterate through the array to get the ID for each feature present。 Each feature ID corresponds to an oaFeatureIDEnum value。
参数
dataModelRev: returned data model revision。features: returned feature array。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.getFeatures(dataModelRev, features)
obj.getGroups()
绑定状态: 已绑定
Python 调用: obj.getGroups()
These functions return collections of objects in or associated with this dmData。
参数
def:
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.getGroups()
obj.getGroups(def)
绑定状态: 已绑定
Python 调用: obj.getGroups(def)
This function returns the collection of groups in or associated with this oaDMData database。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.getGroups(def)
obj.getGroupsByName(name)
绑定状态: 已绑定
Python 调用: obj.getGroupsByName(name)
This function returns a collection of groups in or associated with this oaDMData database with the specified name。
参数
name: the name of the groups to get。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.getGroupsByName(name)
obj.getAppDefsByDataType(dataType)
绑定状态: 已绑定
Python 调用: obj.getAppDefsByDataType(dataType)
This function returns a collection of oaAppDefs of the specified dataType set on oaDMObjects in this oaDMData database。
参数
dataType: the data type to get。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.getAppDefsByDataType(dataType)
obj.getAppObjects(def)
绑定状态: 已绑定
Python 调用: obj.getAppObjects(def)
This function returns a collection of oaAppObjects with the specified def oaAppObjectDef extension definition set on them in this oaDMData database。
参数
def: the extension type look for。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.getAppObjects(def)
obj.getAppObjectDefs()
绑定状态: 已绑定
Python 调用: obj.getAppObjectDefs()
This function returns a collection of oaAppObjectDefs extension definitions set on oaAppObjects in this oaDMData database。
Python 示例
from oapy._oa import _dm
# assume obj is a oaDMData
obj.getAppObjectDefs()
_dm.oaDMData.open(container, mode)
绑定状态: 已绑定
Python 调用: _dm.oaDMData.open(container, mode)
This function attempts to open a DM data database with the specified dmObj (container) owner in the given mode。 If successful, a pointer to the DM Data is returned。
参数
dmObj: pointer to the container for (owner of) the oaDMData object。mode: mode to open this oaDMData object: 'r'ead-only, 'w'rite (truncate) or 'a'ppend。
异常
oacOpenUndefinedModeDMData。oacInvalidContainer。oacOpenOnDMDataBeingPurged。oacDMDataDoesNotExist。oacCannotLockDMData。oacDMDataCannotGetReadAccess。oacDMDataHasReadNeedWriteAccess。oacDMDataCannotGetWriteAccess。
Python 示例
from oapy._oa import _dm
_dm.oaDMData.open(container, mode)
_dm.oaDMData.recover(container, saveRecoverType)
绑定状态: 已绑定
Python 调用: _dm.oaDMData.recover(container, saveRecoverType)
This function attempts to recover the DM data for the given DM object with the specified oaSaveRecoverType 。 If successful, a pointer to the DMData object is returned。
参数
container: A pointer to the container (owner) for the oaDMData database。saveRecoverType: Either oacAutoSaveType or oacCriticalSaveType。
异常
oacSaveRecoverDMDataFileAlreadyOpened。oacOpenOnDMDataBeingPurged。oacDMDataDoesNotExist。oacSaveRecoverFileDoesNotExistOnDisk。oacInterfaceException。
Python 示例
from oapy._oa import _dm
_dm.oaDMData.recover(container, saveRecoverType)
_dm.oaDMData.find(container)
绑定状态: 已绑定
Python 调用: _dm.oaDMData.find(container)
This function attempts to find an open DM data with the specified dmObj container (owner)。 If successful, a pointer to the DMData database is returned。 If unsuccessful, NULL is returned。
参数
dmObj: A pointer to the container (owner) for the oaDMData database。
异常
oacInvalidContainer。oacDMDataCannotGetReadAccess。
Python 示例
from oapy._oa import _dm
_dm.oaDMData.find(container)
_dm.oaDMData.exists(container)
绑定状态: 已绑定
Python 调用: _dm.oaDMData.exists(container)
This function returns a boolean that indicates whether the specified oaSaveRecoverType file exists on-disk。
参数
container: A pointer to the container (owner) for the oaDMData database。saveRecoverType: Either oacAutoSaveType or oacCriticalSaveType。
Python 示例
from oapy._oa import _dm
_dm.oaDMData.exists(container)
_dm.oaDMData.exists(container, saveRecoverType)
绑定状态: 已绑定
Python 调用: _dm.oaDMData.exists(container, saveRecoverType)
This function checks whether there is a DMData open that has the specified dmObj container (owner) or whether a DMData file exists on disk with a non-zero size。 This function returns if either condition is true; otherwise, it returns false。
参数
dmObj: A pointer to the container (owner) for the oaDMData database。
异常
oacInvalidContainer。
Python 示例
from oapy._oa import _dm
_dm.oaDMData.exists(container, saveRecoverType)
_dm.oaDMData.destroy(container)
绑定状态: 已绑定
Python 调用: _dm.oaDMData.destroy(container)
This function attempts to remove the specified oaSaveRecoverType file from disk。 It throws an exception if this file cannot be found on disk。
参数
container: A pointer to the container for the oaDMData database。saveRecoverType: Either oacAutoSaveType or oacCriticalSaveType。
异常
oacDestroyDMDataDoesNotExist。oacSaveRecoverFileDoesNotExistOnDisk。oacInterfaceException。
Python 示例
from oapy._oa import _dm
_dm.oaDMData.destroy(container)
_dm.oaDMData.destroy(container, saveRecoverType)
绑定状态: 已绑定
Python 调用: _dm.oaDMData.destroy(container, saveRecoverType)
This function attempts to remove this oaDMData database from disk。 It throws an exception if the DMData is currently open or if the DMData cannot be found on disk。
参数
dmObj: A pointer to the container (owner of) for the oaDMData database。
异常
oacInvalidContainer。oacDestroyDMDataOpen。oacDestroyDMDataDoesNotExist。oacDMDataHasReadNeedWriteAccess。oacDMDataCannotGetWriteAccess。
Python 示例
from oapy._oa import _dm
_dm.oaDMData.destroy(container, saveRecoverType)
_dm.oaDMData.getRevNumber()
绑定状态: 已绑定
Python 调用: _dm.oaDMData.getRevNumber()
This function returns the revision number for this DMData database。
Python 示例
from oapy._oa import _dm
_dm.oaDMData.getRevNumber()
_dm.oaDMData.getOpenDMDataObjs()
绑定状态: 已绑定
Python 调用: _dm.oaDMData.getOpenDMDataObjs()
This function returns a collection of open DM data databases。
Python 示例
from oapy._oa import _dm
_dm.oaDMData.getOpenDMDataObjs()