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

nl.vpro.domain.constraint.media.HasAgeRatingConstraint Maven / Gradle / Ivy

Go to download

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

The newest version!
/*
 * Copyright (C) 2013 Licensed under the Apache License, Version 2.0
 * VPRO The Netherlands
 */
package nl.vpro.domain.constraint.media;

import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;

import nl.vpro.domain.constraint.ExistsConstraint;
import nl.vpro.domain.media.MediaObject;

/**
 * @author Michiel Meeuwissen
 * @since 4.9
 */
@XmlAccessorType(XmlAccessType.NONE)
@XmlType(name = "hasAgeRatingConstraintType")
public class HasAgeRatingConstraint implements ExistsConstraint {

    @Override
    public String getESPath() {
        return "ageRating";
    }

    @Override
    public boolean test(MediaObject input) {
        return input.getAgeRating() != null;
    }

    @Override
    public String toString() {
        return getClass().getSimpleName();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy