Ejemplo n.º 1
0
 @Override
 public List<RetailOutlet> listAllRetailOutlets(String attraName) {
   List<RetailOutlet> retailOutlets = new ArrayList();
   Attraction attraction = em.find(Attraction.class, attraName);
   if (attraction != null) {
     retailOutlets = (List<RetailOutlet>) attraction.getRetailOutlets();
   }
   return retailOutlets;
 }
Ejemplo n.º 2
0
 @Override
 public List<AttraSection> listAttraSections(String attraName) {
   List<AttraSection> attraSections = new ArrayList();
   Attraction attraction = em.find(Attraction.class, attraName);
   if (attraction != null) {
     attraSections = (List<AttraSection>) attraction.getAttraSections();
   }
   return attraSections;
 }
Ejemplo n.º 3
0
  @Override
  public List<Equipment> listAllEquipments(String attraName) {
    List<Equipment> equipments = new ArrayList();

    Attraction attraction = em.find(Attraction.class, attraName);
    if (attraction != null) {
      equipments = (List<Equipment>) attraction.getEquipments();
    }
    return equipments;
  }
Ejemplo n.º 4
0
 @Override
 public List<Outlet> listAllOutlets(String attraName) {
   System.err.println("inside list all outlets session");
   List<Outlet> outlets = new ArrayList();
   Attraction attraction = em.find(Attraction.class, attraName);
   if (attraction != null) {
     outlets = (List<Outlet>) attraction.getOutlets();
   }
   System.out.println("finish");
   return outlets;
 }
Ejemplo n.º 5
0
 @Override
 public boolean updateAttractionInfo(Attraction attraction) {
   if (attraction == null) {
     return false;
   } else {
     if (em.find(Attraction.class, attraction.getName()) != null) {
       em.merge(attraction);
       return true;
     } else {
       return false;
     }
   }
 }