Package edm.edom3

Interface EDMAggregate

  • All Superinterfaces:
    EDMContextDependent, EDMData

    public interface EDMAggregate
    extends EDMData
    The EDMAggregate interface wraps aggregate data. There are two types of aggregates, database aggregates an in-memory aggregates. An example of the latter is an aggregate returned from Select Instances operation. Usually the user do not need to care too much about the type, the exception is when writing to the database, when only database aggregates are applicable. Database aggregates are returned with getAttr() calls and created with createAggrAttr() calls. Copyright(C) EPM Technology AS.
    Version:
    3.0
    Author:
    Arne Toen - EPM Technology AS.
    • Method Detail

      • append

        void append​(EDMSelect value)
             throws EdmiException
        Add (append) a single value to an aggregate
        Parameters:
        value - value to add
        Throws:
        EdmiException - if the method fails
      • append

        void append​(EDMSelect[] values)
             throws EdmiException
        Add (append) multiple values to an aggregate
        Parameters:
        values - values to add
        Throws:
        EdmiException - if the method fails
      • appendNestedAggregate

        EDMAggregate appendNestedAggregate​(EDMSelect type)
                                    throws EdmiException
        Append a nested aggregate to end of this aggregate
        Parameters:
        type - if != null create a typed aggregate
        Returns:
        the created aggregate
        Throws:
        EdmiException - if the method fails
      • delete

        int delete​(EDMSelect value)
            throws EdmiException
        Delete a single value to an aggregate. All occurrences of the value will be deleted.
        Parameters:
        value - value to delete
        Returns:
        number of elements deleted
        Throws:
        EdmiException - if the method fails
      • getElement

        EDMSelect getElement​(int index)
                      throws EdmiException
        Get aggregate element by index
        Parameters:
        index - position 0-(members-1)
        Returns:
        aggregate element, if nonexistent type== INDETERMINATE
        Throws:
        EdmiException - if outside bounds or other error
      • getElements

        EDMSelect[] getElements​(int startIndex,
                                int maxElements)
                         throws EdmiException
        Get multiple aggregate elements by index
        Parameters:
        startIndex - index position 0-(members-1)
        maxElements - max # of elements to retrieve
        Returns:
        values, if length is smaller than maxElements aggregate was not longer
        Throws:
        EdmiException - If the method fails.
      • getMemberCount

        int getMemberCount()
                    throws EdmiException
        Gets the number of elements in the aggregate or the size in the case of array.
        Returns:
        The number of elements in this aggregate or the size of this array.
        Throws:
        EdmiException - If the method fails.
      • insertElementAfter

        void insertElementAfter​(int index,
                                EDMSelect element)
                         throws EdmiException
        Insert value(s) after a given index for ordered aggregates
        Parameters:
        index - position to insert relative to 0-(members-1)
        element - value to insert
        Throws:
        EdmiException - if the method fails
      • insertElementsAfter

        void insertElementsAfter​(int index,
                                 EDMSelect[] elements)
                          throws EdmiException
        Insert value(s) after a given index for ordered aggregates
        Parameters:
        index - position to insert relative to 0-(members-1)
        elements - values to insert
        Throws:
        EdmiException - if the method fails
      • insertElementBefore

        void insertElementBefore​(int index,
                                 EDMSelect element)
                          throws EdmiException
        Insert value(s) before a given index for ordered aggregates
        Parameters:
        index - position to insert relative to 0-(members-1)
        element - value to insert
        Throws:
        EdmiException - if the method fails
      • insertElementsBefore

        void insertElementsBefore​(int index,
                                  EDMSelect[] elements)
                           throws EdmiException
        Insert value(s) before a given index for ordered aggregates
        Parameters:
        index - position to insert relative to 0-(members-1)
        elements - values to insert
        Throws:
        EdmiException - if the method fails
      • insertNestedAggregateAfter

        EDMAggregate insertNestedAggregateAfter​(int index,
                                                EDMSelect type)
                                         throws EdmiException
        Insert a nested aggregate after a given index for ordered aggregates
        Parameters:
        type - if != null create a typed aggregate
        index - the element will be inserted *after* this index
        Returns:
        the created aggregate
        Throws:
        EdmiException - if the method fails
      • insertNestedAggregateBefore

        EDMAggregate insertNestedAggregateBefore​(int index,
                                                 EDMSelect type)
                                          throws EdmiException
        Insert a nested aggregate in before a given index for ordered aggregates
        Parameters:
        type - if != null create a typed aggregate
        index - the element will be inserted *before* this index
        Returns:
        the created aggregate
        Throws:
        EdmiException - if the method fails
      • prepend

        void prepend​(EDMSelect value)
              throws EdmiException
        Prepend (insert in front) a single value to an aggregate
        Parameters:
        value - value to add
        Throws:
        EdmiException - if the method fails
      • prepend

        void prepend​(EDMSelect[] values)
              throws EdmiException
        Prepend (insert in front) multiple values to an aggregate
        Parameters:
        values - values to add
        Throws:
        EdmiException - if the method fails
      • prependNestedAggregate

        EDMAggregate prependNestedAggregate​(EDMSelect type)
                                     throws EdmiException
        Append a nested aggregate in front of this aggregate
        Parameters:
        type - if != null create a typed aggregate
        Returns:
        the created aggregate
        Throws:
        EdmiException - if the method fails
      • getIdArray

        long[] getIdArray()
                   throws EdmiException
        Get a (java) array of instance IDs for an instance aggregate. If you do not understand what this means, you probably does nopt need this method.
        Returns:
        instance ID array
        Throws:
        EdmiException - if the method fails