public Advertisement addAdvertisement(Advertisement advertisement) {
    getAdvertisements().add(advertisement);
    advertisement.setCategory(this);

    return advertisement;
  }
  public Advertisement removeAdvertisement(Advertisement advertisement) {
    getAdvertisements().remove(advertisement);
    advertisement.setCategory(null);

    return advertisement;
  }
Пример #3
0
  public Advertisement addAdvertisement(Advertisement advertisement) {
    getAdvertisements().add(advertisement);
    advertisement.setPlace(this);

    return advertisement;
  }