package org.osiam.client.query;
/*
 * for licensing see the file license.txt.
 */

import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.osiam.resources.scim.CoreResource;

import java.util.Collections;
import java.util.Set;

@JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
public class QueryResult<T extends CoreResource> {

    private int totalResults;
    private int itemsPerPage;
    private int startIndex;
    private String schemas;
    @JsonProperty("Resources")
    private Set<T> resources;

    public int getTotalResults() {
        return totalResults;
    }

    public int getItemsPerPage() {
        return itemsPerPage;
    }

    public int getStartIndex() {
        return startIndex;
    }

    public String getSchemas() {
        return schemas;
    }

    public Set<T> getResources() {
        return Collections.unmodifiableSet(resources);
    }
}

@@ -277,18 +277,19 @@
 va.util.
-Se
+Lis
 t;%0A%0A@Jso
@@ -555,18 +555,19 @@
 private 
-Se
+Lis
 t%3CT%3E res
@@ -859,18 +859,19 @@
  public 
-Se
+Lis
 t%3CT%3E get
@@ -923,18 +923,19 @@
 difiable
-Se
+Lis
 t(resour

Use List instead of Set to make sure that the returned order is preserved