|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ItemsCollection
A collection of Exchange items.
The collection allows to get, iterate over, search and sort Exchange items.
This class implements the Iterable interface allowing it to be a target of the foreach statement.
Method Summary | |
---|---|
java.lang.Iterable<ExchangeItem> |
iterableForCalendar(java.util.Date startDate,
java.util.Date endDate)
Creates a special Iterable object for a Calendar folder containing items between the specified dates. |
java.lang.Iterable<ExchangeItem> |
iterableForCalendar(java.util.Date startDate,
java.util.Date endDate,
int maxItemsReturned)
Creates a special Iterable object for a Calendar folder containing items between the specified dates, limiting the result set to the specified maximum. |
java.lang.Iterable<ExchangeItem> |
iterableFromIndex(int startFromIndex)
Creates a new Iterable for items in this collection starting at the specified index. |
java.lang.Iterable<ExchangeItem> |
iterableFromIndex(int startFromIndex,
int maxItemsReturned)
Creates a new Iterable for items in this collection starting at the specified index and limits the returned result set to the specified maximum of items. |
ItemsIterator |
iterator()
Creates an iterator for all items in this collection. |
ItemsIterator |
iteratorForCalendar(java.util.Date startDate,
java.util.Date endDate)
Creates a special iterator for a Calendar folder containing items between the specified dates. |
ItemsIterator |
iteratorForCalendar(java.util.Date startDate,
java.util.Date endDate,
int maxItemsReturned)
Creates a special iterator for a Calendar folder containing items between the specified dates, limiting the result set to the specified maximum. |
ItemsIterator |
iteratorFromIndex(int startFromIndex)
Creates a new iterator for items in this collection starting at the specified index. |
ItemsIterator |
iteratorFromIndex(int startFromIndex,
int maxItemsReturned)
Creates a new iterator for items in this collection starting at the specified index and limits the returned result set to the specified maximum of items. |
ItemsCollection |
restrict(Restriction restriction)
Creates a new collection restricted to items that matches the specified restriction criteria. |
void |
setLoadAllProperties(boolean loadAllProperties)
|
void |
setLoadOnlyItemId(boolean loadOnlyId)
|
ItemsCollection |
sortBy(ExchangeItemField sortByField)
Creates a new collection with items sorted by the specified field in ascending order. |
ItemsCollection |
sortBy(ExchangeItemField sortByField,
boolean ascendingOrder)
Creates a new collection with items sorted by the specified field in either ascending or descending order. |
Methods inherited from interface com.moyosoft.exchange.util.ExchangeCollection |
---|
getAt, getCount |
Method Detail |
---|
java.lang.Iterable<ExchangeItem> iterableFromIndex(int startFromIndex) throws ExchangeServiceException
This method never returns null, even if the collection is empty or there are no more items after the specified index. An empty Iterable will be returned in this case.
To iterate over all items in this collection use the method iterator()
.
ExchangeServiceException
- if any errors occur during the communication with Exchange.iterator()
java.lang.Iterable<ExchangeItem> iterableFromIndex(int startFromIndex, int maxItemsReturned) throws ExchangeServiceException
This method never returns null, even if the collection is empty or there are no more items after the specified index. An empty Iterable will be returned in this case.
To iterate over all items in this collection use the method iterator()
.
ExchangeServiceException
- if any errors occur during the communication with Exchange.iterator()
ItemsIterator iterator()
This method never returns null, even if the collection is empty. An empty iterator will be returned in this case.
iterator
in interface java.lang.Iterable<ExchangeItem>
ItemsIterator iteratorFromIndex(int startFromIndex) throws ExchangeServiceException
This method never returns null, even if the collection is empty or there are no more items after the specified index. An empty iterator will be returned in this case.
To iterate over all items in this collection use the method iterator()
.
ExchangeServiceException
- if any errors occur during the communication with Exchange.iterator()
ItemsIterator iteratorFromIndex(int startFromIndex, int maxItemsReturned) throws ExchangeServiceException
This method never returns null, even if the collection is empty or there are no more items after the specified index. An empty iterator will be returned in this case.
To iterate over all items in this collection use the method iterator()
.
ExchangeServiceException
- if any errors occur during the communication with Exchange.iterator()
ItemsCollection restrict(Restriction restriction) throws ExchangeServiceException
To create the restriction criteria, use the class If
.
This class allows criteria to be specified on item's fields and creates the Restriction object.
Example code matching items with a Subject that starts with "Test":
ItemsCollection items = ...;
items = items.restrict(If.Item.Subject.startsWith("Test"));
ExchangeServiceException
- if any errors occur during the communication with Exchange.If
ItemsCollection sortBy(ExchangeItemField sortByField)
ExchangeServiceException
- if any errors occur during the communication with Exchange.ItemsCollection sortBy(ExchangeItemField sortByField, boolean ascendingOrder)
ascendingOrder
- if true items will be sorted in ascending order.
ExchangeServiceException
- if any errors occur during the communication with Exchange.ItemsIterator iteratorForCalendar(java.util.Date startDate, java.util.Date endDate) throws ExchangeServiceException
This method never returns null, even if the collection is empty. An empty iterator will be returned in this case.
ExchangeServiceException
java.lang.Iterable<ExchangeItem> iterableForCalendar(java.util.Date startDate, java.util.Date endDate) throws ExchangeServiceException
This method never returns null, even if the collection is empty. An empty Iterable will be returned in this case.
ExchangeServiceException
ItemsIterator iteratorForCalendar(java.util.Date startDate, java.util.Date endDate, int maxItemsReturned) throws ExchangeServiceException
This method never returns null, even if the collection is empty. An empty iterator will be returned in this case.
ExchangeServiceException
java.lang.Iterable<ExchangeItem> iterableForCalendar(java.util.Date startDate, java.util.Date endDate, int maxItemsReturned) throws ExchangeServiceException
This method never returns null, even if the collection is empty. An empty Iterable will be returned in this case.
ExchangeServiceException
void setLoadOnlyItemId(boolean loadOnlyId)
void setLoadAllProperties(boolean loadAllProperties)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |