Interface Operation

    • Method Detail

      • isQuery

        boolean isQuery()
        Returns the value of the 'Is Query' attribute. The default value is "false". Specifies whether an execution of the BehavioralFeature leaves the state of the system unchanged (isQuery=true) or whether side effects may occur (isQuery=false).
        Returns:
        the value of the 'Is Query' attribute.
        See Also:
        setIsQuery(boolean), UMLPackage.getOperation_IsQuery()
      • setIsQuery

        void setIsQuery​(boolean value)
        Sets the value of the 'Is Query' attribute.
        Parameters:
        value - the new value of the 'Is Query' attribute.
        See Also:
        isQuery()
      • isOrdered

        boolean isOrdered()
        Returns the value of the 'Is Ordered' attribute. The default value is "false". This information is derived from the return result for this Operation. Specifies whether the return parameter is ordered or not, if present.
        Returns:
        the value of the 'Is Ordered' attribute.
        See Also:
        setIsOrdered(boolean), UMLPackage.getOperation_IsOrdered()
      • setIsOrdered

        void setIsOrdered​(boolean value)
        Sets the value of the 'Is Ordered' attribute.
        Parameters:
        value - the new value of the 'Is Ordered' attribute.
        See Also:
        isOrdered()
      • isUnique

        boolean isUnique()
        Returns the value of the 'Is Unique' attribute. The default value is "true". This information is derived from the return result for this Operation. Specifies whether the return parameter is unique or not, if present.
        Returns:
        the value of the 'Is Unique' attribute.
        See Also:
        setIsUnique(boolean), UMLPackage.getOperation_IsUnique()
      • setIsUnique

        void setIsUnique​(boolean value)
        Sets the value of the 'Is Unique' attribute.
        Parameters:
        value - the new value of the 'Is Unique' attribute.
        See Also:
        isUnique()
      • getLower

        int getLower()
        Returns the value of the 'Lower' attribute. The default value is "1". This information is derived from the return result for this Operation. Specifies the lower multiplicity of the return parameter, if present.
        Returns:
        the value of the 'Lower' attribute.
        See Also:
        setLower(int), UMLPackage.getOperation_Lower()
      • setLower

        void setLower​(int value)
        Sets the value of the 'Lower' attribute.
        Parameters:
        value - the new value of the 'Lower' attribute.
        See Also:
        getLower()
      • getUpper

        int getUpper()
        Returns the value of the 'Upper' attribute. The default value is "1". This information is derived from the return result for this Operation. Specifies the upper multiplicity of the return parameter, if present.
        Returns:
        the value of the 'Upper' attribute.
        See Also:
        setUpper(int), UMLPackage.getOperation_Upper()
      • setUpper

        void setUpper​(int value)
        Sets the value of the 'Upper' attribute.
        Parameters:
        value - the new value of the 'Upper' attribute.
        See Also:
        getUpper()
      • setClass_

        void setClass_​(Class value)
        Sets the value of the 'Class' container reference.
        Parameters:
        value - the new value of the 'Class' container reference.
        See Also:
        getClass_()
      • getPreconditions

        MDWEList<Constraint> getPreconditions()
        Returns the value of the 'Precondition' reference list. The list contents are of type Constraint. An optional set of Constraints on the state of the system when the Operation is invoked.
        Returns:
        the value of the 'Precondition' reference list.
        See Also:
        UMLPackage.getOperation_Precondition()
      • createPrecondition

        Constraint createPrecondition​(String name,
                                      org.eclipse.emf.ecore.EClass eClass)
        Creates a new Constraint, with the specified 'Name', and appends it to the ' Precondition' reference list.
        Parameters:
        name - The 'Name' for the new Constraint, or null.
        eClass - The Ecore class of the Constraint to create.
        Returns:
        The new Constraint.
        See Also:
        getPreconditions()
      • getPrecondition

        Constraint getPrecondition​(String name)
        Retrieves the first Constraint with the specified 'Name' from the ' Precondition' reference list.
        Parameters:
        name - The 'Name' of the Constraint to retrieve, or null.
        Returns:
        The first Constraint with the specified 'Name', or null.
        See Also:
        getPreconditions()
      • getPrecondition

        Constraint getPrecondition​(String name,
                                   boolean ignoreCase,
                                   org.eclipse.emf.ecore.EClass eClass,
                                   boolean createOnDemand)
        Retrieves the first Constraint with the specified 'Name' from the ' Precondition' reference list.
        Parameters:
        name - The 'Name' of the Constraint to retrieve, or null.
        ignoreCase - Whether to ignore case in String comparisons.
        eClass - The Ecore class of the Constraint to retrieve, or null.
        createOnDemand - Whether to create a Constraint on demand if not found.
        Returns:
        The first Constraint with the specified 'Name', or null.
        See Also:
        getPreconditions()
      • getPostconditions

        MDWEList<Constraint> getPostconditions()
        Returns the value of the 'Postcondition' reference list. The list contents are of type Constraint. An optional set of Constraints specifying the state of the system when the Operation is completed.
        Returns:
        the value of the 'Postcondition' reference list.
        See Also:
        UMLPackage.getOperation_Postcondition()
      • createPostcondition

        Constraint createPostcondition​(String name,
                                       org.eclipse.emf.ecore.EClass eClass)
        Creates a new Constraint, with the specified 'Name', and appends it to the ' Postcondition' reference list.
        Parameters:
        name - The 'Name' for the new Constraint, or null.
        eClass - The Ecore class of the Constraint to create.
        Returns:
        The new Constraint.
        See Also:
        getPostconditions()
      • getPostcondition

        Constraint getPostcondition​(String name)
        Retrieves the first Constraint with the specified 'Name' from the ' Postcondition' reference list.
        Parameters:
        name - The 'Name' of the Constraint to retrieve, or null.
        Returns:
        The first Constraint with the specified 'Name', or null.
        See Also:
        getPostconditions()
      • getPostcondition

        Constraint getPostcondition​(String name,
                                    boolean ignoreCase,
                                    org.eclipse.emf.ecore.EClass eClass,
                                    boolean createOnDemand)
        Retrieves the first Constraint with the specified 'Name' from the ' Postcondition' reference list.
        Parameters:
        name - The 'Name' of the Constraint to retrieve, or null.
        ignoreCase - Whether to ignore case in String comparisons.
        eClass - The Ecore class of the Constraint to retrieve, or null.
        createOnDemand - Whether to create a Constraint on demand if not found.
        Returns:
        The first Constraint with the specified 'Name', or null.
        See Also:
        getPostconditions()
      • getRedefinedOperations

        MDWEList<Operation> getRedefinedOperations()
        Returns the value of the 'Redefined Operation' reference list. The list contents are of type Operation. References the Operations that are redefined by this Operation.
        Returns:
        the value of the 'Redefined Operation' reference list.
        See Also:
        UMLPackage.getOperation_RedefinedOperation()
      • getRedefinedOperation

        Operation getRedefinedOperation​(String name,
                                        MDWEList<String> ownedParameterNames,
                                        MDWEList<? extends Type> ownedParameterTypes)
        Retrieves the first Operation with the specified 'Name', ' Owned Parameter Names', and 'Owned Parameter Types' from the 'Redefined Operation' reference list.
        Parameters:
        name - The 'Name' of the Operation to retrieve, or null.
        ownedParameterNames - The 'Owned Parameter Names' of the Operation to retrieve, or null.
        ownedParameterTypes - The 'Owned Parameter Types' of the Operation to retrieve, or null.
        Returns:
        The first Operation with the specified 'Name', ' Owned Parameter Names', and 'Owned Parameter Types', or null.
        See Also:
        getRedefinedOperations()
      • getRedefinedOperation

        Operation getRedefinedOperation​(String name,
                                        MDWEList<String> ownedParameterNames,
                                        MDWEList<? extends Type> ownedParameterTypes,
                                        boolean ignoreCase)
        Retrieves the first Operation with the specified 'Name', ' Owned Parameter Names', and 'Owned Parameter Types' from the 'Redefined Operation' reference list.
        Parameters:
        name - The 'Name' of the Operation to retrieve, or null.
        ownedParameterNames - The 'Owned Parameter Names' of the Operation to retrieve, or null.
        ownedParameterTypes - The 'Owned Parameter Types' of the Operation to retrieve, or null.
        ignoreCase - Whether to ignore case in String comparisons.
        Returns:
        The first Operation with the specified 'Name', ' Owned Parameter Names', and 'Owned Parameter Types', or null.
        See Also:
        getRedefinedOperations()
      • setDatatype

        void setDatatype​(DataType value)
        Sets the value of the 'Datatype' container reference.
        Parameters:
        value - the new value of the 'Datatype' container reference.
        See Also:
        getDatatype()
      • setBodyCondition

        void setBodyCondition​(Constraint value)
        Sets the value of the 'Body Condition' reference.
        Parameters:
        value - the new value of the 'Body Condition' reference.
        See Also:
        getBodyCondition()
      • createBodyCondition

        Constraint createBodyCondition​(String name,
                                       org.eclipse.emf.ecore.EClass eClass)
        Creates a new Constraint, with the specified 'Name', and sets the ' Body Condition' reference.
        Parameters:
        name - The 'Name' for the new Constraint, or null.
        eClass - The Ecore class of the Constraint to create.
        Returns:
        The new Constraint.
        See Also:
        getBodyCondition()
      • getType

        Type getType()
        Returns the value of the 'Type' reference. This information is derived from the return result for this Operation. Specifies the return result of the operation, if present.
        Returns:
        the value of the 'Type' reference.
        See Also:
        setType(Type), UMLPackage.getOperation_Type()
      • setType

        void setType​(Type value)
        Sets the value of the 'Type' reference.
        Parameters:
        value - the new value of the 'Type' reference.
        See Also:
        getType()
      • setInterface

        void setInterface​(Interface value)
        Sets the value of the 'Interface' container reference.
        Parameters:
        value - the new value of the 'Interface' container reference.
        See Also:
        getInterface()
      • validateAtMostOneReturn

        boolean validateAtMostOneReturn​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                        Map context)
        An operation can have at most one return parameter; i.e., an owned parameter with the direction set to 'return' self.ownedParameter->select(par | par.direction = #return)->size() <= 1
      • validateOnlyBodyForQuery

        boolean validateOnlyBodyForQuery​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                         Map context)
        A bodyCondition can only be specified for a query operation. bodyCondition->notEmpty() implies isQuery
      • getReturnResult

        Parameter getReturnResult()
        Retrieves the (only) return result parameter for this operation.
      • lowerBound

        int lowerBound()
        If this operation has a return parameter, lower equals the value of lower for that parameter. Otherwise lower is not defined. result = if returnResult()->notEmpty() then returnResult()->any().lower else Set{} endif
      • upperBound

        int upperBound()
        If this operation has a return parameter, upper equals the value of upper for that parameter. Otherwise upper is not defined. result = if returnResult()->notEmpty() then returnResult()->any().upper else Set{} endif
      • returnResult

        MDWEList<Parameter> returnResult()
        The query returnResult() returns the set containing the return parameter of the Operation if one exists, otherwise, it returns an empty set result = ownedParameter->select (par | par.direction = #return)