/*
 * Copyright 2016 Microprofile.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.microprofile.showcase.speaker.model;


import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

public class Speaker implements Serializable {

    private static final long serialVersionUID = -8693770048623415961L;
    private String id;
    private String nameFirst;
    private String nameLast;
    private String organization;
    private String biography;
    private String picture;
    private String twitterHandle;
    private Set<String> venues;

    public String getId() {
        return this.id;
    }

    public void setId(final String id) {
        this.id = id;
    }

    public String getNameFirst() {
        return this.nameFirst;
    }

    public void setNameFirst(final String nameFirst) {
        this.nameFirst = nameFirst;
    }

    public String getNameLast() {
        return this.nameLast;
    }

    public void setNameLast(final String nameLast) {
        this.nameLast = nameLast;
    }

    public String getOrganization() {
        return this.organization;
    }

    public void setOrganization(final String organization) {
        this.organization = organization;
    }

    public String getBiography() {
        return this.biography;
    }

    public void setBiography(final String biography) {
        this.biography = biography;
    }

    public String getPicture() {
        return this.picture;
    }

    public void setPicture(final String picture) {
        this.picture = picture;
    }

    public String getTwitterHandle() {
        return this.twitterHandle;
    }

    public void setTwitterHandle(final String twitterHandle) {
        this.twitterHandle = twitterHandle;
    }

    public Set<String> getVenues() {

        if (null == this.venues) {
            this.venues = new HashSet<>();
        }

        return this.venues;
    }

    public void setVenues(final Set<String> venues) {
        this.getVenues().addAll(venues);
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) return true;

        if (o == null || this.getClass() != o.getClass()) return false;

        final Speaker speaker = (Speaker) o;

        return new org.apache.commons.lang3.builder.EqualsBuilder()
                .append(this.id, speaker.id)
                .append(this.nameFirst, speaker.nameFirst)
                .append(this.nameLast, speaker.nameLast)
                .append(this.organization, speaker.organization)
                .append(this.biography, speaker.biography)
                .append(this.picture, speaker.picture)
                .append(this.twitterHandle, speaker.twitterHandle)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(this.id)
                .append(this.nameFirst)
                .append(this.nameLast)
                .append(this.organization)
                .append(this.biography)
                .append(this.picture)
                .append(this.twitterHandle)
                .toHashCode();
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", this.id)
                .append("nameFirst", this.nameFirst)
                .append("nameLast", this.nameLast)
                .append("organization", this.organization)
                .append("biography", this.biography)
                .append("picture", this.picture)
                .append("twitterHandle", this.twitterHandle)
                .toString();
    }
}

@@ -1165,40 +1165,8 @@
 dle;
-%0A    private Set%3CString%3E venues;
 %0A%0A  
@@ -2346,272 +2346,8 @@
  %7D%0A%0A
-    public Set%3CString%3E getVenues() %7B%0A%0A        if (null == this.venues) %7B%0A            this.venues = new HashSet%3C%3E();%0A        %7D%0A%0A        return this.venues;%0A    %7D%0A%0A    public void setVenues(final Set%3CString%3E venues) %7B%0A        this.getVenues().addAll(venues);%0A    %7D%0A%0A
     

Remove venues - will get from service