Exemplo n.º 1
0
 private com.relteq.sirius.jaxb.Controller restoreController(Controllers db_cntr)
     throws TorqueException {
   com.relteq.sirius.jaxb.Controller cntr = factory.createController();
   cntr.setId(id2str(db_cntr.getId()));
   cntr.setName(db_cntr.getName());
   cntr.setType(db_cntr.getType());
   cntr.setDt(db_cntr.getDt());
   cntr.setEnabled(Boolean.TRUE);
   cntr.setJavaClass(db_cntr.getJavaClass());
   cntr.setDisplayPosition(restorePosition(db_cntr.getDisplayGeometry()));
   cntr.setTargetElements(restoreTargetElements(db_cntr));
   cntr.setFeedbackElements(restoreFeedbackElements(db_cntr));
   if (null != db_cntr.getQueueControllerId())
     cntr.setQueueController(restoreQueueController(db_cntr.getQueueControllers()));
   cntr.setParameters(restoreParameters(db_cntr));
   List<com.relteq.sirius.jaxb.Table> table_l = restoreTables(db_cntr);
   if (null != table_l && !table_l.isEmpty()) {
     cntr.setTable(table_l.get(0));
     if (1 < table_l.size())
       logger.warn("Controller " + db_cntr.getId() + " has " + table_l.size() + " tables");
   }
   cntr.setActivationIntervals(restoreActivationIntervals(db_cntr));
   // TODO cntr.setPlanSequence();
   // TODO cntr.setPlanList();
   return cntr;
 }
Exemplo n.º 2
0
 private com.relteq.sirius.jaxb.ActivationIntervals restoreActivationIntervals(Controllers db_cntr)
     throws TorqueException {
   @SuppressWarnings("unchecked")
   List<ControllerActivationIntervals> db_cai_l = db_cntr.getControllerActivationIntervalss();
   if (db_cai_l.isEmpty()) return null;
   com.relteq.sirius.jaxb.ActivationIntervals ais = factory.createActivationIntervals();
   for (ControllerActivationIntervals db_cai : db_cai_l)
     ais.getInterval().add(restoreInterval(db_cai));
   return ais;
 }