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 withgetAttr()
calls and created withcreateAggrAttr()
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 Type Method Description void
append(EDMSelect value)
Add (append) a single value to an aggregatevoid
append(EDMSelect[] values)
Add (append) multiple values to an aggregateEDMAggregate
appendNestedAggregate(EDMSelect type)
Append a nested aggregate to end of this aggregateint
delete(EDMSelect value)
Delete a single value to an aggregate.int
getAggregateType()
retrieve the SDAI type for wrapped aggregateEDMSelect
getElement(int index)
Get aggregate element by indexEDMSelect[]
getElements(int startIndex, int maxElements)
Get multiple aggregate elements by indexlong[]
getIdArray()
Get a (java) array of instance IDs for an instance aggregate.int
getMemberCount()
Gets the number of elements in the aggregate or the size in the case of array.void
insertElementAfter(int index, EDMSelect element)
Insert value(s) after a given index for ordered aggregatesvoid
insertElementBefore(int index, EDMSelect element)
Insert value(s) before a given index for ordered aggregatesvoid
insertElementsAfter(int index, EDMSelect[] elements)
Insert value(s) after a given index for ordered aggregatesvoid
insertElementsBefore(int index, EDMSelect[] elements)
Insert value(s) before a given index for ordered aggregatesEDMAggregate
insertNestedAggregateAfter(int index, EDMSelect type)
Insert a nested aggregate after a given index for ordered aggregatesEDMAggregate
insertNestedAggregateBefore(int index, EDMSelect type)
Insert a nested aggregate in before a given index for ordered aggregatesvoid
prepend(EDMSelect value)
Prepend (insert in front) a single value to an aggregatevoid
prepend(EDMSelect[] values)
Prepend (insert in front) multiple values to an aggregateEDMAggregate
prependNestedAggregate(EDMSelect type)
Append a nested aggregate in front of this aggregatevoid
setAggregateType(int type)
Enforce an SDAI type for wrapped aggregate-
Methods inherited from interface edm.edom3.EDMContextDependent
getContext
-
-
-
-
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 aggregateindex
- 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 aggregateindex
- 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
-
getAggregateType
int getAggregateType() throws EdmiException
retrieve the SDAI type for wrapped aggregate- Returns:
- ARRAY,BAG,LIST, or SET
- Throws:
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 SET- Throws:
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 array
- Throws:
EdmiException
- if the method fails
-
-