|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.sdk.common.DKSequentialCollection | +--com.ibm.mm.sdk.common.DKParts | +--com.ibm.mm.sdk.common.DKSegmentedParts
DKSegmentedParts is a subclass of sequential collection. Its purpose is to hold
part XDO members of a document object.
The DDO representing a document has an attribute with reserved name of
DKSegmentedParts
, its value is a reference to the DKSegmentedParts collection.
DKSegmentedParts inherits the public interface of sequential collection, and a subclass of DKParts but internally it keeps track of member addition and deletion (to be reflected when the DDO is saved to the back-end datastore). In addition to the inherited methods, DKParts has the following additional methods:
Fields inherited from interface com.ibm.mm.sdk.common.DKConstant |
For details, see the class or interface |
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId |
For details, see the class or interface |
Constructor Summary | |
DKSegmentedParts()
Constructs a DKParts object. |
|
DKSegmentedParts(dkCollection fromCollect)
Constructs a DKParts object from another collection object (copy constructor). |
Method Summary | |
void |
addElement(java.lang.Object element)
Adds an element to the end of the collection, and invalidates all of the current iterators. |
void |
addMember(DKDDO item,
dkXDO member)
Add a new member into this parts collection and reflects the results immediately in the datastore, i.e. |
int |
cardinality()
Gets the number of elements in the collection. |
dkIterator |
createIterator()
Creates a new iterator for this collection. |
dkCollection |
getAffiliatedTypes(int affiliatedType)
Gets the specified affiliated type objects from this part collection. |
java.lang.String |
getName()
Gets the name of the collection. |
dkXDO |
getSegment(int pos)
Gets a segment at positon "pos" |
int |
getSegmentCount()
Gets the total number of segments |
dkXDO[] |
getSegmentRange(int startPos,
int nSegs)
Gets a range segments at starting positon "startPos" |
dkSort |
getSortFunction()
Gets the sort function. |
void |
insertElementAt(java.lang.Object element,
dkIterator iter)
Adds a new element, after the element the iterator is currently pointing at. |
void |
removeAllElements()
Removes all elements in the collection and invalidates all other iterators. |
void |
removeElementAt(dkIterator iter)
Removes the element the iterator is currently pointing at. |
void |
removeMember(DKDDO item,
dkXDO member)
Removes a member from this parts collection and reflects the results immediately in the datastore, i.e. |
void |
replaceElementAt(java.lang.Object element,
dkIterator iter)
Replaces the element the iterator is currently pointing at. |
java.lang.Object |
retrieveElementAt(dkIterator iter)
Gets the element that the iterator is pointing at. |
void |
setName(java.lang.String name)
Sets the name of the collection. |
void |
setSegment(int pos,
dkXDO segObj)
Sets a segment at positon "pos" |
void |
setSegmentCount(int nSegs)
Sets the total number of segments |
void |
setSegmentRange(int startPos,
dkXDO[] segObjs)
Sets a range segments at starting positon "startPos" |
void |
setSortFunction(dkSort sortFunction)
Sets the sort function for sorting this collection. |
void |
sort()
Sorts the elements in this collection using the sort function. |
void |
sort(boolean order)
Sorts the elements in this collection in the given order using the sort function. |
void |
sort(dkSort sortFunction,
boolean sortOrder)
Sorts the elements in this collection using the given sort function and sort order. |
Methods inherited from class com.ibm.mm.sdk.common.DKSequentialCollection |
getAssociatedAttrName, getOwner |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.mm.sdk.common.dkCollection |
addAllElements |
Constructor Detail |
public DKSegmentedParts()
public DKSegmentedParts(dkCollection fromCollect) throws DKUsageError
fromCollect
- collection of elements to addMethod Detail |
public dkXDO getSegment(int pos) throws DKException, java.lang.ArrayIndexOutOfBoundsException, java.lang.Exception
pos
- index of the segment to be returnedjava.lang.ArrayIndexOutOfBoundsException
- if the index "pos" is larger
than the total number of segments.public void setSegment(int pos, dkXDO segObj) throws DKException, java.lang.ArrayIndexOutOfBoundsException, java.lang.Exception
pos
- index of the segment to be returnedsegObj
- object containing the segmentjava.lang.ArrayIndexOutOfBoundsException
- if the index "pos" is larger
than the total number of segments.public dkXDO[] getSegmentRange(int startPos, int nSegs) throws DKException, java.lang.ArrayIndexOutOfBoundsException, java.lang.Exception
startPos
- index of the starting segment to be returnednSegs
- the number of the segments to be returnedjava.lang.ArrayIndexOutOfBoundsException
- if the index "startPos" or "startPos"
plus "nSegs" is larger than the total number of segments.public void setSegmentRange(int startPos, dkXDO[] segObjs) throws DKException, java.lang.ArrayIndexOutOfBoundsException, java.lang.Exception
startPos
- index of the starting segment to be setsegObjs
- an array of dkXDO objects containing the segmentsjava.lang.ArrayIndexOutOfBoundsException
- if the index "startPos" or "startPos"
plus length of the inserting array is larger than the total number of segments.public int getSegmentCount()
public void setSegmentCount(int nSegs)
nSegs
- number of segmentspublic dkCollection getAffiliatedTypes(int affiliatedType) throws DKException, java.lang.Exception
getAffiliatedTypes
in class DKParts
affiliatedType
- the desired affiliated type to extract.public void addMember(DKDDO item, dkXDO member) throws DKException, java.lang.Exception
member.add()
and this.addElement(member)
, where member
is the
part XDO and this
is the collection of parts (DKParts) in this
item
.addMember
in class DKParts
item
- the data object that contains this parts collectionmember
- the member to be added to this parts collectionpublic void removeMember(DKDDO item, dkXDO member) throws DKException, java.lang.Exception
this.removeElement(member)
and member.del()
, where member
is the
part XDO and this
is the collection of parts (DKParts) in this
item
.removeMember
in class DKParts
item
- the data object that contains this parts collectionmember
- thr member to be removed from this parts collectionpublic int cardinality()
cardinality
in class DKSequentialCollection
public dkIterator createIterator()
createIterator
in class DKSequentialCollection
public java.lang.Object retrieveElementAt(dkIterator iter) throws DKUsageError
retrieveElementAt
in class DKSequentialCollection
iter
- location in collection to retrieve an object.public void addElement(java.lang.Object element) throws DKUsageError
addElement
in class DKSequentialCollection
element
- element to be added.public void insertElementAt(java.lang.Object element, dkIterator iter) throws DKUsageError
insertElementAt
in class DKSequentialCollection
element
- element to be added.iter
- location in collection.public void replaceElementAt(java.lang.Object element, dkIterator iter) throws DKUsageError
replaceElementAt
in class DKSequentialCollection
element
- element to be added.iter
- location in collection.public void removeElementAt(dkIterator iter) throws DKUsageError
removeElementAt
in class DKSequentialCollection
iter
- location in collection .public void removeAllElements() throws DKUsageError
removeAllElements
in class DKSequentialCollection
public void setName(java.lang.String name)
setName
in class DKSequentialCollection
name
- collection name.public java.lang.String getName()
getName
in class DKSequentialCollection
public void setSortFunction(dkSort sortFunction)
setSortFunction
in class DKSequentialCollection
sortFunction
- the sort function.public dkSort getSortFunction()
getSortFunction
in class DKSequentialCollection
public void sort() throws DKUsageError
sort
in class DKSequentialCollection
sort(dkSort sortFunction, boolean sortOrder)
public void sort(boolean order) throws DKUsageError
sort
in class DKSequentialCollection
order
- a boolean value indicating the sort order.
If true sort in ascending order, otherwise sort in descending order.sort(dkSort sortFunction, boolean sortOrder)
public void sort(dkSort sortFunction, boolean sortOrder) throws DKUsageError
sortFunction
is a function object which defines the method to get
the object key and perform comparison on them.sort
in class DKSequentialCollection
sortFunction
- the sort function.sortOrder
- a boolean value indicating the sort order.
If true
sort in ascending order, otherwise sort in descending order.
|
EIP Java APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |