* @return FilterOptions object
*/
public static FilterOptions convertCollectionOptionsToFilterOptions
(CollectionOptions collectionOptions) {
FilterOptions filterOptions = new FilterOptionsImpl();
FilterOptions options = new FilterOptionsImpl();
if (collectionOptions != null) {
if (collectionOptions.getFilter() != null) {
options.setFilter(collectionOptions.getFilter());
}
if (collectionOptions.getFilterValue() != null) {
options.setFilterValue(collectionOptions.getFilterValue());
}
if (collectionOptions.getFilterOperation() != null &&
collectionOptions.getFilterOperation().name() != null) {
options.setFilterOperation(
FilterOperation.valueOf(collectionOptions.getFilterOperation().name()));
}
options.setFirst(collectionOptions.getFirst());
options.setMax(collectionOptions.getMax());
if (collectionOptions.getSortBy() != null) {
options.setSortBy(collectionOptions.getSortBy());
}
if (collectionOptions.getUpdatedSince() != null) {
options.setUpdatedSince(collectionOptions.getUpdatedSince());
}
if (collectionOptions.getSortOrder() != null &&
collectionOptions.getSortOrder().name() != null) {
options.setSortOrder(SortOrder.valueOf(collectionOptions.getSortOrder().name()));
}
return filterOptions;
} else {
return null;