*
* @param parameters parameter for contact quest
*/
private void queryEntries(ContactsExampleParameters parameters)
throws IOException, ServiceException {
Query myQuery = new Query(feedUrl);
if (parameters.getUpdatedMin() != null) {
DateTime startTime = DateTime.parseDateTime(parameters.getUpdatedMin());
myQuery.setUpdatedMin(startTime);
}
if (parameters.getMaxResults() != null) {
myQuery.setMaxResults(parameters.getMaxResults().intValue());
}
if (parameters.getStartIndex() != null) {
myQuery.setStartIndex(parameters.getStartIndex());
}
if (parameters.isShowDeleted()) {
myQuery.setStringCustomParameter("showdeleted", "true");
}
if (parameters.getRequireAllDeleted() != null) {
myQuery.setStringCustomParameter("requirealldeleted",
parameters.getRequireAllDeleted());
}
if (parameters.getSortorder() != null) {
myQuery.setStringCustomParameter("sortorder", parameters.getSortorder());
}
if (parameters.getOrderBy() != null) {
myQuery.setStringCustomParameter("orderby", parameters.getOrderBy());
}
if (parameters.getGroup() != null) {
myQuery.setStringCustomParameter("group", parameters.getGroup());
}
try {
if (parameters.isGroupFeed()) {
ContactGroupFeed groupFeed = service.query(
myQuery, ContactGroupFeed.class);