content: /*
   *  Copyright (C) 2010-2012 Stichting Akvo (Akvo Foundation)
   *
   *  This file is part of Akvo FLOW.
   *
   *  Akvo FLOW is free software: you can redistribute it and modify it under the terms of
   *  the GNU Affero General Public License (AGPL) as published by the Free Software Foundation,
   *  either version 3 of the License or any later version.
   *
   *  Akvo FLOW 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 included below for more details.
   *
   *  The full license text can also be seen at <http://www.gnu.org/licenses/agpl.html>.
   */
  
  package com.gallatinsystems.device.domain;
  
  import java.util.ArrayList;
  import java.util.List;
  
  import javax.jdo.annotations.NotPersistent;
  import javax.jdo.annotations.PersistenceCapable;
  
  import com.gallatinsystems.framework.domain.BaseDomain;
  
  /**
   * a grouping of devices.
   */
  @PersistenceCapable
  public class DeviceGroup extends BaseDomain {
  
      private static final long serialVersionUID = 8941584684617286776L;
      private String name = null;
      private String code = null;
      private String description = null;
      @NotPersistent
      private List<Device> deviceList = null;
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public String getCode() {
          return code;
      }
  
      public void setCode(String code) {
          this.code = code;
      }
  
      public void setDeviceList(List<Device> deviceList) {
          this.deviceList = deviceList;
      }
  
      public List<Device> getDeviceList() {
          return deviceList;
      }
  
      public void addDevice(Device device) {
          if (deviceList == null)
              deviceList = new ArrayList<Device>();
          deviceList.add(device);
      }
  
      public void setDescription(String description) {
          this.description = description;
      }
  
      public String getDescription() {
          return description;
      }
  
  }
  