Exemplo n.º 1
0
 public static ArrayList<TimeSlotType> getTimeSlotTypes(
     Session session, ConstraintType constraintType) throws BasicException {
   ArrayList<TimeSlotType> result = new ArrayList<TimeSlotType>();
   ConstraintDataLogic constraintDataLogic = new ConstraintDataLogic(session);
   HashMap<Integer, HashMap<String, Object>> data =
       constraintDataLogic.getTimeSlotType(constraintType.getID());
   for (int i = 0; i < data.size(); i++) {
     HashMap<String, Object> tokens = data.get(i);
     TimeSlotType timeSlotType =
         TimeSlotType.valueOf((Integer) tokens.get("ID"), (String) tokens.get("name"));
     result.add(timeSlotType);
   }
   return result;
 }
Exemplo n.º 2
0
 public static TimeSlotType valueOf(int ID, String name) {
   TimeSlotType timeSlotType = TimeSlotType.valueOf(name);
   timeSlotType.setID(ID);
   timeSlotType.setName(name);
   return timeSlotType;
 }