首页 / base / oaConstraintGroupDef

oaConstraintGroupDef

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

概览

oaConstraintGroupDefoapy 中可用,可通过 _base 模块访问。

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

详细说明

This class specifies the semantics for constraint groups and defines how the constraints in the corresponding constraint groups are used。 A constraint group definition contains a name and a list of oaManagedType types。 Refer to Using Constraint Group Definitions in the Creating and Modeling Process Rules and Constraints section of the Programmers Guide for information about OpenAccess built-in constraint group definitions。

方法总览

状态 Python 调用
obj.destroy()
obj.remove(database)
obj.getName(name)
obj.getConstraintGroupType()
obj.isBuiltIn()
obj.isUniqueInDB()
obj.getAllowedOwners(allowedOwners)
obj.getAllowedDatabases(allowedDatabases)
_base.oaConstraintGroupDef.create(name, allowedOwners, allowedDatabases, uniqueInDatabase=false)
_base.oaConstraintGroupDef.find(name)
_base.oaConstraintGroupDef.get(type)

方法说明

obj.destroy()

绑定状态: 已绑定

Python 调用: obj.destroy()

This function destroys this constraint group definition。 If it is a built-in definition or there are databases referencing this definition, an exception is thrown。 An exception is also thrown if this function is called when undo is enabled on any of the current in-memory design or tech databases。

异常

  • oacUnableToDestroyBuiltInType
  • oacObjectDefHasReference
  • oacCannotDestroyDefUndo

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintGroupDef
obj.destroy()

obj.remove(database)

绑定状态: 已绑定

Python 调用: obj.remove(database)

This function removes this constraint group definition from the specified database。 If there are any constraint groups in the database that reference this definition, an oacObjectDefHasReference exception is thrown。

参数

  • database: The input database from which to remove this constraint group definition。

异常

  • oacObjectDefHasReference

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintGroupDef
obj.remove(database)

obj.getName(name)

绑定状态: 已绑定

Python 调用: obj.getName(name)

This function returns the name of this constraint group definition。

参数

  • name: returned name of this constraint group def。

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintGroupDef
obj.getName(name)

obj.getConstraintGroupType()

绑定状态: 已绑定

Python 调用: obj.getConstraintGroupType()

This function returns the type of this constraint group definition。 This function throws an oacInvalidOperationOnUserDefinedConstraintGroupDef exception if the constraint group def is a user-defined constraint group def。

异常

  • oacInvalidOperationOnUserDefinedConstraintGroupDef

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintGroupDef
obj.getConstraintGroupType()

obj.isBuiltIn()

绑定状态: 已绑定

Python 调用: obj.isBuiltIn()

This function returns true if the constraint group definition is a built-in definition。

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintGroupDef
obj.isBuiltIn()

obj.isUniqueInDB()

绑定状态: 已绑定

Python 调用: obj.isUniqueInDB()

This function returns true if only one stand-alone constraintGroup of this type can be created in the allowed databases。

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintGroupDef
obj.isUniqueInDB()

obj.getAllowedOwners(allowedOwners)

绑定状态: 已绑定

Python 调用: obj.getAllowedOwners(allowedOwners)

This function returns an array of objects that are allowed to own constraint groups of this type。

参数

  • allowedOwners: the returned managed type array of allowed owners。

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintGroupDef
obj.getAllowedOwners(allowedOwners)

obj.getAllowedDatabases(allowedDatabases)

绑定状态: 已绑定

Python 调用: obj.getAllowedDatabases(allowedDatabases)

This method returns the valid types of databases in which a group specified with this definition can be created。

参数

  • allowedDatabases: the returned subset collection of allowed databases。

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintGroupDef
obj.getAllowedDatabases(allowedDatabases)

_base.oaConstraintGroupDef.create(name, allowedOwners, allowedDatabases, uniqueInDatabase=false)

绑定状态: 已绑定

Python 调用: _base.oaConstraintGroupDef.create(name, allowedOwners, allowedDatabases, uniqueInDatabase=false)

This function creates a new constraint group definition with the specified attributes。 If the constraint group definition already exists, an exception is thrown。

参数

  • name: The name of the constraint group to create。
  • allowedOwners: An array of the managed object types permitted in the associated constraint groups。
  • allowedDatabases: The permitted types of databases in which a group specified with this definition can be created。
  • uniqueInDatabase: If set to true, only one stand-alone constraintGroup of this type is permitted to be created in an allowed database。

异常

  • oacObjectDefExists
  • oacInvalidConstraintGroupDefUniqueAttribute
  • oacDBTypeCannotBeOwnerAndContainerConstraintGroupDef

Python 示例

from oapy._oa import _base

_base.oaConstraintGroupDef.create(name, allowedOwners, allowedDatabases, uniqueInDatabase=false)

_base.oaConstraintGroupDef.find(name)

绑定状态: 已绑定

Python 调用: _base.oaConstraintGroupDef.find(name)

This function returns the constraint group definition with the specified name。 If no definition by that name is found, NULL is returned。

参数

  • name: The input name of the constraint group definition to match。

Python 示例

from oapy._oa import _base

_base.oaConstraintGroupDef.find(name)

_base.oaConstraintGroupDef.get(type)

绑定状态: 已绑定

Python 调用: _base.oaConstraintGroupDef.get(type)

This function returns the constraint group definition associated with the specified type。

参数

  • type: The input constraint group type of the constraint group definition to match。

Python 示例

from oapy._oa import _base

_base.oaConstraintGroupDef.get(type)