EDMAggregate

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 Summary

      All Methods Instance Methods Abstract Methods 

      Modifier and TypeMethod and Description
      voidappend(EDMSelect value)
      Add (append) a single value to an aggregate
      voidappend(EDMSelect[] values)
      Add (append) multiple values to an aggregate
      EDMAggregateappendNestedAggregate(EDMSelect type)
      Append a nested aggregate to end of this aggregate
      intdelete(EDMSelect value)
      Delete a single value to an aggregate.
      intgetAggregateType()
      retrieve the SDAI type for wrapped aggregate
      EDMSelectgetElement(int index)
      Get aggregate element by index
      EDMSelect[]getElements(int startIndex, int maxElements)
      Get multiple aggregate elements by index
      long[]getIdArray()
      Get a (java) array of instance IDs for an instance aggregate.
      intgetMemberCount()
      Gets the number of elements in the aggregate or the size in the case of array.
      voidinsertElementAfter(int index, EDMSelect element)
      Insert value(s) after a given index for ordered aggregates
      voidinsertElementBefore(int index, EDMSelect element)
      Insert value(s) before a given index for ordered aggregates
      voidinsertElementsAfter(int index, EDMSelect[] elements)
      Insert value(s) after a given index for ordered aggregates
      voidinsertElementsBefore(int index, EDMSelect[] elements)
      Insert value(s) before a given index for ordered aggregates
      EDMAggregateinsertNestedAggregateAfter(int index, EDMSelect type)
      Insert a nested aggregate after a given index for ordered aggregates
      EDMAggregateinsertNestedAggregateBefore(int index, EDMSelect type)
      Insert a nested aggregate in before a given index for ordered aggregates
      voidprepend(EDMSelect value)
      Prepend (insert in front) a single value to an aggregate
      voidprepend(EDMSelect[] values)
      Prepend (insert in front) multiple values to an aggregate
      EDMAggregateprependNestedAggregate(EDMSelect type)
      Append a nested aggregate in front of this aggregate
      voidsetAggregateType(int type)
      Enforce an SDAI type for wrapped aggregate
      • Methods inherited from interface edm.edom3.EDMData

        exists, getInstanceId, getName, getOwner, isLocal, isRemote
    • 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 retrieveReturns:values, if length is smaller than maxElements aggregate was not longerThrows: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 insertThrows: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 insertThrows: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 insertThrows: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 insertThrows: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 aggregateindex - the element will be inserted *after* this indexReturns:the created aggregateThrows: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 aggregateindex - the element will be inserted *before* this indexReturns:the created aggregateThrows: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 addThrows: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 addThrows: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 aggregateReturns:the created aggregateThrows:EdmiException - if the method fails

      • getAggregateType

        int getAggregateType()
                      throws EdmiException

        retrieve the SDAI type for wrapped aggregate

        Returns:ARRAY,BAG,LIST, or SETThrows:EdmiException - If the method fails.See Also:EDMConstants.AggregateTypes

      • setAggregateType

        void setAggregateType(int type)
                       throws EdmiException

        Enforce an SDAI type for wrapped aggregate

        Parameters:type - ARRAY,BAG,LIST, or SETThrows:EdmiException - If the method fails.See Also:EDMConstants.AggregateTypes

      • 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 arrayThrows:EdmiException - if the method fails