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

net.leanix.dropkit.responses.ListResponse Maven / Gradle / Ivy

There is a newer version: 2.0.10
Show newest version
package net.leanix.dropkit.responses;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import java.util.List;

/**
 * A generic entity container for api responses providing lists.
 *
 *
 *
 * @param 
 * @deprecated
 */
@JsonInclude(Include.NON_NULL)
public abstract class ListResponse extends BasicResponse {

    protected List data;

    public ListResponse() {
        super();
    }

    public ListResponse(List entities) {
        super();
        status = ResponseStatus.OK;
        data = entities;
        if (entities.size() > 0) {
            type = entities.get(0).getClass().getSimpleName();
        }
    }

    @JsonInclude
    public abstract List getData();

    public void setData(List data) {
        this.data = data;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy