package kz.arta.synergy.workflow.mobile.android.registry;

import java.util.List;

/**
 * Created by neox on 11.01.17.
 */
public class RegistryModel {

    private String registryID;
    private String registryName;
    private String registryCode;
    private String regGroupID;
    private String regGroupName;
    private String[] rights;
    private List<RegistryModel> consistOf;

    public String getRegistryID() {
        return registryID;
    }

    public void setRegistryID(String registryID) {
        this.registryID = registryID;
    }

    public String getRegistryName() {
        return registryName;
    }

    public void setRegistryName(String registryName) {
        this.registryName = registryName;
    }

    public String getRegistryCode() {
        return registryCode;
    }

    public void setRegistryCode(String registryCode) {
        this.registryCode = registryCode;
    }

    public String[] getRights() {
        return rights;
    }

    public void setRights(String[] rights) {
        this.rights = rights;
    }

    public String getRegGroupID() {
        return regGroupID;
    }

    public void setRegGroupID(String regGroupID) {
        this.regGroupID = regGroupID;
    }

    public String getRegGroupName() {
        return regGroupName;
    }

    public void setRegGroupName(String regGroupName) {
        this.regGroupName = regGroupName;
    }

    public List<RegistryModel> getConsistOf() {
        return consistOf;
    }

    public void setConsistOf(List<RegistryModel> consistOf) {
        this.consistOf = consistOf;
    }

    public String getIdentifier() {
        if (consistOf != null) {
            return regGroupID;
        } else {
            return registryID;
        }
    }

    public String getName() {
        if (consistOf != null) {
            return regGroupName;
        } else {
            return registryName;
        }
    }
}
