コード例 #1
0
 public static BundleRevisionDTO[] newArrayBundleRevisionDTO(BundleRevisions revisions) {
   if (revisions == null) {
     return null;
   }
   List<BundleRevision> revs = revisions.getRevisions();
   final int size = revs.size();
   BundleRevisionDTO[] dtos = new BundleRevisionDTO[size];
   for (int i = 0; i < size; i++) {
     dtos[i] = new DTOBuilder().getBundleRevisionDTO(revs.get(i));
   }
   return dtos;
 }
コード例 #2
0
 public static BundleWiringDTO[] newArrayBundleWiringDTO(BundleRevisions revisions) {
   if (revisions == null) {
     return null;
   }
   List<BundleRevision> revs = revisions.getRevisions();
   final int size = revs.size();
   List<BundleWiringDTO> dtos = new ArrayList<BundleWiringDTO>(size);
   for (int i = 0; i < size; i++) {
     BundleWiring wiring = revs.get(i).getWiring();
     if (wiring != null) {
       dtos.add(
           new DTOBuilder().getBundleWiringDTO(wiring)); // use new DTOBuilder for each wiring dto
     }
   }
   return dtos.toArray(new BundleWiringDTO[dtos.size()]);
 }