Пример #1
0
 public static ApplicationDTO mapRestResourceToDto(Application app, boolean useAmq) {
   ApplicationDTO appDto = new ApplicationDTO(app.getName(), useAmq);
   for (Queue queue : app.getQueues()) {
     appDto.addQueue(queue.getName());
   }
   return appDto;
 }
Пример #2
0
 private static Queue mapDtoToRestResource(QueueDTO qDto) {
   Queue q = new Queue();
   q.setId(qDto.getId());
   q.setName(qDto.getName());
   q.setFqName(qDto.getFqName());
   q.setSize(qDto.getSize());
   q.setTopic(qDto.isTopic());
   return q;
 }