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

nl.vpro.domain.media.search.EditorSearch Maven / Gradle / Ivy

Go to download

The basic domain classes for 'media', the core of POMS. Also, the 'update' XML bindings for it. It also contains some closely related domain classes like the enum to contain NICAM kijkwijzer settings.

There is a newer version: 8.3.1
Show newest version
package nl.vpro.domain.media.search;

import lombok.Data;

import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlValue;

/**
 * @author Michiel Meeuwissen
 * @since 5.5
 */
@Data
@XmlAccessorType(XmlAccessType.NONE)
public class EditorSearch {


    @XmlAttribute
    private Boolean principalId;

    @XmlValue
    String text;

    public static EditorSearch name(String text) {
        if (text == null) {
            return null;
        }
        EditorSearch search = new EditorSearch();
        search.text = text;
        search.principalId = null;
        return search;
    }

    public static EditorSearch id(String text) {
        if (text == null) {
            return null;
        }
        EditorSearch search = new EditorSearch();
        search.text = text;
        search.principalId = true;
        return search;
    }

    public boolean isPrincipalId() {
        return principalId == Boolean.TRUE;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy