oaGroupMember
模块: oapy._oa._base
导入: from oapy._oa import _base
概览
oaGroupMember 在 oapy 中可用,可通过 _base 模块访问。
本页汇总 oaGroupMember 当前在 oapy 中可用的 Python 接口。
详细说明
The oaGroupMember class implements group member objects。 A group member object represents a relationship between a database object and a group。 This class represents the membership of a database object in a group。 You can place most objects in a group or even another group, as long as they reside in the same database as the containing group。 However, database classes ( oaDesign , oaTech , oaDDObjectDB) cannot be group members and the paged parasitic objects cannot be included in a group。 See oaGroup for more information。 A group can have a hierarchy domain specified when it is created。 In this case, each member added to the group must be of the same domain as the group。 If the group domain is unspecified, or if it is oacNoDomain, then members of any domain can be added to the group。 See oaGroup and oaDomain for more information。 A collection of all the oaGroupMembers in a group is returned by oaGroup :getMembers and a collection of all the oaGroupMembers that include a given object is returned by oaObject::getGroupMems 。 An instance of oaGroupMember is automatically destroyed when either the object it references or the group that owns it is destroyed。 The oaGroupMember class can be observed by deriving from oaObserver
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.destroy() |
| ✅ | obj.isLeader() |
| ✅ | obj.getGroup() |
| ✅ | obj.getObject() |
| ✅ | obj.moveAfter(member) |
| ✅ | obj.moveToFirst() |
| ✅ | _base.oaGroupMember.create(group, object, isLeader=false) |
方法说明
obj.destroy()
绑定状态: 已绑定
Python 调用: obj.destroy()
This function removes this object from the given group and destroys this oaGroupMember object。 The deleteWhen property of the related group is also checked to determine if the group itself should also be destroyed。 If it is a deleteFirst type group, it is destroyed。 If it is a deleteLast type group, it is destroyed only if this group member is the last one in the group。
Python 示例
from oapy._oa import _base
# assume obj is a oaGroupMember
obj.destroy()
obj.isLeader()
绑定状态: 已绑定
Python 调用: obj.isLeader()
This function returns a boolean value indicating whether this group member is the leader of the group。
Python 示例
from oapy._oa import _base
# assume obj is a oaGroupMember
obj.isLeader()
obj.getGroup()
绑定状态: 已绑定
Python 调用: obj.getGroup()
This function returns the group of which owns this group member。
Python 示例
from oapy._oa import _base
# assume obj is a oaGroupMember
obj.getGroup()
obj.getObject()
绑定状态: 已绑定
Python 调用: obj.getObject()
This function returns the object that is referred by this group member。
Python 示例
from oapy._oa import _base
# assume obj is a oaGroupMember
obj.getObject()
obj.moveAfter(member)
绑定状态: 已绑定
Python 调用: obj.moveAfter(member)
This function moves this group member in an ordered group to the position behind the specified group member in the same group。 If these two group members are the same, this function has no effect。 If you attempt to move the group leader after another member, an oacInvalidMoveLeader exception will be thrown。 If this object and member are not in the same group, an oacInvalidGroupForMemberMove exception will be thrown。 if the group to which this object belongs is not an ordered group, an oacInvalidGroupTypeForMemberMove exception will be thrown。
参数
member: The group member to move this groupMember after。
异常
oacInvalidMoveLeader。oacInvalidGroupForMemberMove。oacInvalidGroupTypeForMemberMove。
Python 示例
from oapy._oa import _base
# assume obj is a oaGroupMember
obj.moveAfter(member)
obj.moveToFirst()
绑定状态: 已绑定
Python 调用: obj.moveToFirst()
This function attempts to move this group member in an ordered group to the first group member in its group。 The current first group member is moved to the second, and so on with the following group members。 If you attempt to move a group member in front of the group leader, an oacInvalidMoveLeader exception will be thrown。 If the group to which this object belongs is not an ordered group, an oacInvalidGroupTypeForMemberMove exception will be thrown。
异常
oacInvalidMoveLeader。oacInvalidGroupTypeForMemberMove。
Python 示例
from oapy._oa import _base
# assume obj is a oaGroupMember
obj.moveToFirst()
_base.oaGroupMember.create(group, object, isLeader=false)
绑定状态: 已绑定
Python 调用: _base.oaGroupMember.create(group, object, isLeader=false)
This function creates a group member for the specified object in the specified group。 The object and the group must be in the same database。 The object must also be in the same domain as the group if the group is restricted by domain。 It is possible to specify this group member as the leader of the group if the group was created with the type oacSetGroupType and if it does not currently have a leader。 If the created group member is a leader, it becomes the first group member; otherwise, the created member becomes the last group member。 You can change the order of members in an ordered group by using oaGroupMember::moveToFirst and oaGroupMember::moveAfter functions。 If you later call oaGroupMember::moveToFirst() to move a different member in front of the leader, an exception will be thrown。
参数
group: The group to which this group member belongs。object: The object to include in the specified group。isLeader: Specifies if this group member is set as the leader of the specified group; the default is false。
异常
oacGroupMemberNotInSameDB。oacGroupMemberNotInDomain。oacInvalidGroupForSameObj。oacInvalidGroupForLeader。oacInvalidGroupLeader。oacInvalidGroupObject。oacInvalidObjForGroup。oacMismatchDatabaseID。oacMultipleGroupLeader。
Python 示例
from oapy._oa import _base
_base.oaGroupMember.create(group, object, isLeader=false)