nl.vpro.domain.media.search.AbstractScoredSearchResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of media-domain Show documentation
Show all versions of media-domain Show documentation
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.
/*
* Copyright (C) 2010 Licensed under the Apache License, Version 2.0
* VPRO The Netherlands
*/
package nl.vpro.domain.media.search;
import lombok.Getter;
import lombok.Setter;
import java.util.Collections;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;
@XmlType(
propOrder =
{
"count",
"result"
}
)
@XmlAccessorType(XmlAccessType.PROPERTY)
public abstract class AbstractScoredSearchResult implements ScoredSearchResult {
/**
* The total number of results (when no pager would have been applied)
*/
@Getter
@Setter
protected Long count;
protected List> result;
public AbstractScoredSearchResult() {
}
protected AbstractScoredSearchResult(final Long count, final List> result) {
this.count = count;
this.result = Collections.unmodifiableList(result);
}
@Override
public final List> getScoredResult() {
return result;
}
public final void setScoredResult(List> l) {
this.result = Collections.unmodifiableList(l);
this.count = (long) l.size();
}
@Override
public String toString() {
return "" + result;
}
}