gt:     if (circles == null) return null;
context: /*
   * Axelor Business Solutions
   *
   * Copyright (C) 2005-2019 Axelor (<http://axelor.com>).
   *
   * This program is free software: you can redistribute it and/or  modify
   * it under the terms of the GNU Affero General Public License, version 3,
   * as published by the Free Software Foundation.
   *
   * This program is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU Affero General Public License for more details.
   *
   * You should have received a copy of the GNU Affero General Public License
   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
   */
  package com.axelor.test.db;
  
  import com.axelor.db.EntityHelper;
  import com.axelor.db.JpaModel;
  import com.axelor.db.annotations.NameColumn;
  import com.axelor.db.annotations.VirtualColumn;
  import com.axelor.db.annotations.Widget;
  import com.google.common.collect.Lists;
  import java.math.BigDecimal;
  import java.time.LocalDate;
  import java.util.List;
  import java.util.Set;
  import javax.persistence.Access;
  import javax.persistence.AccessType;
  import javax.persistence.Basic;
  import javax.persistence.CascadeType;
  import javax.persistence.Entity;
  import javax.persistence.FetchType;
  import javax.persistence.Lob;
  import javax.persistence.ManyToMany;
  import javax.persistence.ManyToOne;
  import javax.persistence.OneToMany;
  import javax.persistence.Table;
  import javax.persistence.Transient;
  import javax.validation.constraints.NotNull;
  import org.hibernate.annotations.Type;
  
  @Entity
  @Table(name = "CONTACT_CONTACT")
  public class Contact extends JpaModel {
  
    @ManyToOne(
      cascade = {CascadeType.PERSIST, CascadeType.MERGE},
      fetch = FetchType.LAZY
    )
    private Title title;
  
    @NotNull private String firstName;
  
    @NotNull private String lastName;
  
    @Widget(search = {"firstName", "lastName"})
    @NameColumn
    @VirtualColumn
    @Access(AccessType.PROPERTY)
    private String fullName;
  
    private String email;
  
    private String proEmail;
  
    private String phone;
  
    private String lang;
  
    @Widget(selection = "food.selection")
    private String food;
  
    private BigDecimal credit;
  
    private LocalDate dateOfBirth;
  
    @OneToMany(
      mappedBy = "contact",
      cascade = CascadeType.ALL,
      fetch = FetchType.LAZY,
      orphanRemoval = true
    )
    private List<Address> addresses;
  
    @ManyToMany(
      cascade = {CascadeType.PERSIST, CascadeType.MERGE},
      fetch = FetchType.LAZY
    )
    private Set<Circle> circles;
  
    @Widget(title = "Photo", help = "Max size 4MB.")
    @Lob
    @Basic(fetch = FetchType.LAZY)
    private byte[] image;
  
    @Transient
    @Widget(multiline = true)
    private String notes;
  
    @Widget(title = "Attributes")
    @Type(type = "json")
    private String attrs;
  
    public Contact() {}
  
    public Contact(String firstName) {
      this.firstName = firstName;
    }
  
    public Contact(String firstName, String lastName) {
      this.firstName = firstName;
      this.lastName = lastName;
    }
  
    public Title getTitle() {
      return title;
    }
  
    public void setTitle(Title title) {
      this.title = title;
    }
  
    public String getFirstName() {
      return firstName;
    }
  
    public void setFirstName(String firstName) {
      this.firstName = firstName;
    }
  
    public String getLastName() {
      return lastName;
    }
  
    public void setLastName(String lastName) {
      this.lastName = lastName;
    }
  
    public String getFullName() {
      return fullName = computeFullName();
    }
  
    protected String computeFullName() {
      fullName = firstName + " " + lastName;
      if (this.title != null) {
        return this.title.getName() + " " + fullName;
      }
      return fullName;
    }
  
    public void setFullName(String fullName) {
      this.fullName = fullName;
    }
  
    public String getEmail() {
      return email;
    }
  
    public void setEmail(String email) {
      this.email = email;
    }
  
    public String getProEmail() {
      return proEmail;
    }
  
    public void setProEmail(String proEmail) {
      this.proEmail = proEmail;
    }
  
    public String getPhone() {
      return phone;
    }
  
    public void setPhone(String phone) {
      this.phone = phone;
    }
  
    public String getLang() {
      return lang;
    }
  
    public void setLang(String lang) {
      this.lang = lang;
    }
  
    public String getFood() {
      return food;
    }
  
    public void setFood(String food) {
      this.food = food;
    }
  
    public BigDecimal getCredit() {
      return credit;
    }
  
    public void setCredit(BigDecimal credit) {
      this.credit = credit;
    }
  
    public LocalDate getDateOfBirth() {
      return dateOfBirth;
    }
  
    public void setDateOfBirth(LocalDate dateOfBirth) {
      this.dateOfBirth = dateOfBirth;
    }
  
    public List<Address> getAddresses() {
      return addresses;
    }
  
    public void setAddresses(List<Address> addresses) {
      this.addresses = addresses;
    }
  
    public Circle getCircle(int index) {
  