org.mydm.core
Class EDocResSetImpl

java.lang.Object
  extended byorg.mydm.core.EDocResSetImpl
All Implemented Interfaces:
EDocResSet

public class EDocResSetImpl
extends java.lang.Object
implements EDocResSet

Simple Implementation of the EDocResSet interface. This is a basic implementation by using ArrayList. This can be a performace issue.


Constructor Summary
EDocResSetImpl()
          Constructor
EDocResSetImpl(EDocument[] edocs)
          Constructor to construct from an array of EDocument objects.
 
Method Summary
 void addEDoc(EDocument edoc)
          Adds an EDocument to the container
 void addEDocs(EDocResSet edocresset)
          Adds the EDocuments from the EDocResSet to the current set.
 void addEDocs(EDocument[] edocr)
          Adds an array of EDocument Objects.
 void clear()
          Clears the Current set
 EDocument getEDoc(long index)
          Gets the EDocument at particular index.
 EDocResSet getEDocs(long from, long to)
          Returns the EDocResSet of certain range.
 EDocument[] getEDocsAsArray(long from, long to)
          Returns an array of EDocument Object.
 EDocResIterator getIterator()
          Gets an iterator for the container
 long getSize()
          Gets the size of the set
 void removeEDoc(long index)
          Removes an EDocument at a given index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EDocResSetImpl

public EDocResSetImpl()
Constructor


EDocResSetImpl

public EDocResSetImpl(EDocument[] edocs)
Constructor to construct from an array of EDocument objects.

Parameters:
edocs -
Method Detail

clear

public void clear()
Description copied from interface: EDocResSet
Clears the Current set

Specified by:
clear in interface EDocResSet

addEDoc

public void addEDoc(EDocument edoc)
Description copied from interface: EDocResSet
Adds an EDocument to the container

Specified by:
addEDoc in interface EDocResSet
Parameters:
edoc -

getIterator

public EDocResIterator getIterator()
Description copied from interface: EDocResSet
Gets an iterator for the container

Specified by:
getIterator in interface EDocResSet
Returns:
iterator EDocResIterator

getEDoc

public EDocument getEDoc(long index)
                  throws MyDMException
Description copied from interface: EDocResSet
Gets the EDocument at particular index.

Specified by:
getEDoc in interface EDocResSet
Parameters:
index - the index of the EDocument to retrieve
Returns:
edoc EDocument
Throws:
MyDMException

getSize

public long getSize()
Description copied from interface: EDocResSet
Gets the size of the set

Specified by:
getSize in interface EDocResSet
Returns:
size of the set

removeEDoc

public void removeEDoc(long index)
                throws MyDMException
Description copied from interface: EDocResSet
Removes an EDocument at a given index.

Specified by:
removeEDoc in interface EDocResSet
Parameters:
index -
Throws:
MyDMException

getEDocs

public EDocResSet getEDocs(long from,
                           long to)
                    throws MyDMException
Description copied from interface: EDocResSet
Returns the EDocResSet of certain range.

Specified by:
getEDocs in interface EDocResSet
Parameters:
from - start index
to - stop index
Returns:
edocs result set
Throws:
MyDMException

addEDocs

public void addEDocs(EDocResSet edocresset)
Description copied from interface: EDocResSet
Adds the EDocuments from the EDocResSet to the current set.

Specified by:
addEDocs in interface EDocResSet
Parameters:
edocresset - edocresource set

addEDocs

public void addEDocs(EDocument[] edocr)
Description copied from interface: EDocResSet
Adds an array of EDocument Objects.

Specified by:
addEDocs in interface EDocResSet
Parameters:
edocr - array of EDocument Objects.

getEDocsAsArray

public EDocument[] getEDocsAsArray(long from,
                                   long to)
                            throws MyDMException
Description copied from interface: EDocResSet
Returns an array of EDocument Object. This can be very handy.

Specified by:
getEDocsAsArray in interface EDocResSet
Parameters:
from - start index
to - until index
Returns:
Array of EDocument Objects
Throws:
MyDMException