Jagger
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
Set<SessionEntity> com.griddynamics.jagger.engine.e1.services.DefaultDataService.getSessions ( Collection< String >  sessionIds)

Returns session entities for specify session ids.

If input session ids are an empty collection - returns all sessions.

Parameters
sessionIds- session ids
Returns
list of session entities
Author
Gribov Kirill

Implements com.griddynamics.jagger.engine.e1.services.DataService.

Definition at line 55 of file DefaultDataService.java.

References com.griddynamics.jagger.engine.e1.services.data.service.SessionEntity.setComment(), com.griddynamics.jagger.engine.e1.services.data.service.SessionEntity.setEndDate(), com.griddynamics.jagger.engine.e1.services.data.service.SessionEntity.setId(), com.griddynamics.jagger.engine.e1.services.data.service.SessionEntity.setKernels(), and com.griddynamics.jagger.engine.e1.services.data.service.SessionEntity.setStartDate().

Referenced by com.griddynamics.jagger.engine.e1.services.DefaultDataService.getSession().

55  {
56 
57  List<SessionDataDto> sessionDataDtoList = databaseService.getSessionInfoService().getBySessionIds(0, sessionIds.size(), new HashSet<String>(sessionIds));
58 
59  if (sessionDataDtoList.isEmpty()) {
60  return Collections.emptySet();
61  }
62 
63  Set<SessionEntity> entities = new TreeSet<>(new SessionEntity.IdComparator());
64  for (SessionDataDto sessionDataDto : sessionDataDtoList) {
65  SessionEntity sessionEntity = new SessionEntity();
66  sessionEntity.setId(sessionDataDto.getSessionId());
67  sessionEntity.setStartDate(sessionDataDto.getStartDate());
68  sessionEntity.setEndDate(sessionDataDto.getEndDate());
69  sessionEntity.setKernels(sessionDataDto.getActiveKernelsCount());
70  sessionEntity.setComment(sessionDataDto.getComment());
71 
72  entities.add(sessionEntity);
73  }
74 
75  return entities;
76  }

Here is the call graph for this function:

Here is the caller graph for this function: