All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ning.api.client.json.ItemsResponse Maven / Gradle / Ivy

There is a newer version: 0.5.1
Show newest version
package com.ning.api.client.json;

import java.util.*;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonProperty;

/**
 * Response type used for "multi-get" requests; includes set of result items
 * along with possible sub-resources.
 * 
 * @param  Type of items contained in response; usually a subtype of
 * {@link com.ning.api.client.item.ContentItem}
 */
public class ItemsResponse extends ResponseWithResources
{
    @JsonProperty
    private List entry;
    
    public ItemsResponse() { }

    public List getEntry()
    {
        // for convenience let's ensure it's never null
        if (entry == null) {
            return Collections.emptyList();
        }
        return entry;
    }

    // ignore so it won't be serialized
    @JsonIgnore
    public boolean isEmpty() { return (entry == null) || entry.isEmpty(); }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy