Пример #1
0
 private List<Project> getProjects(List<Record> projRecs) {
   if (projRecs.isEmpty()) return Collections.<Project>emptyList();
   List<Project> projects = new ArrayList<Project>(projRecs.size());
   for (Record projRec : projRecs)
     CollectionUtils.addIgnoreNull(projects, loadProject(getProjectOrDescriptor(projRec)));
   return projects;
 }
Пример #2
0
 private List<SendSchedule> retrieveSendSchedules(Constraint constraint) {
   List<Record> sendScheduleRecords =
       rsWrapper.recordStore.retrieveRecords(new RecordsQuery(SEND_SCHEDULE_SCHEMA, constraint));
   List<SendSchedule> schedules = new ArrayList<SendSchedule>(sendScheduleRecords.size());
   for (Record sendScheduleRecord : sendScheduleRecords)
     CollectionUtils.addIgnoreNull(
         schedules, getSendScheduleFromRecord(transmissionStore, sendScheduleRecord));
   return schedules;
 }
Пример #3
0
 @Override
 public List<ProjectDescriptor> retrieveProjectsOrDescriptors() {
   List<Record> projRecs = rsWrapper.recordStore.retrieveRecords(PROJECT_SCHEMA);
   if (projRecs.isEmpty()) return Collections.<ProjectDescriptor>emptyList();
   List<ProjectDescriptor> projDescrs = new ArrayList<ProjectDescriptor>(projRecs.size());
   for (Record projRec : projRecs)
     CollectionUtils.addIgnoreNull(projDescrs, getProjectOrDescriptor(projRec));
   return projDescrs;
 }