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

nl.vpro.domain.api.GenericMediaSearchResult Maven / Gradle / Ivy

Go to download

Contains the objects used by the Frontend API, like forms and result objects

There is a newer version: 8.3.3
Show newest version
package nl.vpro.domain.api;

import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

import com.fasterxml.jackson.annotation.JsonPropertyOrder;

import nl.vpro.domain.api.media.MediaFacetsResult;
import nl.vpro.domain.media.MediaObject;

/**
 * @author Michiel Meeuwissen
 * @since 2.0
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "genericMediaSearchResultType", propOrder = {"facets", "selectedFacets"})
@JsonPropertyOrder({"facets", "selectedFacets"})
public class GenericMediaSearchResult extends SearchResult {

    @XmlElement
    private MediaFacetsResult facets;

    @XmlElement
    private MediaFacetsResult selectedFacets;

    public GenericMediaSearchResult() {
    }

    public GenericMediaSearchResult(List> list, Long offset, Integer max, Total total) {
        super(list, offset, max, total);
    }

    protected GenericMediaSearchResult(SearchResult sr) {
        super(sr);
    }

    public GenericMediaSearchResult(List> list, MediaFacetsResult facets, Long offset, Integer max,  Total total) {
        super(list, offset, max, total);
        this.facets = facets;
    }

    public MediaFacetsResult getFacets() {
        return facets;
    }

    public void setFacets(MediaFacetsResult facets) {
        this.facets = facets;
    }

    public MediaFacetsResult getSelectedFacets() {
        return selectedFacets;
    }

    protected MediaFacetsResult getSelectedFacetsNotNull() {
        if (selectedFacets == null) {
            selectedFacets = new MediaFacetsResult();
        }
        return selectedFacets;
    }

    public void setSelectedFacets(MediaFacetsResult selected) {
        this.selectedFacets = selected;
    }



}