package com.sonymusic.dx.dxadvsearchservice.searchModel;

public class ParticipantSearchModel {
    private String participantName;
    private Long participantNumber;
    private boolean preferredParticipant;
    private ParticipantRequestModel dataSource;
    private ParticipantRequestModel type;
    private ParticipantRequestModel subType;
    private boolean mainArtist;
    private ParticipantRequestModel repertoireOwner;

    public static class ParticipantRequestModel {
        private Object key;
        private String name;


        public ParticipantRequestModel(Object key,String name){
            this.key = key;
            this.name=name;
        }

        public  Object getKey(){
            return key;
        }

        public void setKey(Object key){
            this.key = key;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Long getKeyAsLong(){
            if (key instanceof Long){
                return (Long) key;
            }
            if (key instanceof String){
                return Long.valueOf((String) key);
            }
            return null;
        }

        public String getKeyAsString(){
            return key!=null?key.toString() :null;
        }

    }

    public String getParticipantName() {
        return participantName;
    }

    public void setParticipantName(String participantName) {
        this.participantName = participantName;
    }

    public Long getParticipantNumber() {
        return participantNumber;
    }

    public void setParticipantNumber(Long participantNumber) {
        this.participantNumber = participantNumber;
    }

    public ParticipantRequestModel getDataSource() {
        return dataSource;
    }

    public void setDataSource(ParticipantRequestModel dataSource) {
        this.dataSource = dataSource;
    }

    public ParticipantRequestModel getType() {
        return type;
    }

    public void setType(ParticipantRequestModel type) {
        this.type = type;
    }

    public ParticipantRequestModel getSubType() {
        return subType;
    }

    public void setSubType(ParticipantRequestModel subType) {
        this.subType = subType;
    }

    public boolean isPreferredParticipant() {
        return preferredParticipant;
    }

    public void setPreferredParticipant(boolean preferredParticipant) {
        this.preferredParticipant = preferredParticipant;
    }

    public boolean isMainArtist() {
        return mainArtist;
    }

    public void setMainArtist(boolean mainArtist) {
        this.mainArtist = mainArtist;
    }

    public ParticipantRequestModel getRepertoireOwner() {
        return repertoireOwner;
    }

    public void setRepertoireOwner(ParticipantRequestModel repertoireOwner) {
        this.repertoireOwner = repertoireOwner;
    }
}
