首页 / cms / oaCMDatabaseRef

oaCMDatabaseRef

模块: oapy._oa._cms 导入: from oapy._oa import _cms

概览

oaCMDatabaseRefoapy 中可用,可通过 _cms 模块访问。

本页汇总 oaCMDatabaseRef 当前在 oapy 中可用的 Python 接口。

详细说明

The oaCMObjectRef and its derived classes add lifecycle management to schema representation (sr) object references, and are used in the OpenAccess Change Management System (CMS) 。 An oaCMDatabaseRef is an object reference in which the object is a database。 oaCMDatabaseRefs are managed by oaChangeSets。 When an oaCMDatabaseRef is created, it is immediately externalized。 A string representation of its identifying state is stored with it。 If the live object is destroyed, the oaCMDatabaseRef corresponding to the destroyed object is passivated by setting a boolean flag to indicate that the object pointer is invalid。 If an undo operation recreates the live object that was destroyed, the oaCMDatabaseRef can be activated by resetting the boolean flag。 The oaCMDatabaseRef class supports a visitor design pattern interface, which uses a dual dispatch technique。 The oaCMDatabaseRef class has an accept method, which provides access to a visitor。 The visitor can then execute its behavior for that element。

构造函数

_cms.oaCMDatabaseRef(def, object, tbl, timeStamp, isNew=false)

obj = _cms.oaCMDatabaseRef(def, object, tbl, timeStamp, isNew=false)

方法总览

状态 Python 调用
obj.accept(visitor)
obj.passivate()
obj.activate()
obj.getDatabase()
obj.getState()
obj.setState(state)

方法说明

obj.accept(visitor)

绑定状态: 已绑定

Python 调用: obj.accept(visitor)

This function accepts an srVisitorMgr visitor。 It calls the visit function of the specified visitor on this object。

参数

  • visitor: The visitor to call on this object。

Python 示例

from oapy._oa import _cms

# assume obj is a oaCMDatabaseRef
obj.accept(visitor)

obj.passivate()

绑定状态: 已绑定

Python 调用: obj.passivate()

This function sets a boolean flag on the oaCMDatabaseRef to indicate that the corresponding live object for this reference has been destroyed。 从 oaCMObjectRef 重新实现。

Python 示例

from oapy._oa import _cms

# assume obj is a oaCMDatabaseRef
obj.passivate()

obj.activate()

绑定状态: 已绑定

Python 调用: obj.activate()

This function resets a boolean flag on the oaCMDatabaseRef to indicate that the corresponding live object for this reference has been recreated (due to an undo operation after the live object was destroyed)。 从 oaCMObjectRef 重新实现。

Python 示例

from oapy._oa import _cms

# assume obj is a oaCMDatabaseRef
obj.activate()

obj.getDatabase()

绑定状态: 已绑定

Python 调用: obj.getDatabase()

Python 示例

from oapy._oa import _cms

# assume obj is a oaCMDatabaseRef
obj.getDatabase()

obj.getState()

绑定状态: 已绑定

Python 调用: obj.getState()

此函数返回此 oaCMDatabaseRef 的 oaCMObjectStateTbl 条目。

Python 示例

from oapy._oa import _cms

# assume obj is a oaCMDatabaseRef
obj.getState()

obj.setState(state)

绑定状态: 已绑定

Python 调用: obj.setState(state)

This function sets the state for an oaCMDatabaseRef。 The state describes an OpenAccess object that is identified by a compound state rather than a unique identifier。

参数

  • state: The state to which to set the oaCMDatabaseRef。

Python 示例

from oapy._oa import _cms

# assume obj is a oaCMDatabaseRef
obj.setState(state)