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

nl.vpro.domain.api.page.RelationFacet 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
/*
 * Copyright (C) 2014 All rights reserved
 * VPRO The Netherlands
 */
package nl.vpro.domain.api.page;

import javax.validation.Valid;
import javax.xml.bind.annotation.*;

import com.fasterxml.jackson.annotation.JsonPropertyOrder;

import nl.vpro.domain.api.FacetOrder;
import nl.vpro.domain.api.NameableSearchableLimitableFacet;

/**
 * @author Michiel Meeuwissen
 * @since 4.1
 */
@XmlAccessorType(XmlAccessType.PROPERTY)
@XmlType(name = "pageRelationFacetType", propOrder = {"name", "subSearch"})
@JsonPropertyOrder({"threshold", "sort", "offset", "max", "name", "subSearch"})
public class RelationFacet extends ExtendedPageFacet implements NameableSearchableLimitableFacet {

    private String name;

    @Valid
    private RelationSearch subSearch;


    public RelationFacet() {
    }


    public RelationFacet(Integer threshold, FacetOrder sort, Integer max) {
        super(threshold, sort, max);
    }

    @Override
    public boolean hasSubSearch() {
        return subSearch != null && subSearch.hasSearches();
    }

    @Override
    @XmlElement
    public RelationSearch getSubSearch() {
        return subSearch;
    }

    @Override
    public void setSubSearch(RelationSearch subSearch) {
        this.subSearch = subSearch;
    }

    @XmlAttribute
    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public void setName(String name) {
        this.name = name;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy