Package com.sogou.qadev.service.cynthia.bean

Examples of com.sogou.qadev.service.cynthia.bean.CommonOption


        {
          fieldOptionMap.put(commonField.getId(), new TreeSet<CommonOption>());

          for(Option option : field.getOptions())
          {
            CommonOption commonOption = new CommonOption();
            commonOption.setId(option.getId().toString());
            commonOption.setName(option.getName());

            fieldOptionMap.get(commonField.getId()).add(commonOption);
          }
        }
      }
      else if(field.getType().equals(Field.Type.t_reference))
      {
        Data[] referenceArray = das.queryTemplateFieldReferences(templateId, field.getId());
        if(referenceArray != null && referenceArray.length > 0)
        {
          fieldOptionMap.put(commonField.getId(), new TreeSet<CommonOption>());

          for(Data reference : referenceArray)
          {
            CommonOption commonOption = new CommonOption();
            commonOption.setId(reference.getId().toString());
            commonOption.setName(reference.getTitle());

            fieldOptionMap.get(commonField.getId()).add(commonOption);
          }
        }
      }
      else if(field.getType().equals(Field.Type.t_attachment))
      {
        Attachment[] attachmentArray = das.queryTemplateFieldAttachments(templateId, field.getId());
        if(attachmentArray != null && attachmentArray.length > 0)
        {
          fieldOptionMap.put(commonField.getId(), new TreeSet<CommonOption>());

          for(Attachment attachment : attachmentArray)
          {
            CommonOption commonOption = new CommonOption();
            commonOption.setId(attachment.getId().toString());
            commonOption.setName(attachment.getName());

            fieldOptionMap.get(commonField.getId()).add(commonOption);
          }
        }
      }
View Full Code Here

TOP

Related Classes of com.sogou.qadev.service.cynthia.bean.CommonOption

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.