nl.vpro.domain.media.MediaLoader 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.
package nl.vpro.domain.media;
import java.util.Arrays;
import java.util.List;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* @author Michiel Meeuwissen
* @since 3.4
*/
public interface MediaLoader extends MediaProvider {
@NonNull
List loadAll(boolean loadDeleted, List ids);
default List loadAll(List ids){
return loadAll(false, ids);
}
default MediaObject load(boolean loadDeleted, String id) {
return loadAll(loadDeleted, Arrays.asList(id)).get(0);
}
default MediaObject load(String id) {
return load(false, id);
}
@SuppressWarnings("unchecked")
@Override
default T findByMid(boolean loadDeleted, String mid) {
return (T) load(loadDeleted, mid);
}
}