package com.github.arteam.jdit.domain.entity;

import com.google.common.base.Optional;

/**
 * Date: 2/7/15
 * Time: 4:58 PM
 *
 * @author Artem Prigoda
 */
public class Team {

    public final Optional<Long> id;
    public final String name;
    public final Division division;

    public Team(Optional<Long> id, String name, Division division) {
        this.id = id;
        this.name = name;
        this.division = division;
    }

    public Team(String name, Division division) {
        this.name = name;
        this.division = division;
        this.id = Optional.absent();
    }
}

@@ -40,16 +40,55 @@
 ntity;%0A%0A
+import com.google.common.base.Objects;%0A
 import c
@@ -623,11 +623,245 @@
 );%0A    %7D
+%0A%0A    @Override%0A    public String toString() %7B%0A        return Objects.toStringHelper(this)%0A                .add(%22id%22, id)%0A                .add(%22name%22, name)%0A                .add(%22division%22, division)%0A                .toString();%0A    %7D
 %0A%7D%0A

Add toString implementation