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

nl.vpro.domain.media.search.MemberRefItem 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.Getter;
import lombok.Setter;

import java.time.Instant;

import nl.vpro.domain.media.MemberRef;

/**
 * @author Michiel Meeuwissen
 * @since 3.5
 */

@Getter
@Setter
public class MemberRefItem {

    private Long id;

    private Integer number;

    private MediaListItem member;

    private MediaListItem owner;

    private Instant added;

    private Boolean highlighted;

    public static MemberRefItem create(MemberRef ref, MediaListItem member) {
        MemberRefItem item = new MemberRefItem();
        item.setId(ref.getId());
        item.setNumber(ref.getNumber());
        item.setAdded(ref.getAdded());
        item.setHighlighted(ref.isHighlighted());
        item.setMember(member);
        item.setOwner(new MediaListItem(ref.getGroup()));
        return item;
    }

    public static MemberRefItem create(MemberRef ref) {
        return create(ref, new MediaListItem(ref.getMember()));
    }

    @Override
    public String toString() {
        return getClass().getSimpleName() + ":" + owner + "-" + number + "->" + member;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy