Package com.gracevallorani.jpa.entities

Examples of com.gracevallorani.jpa.entities.Shorts


           
          entity.persist(section);
         
          int shortsOrder = 0;
          for (Showreel showreel: entry.getValue()) {
            Shorts shorts = new Shorts();
            shorts.setOrder(shortsOrder);
            shorts.setShortSection(section);
            shorts.setTitle(showreel.getTitle());
            shorts.setComment(showreel.getComment());
           
            String trailer;
            if (showreel instanceof InternalShowreel) {
              InternalShowreel o = (InternalShowreel)showreel;
             
              InputStream in = new FileInputStream(o.getFile());
              trailer = IOUtils.toString(in);
              in.close();
            } else {
              HtmlShowreel o = (HtmlShowreel)showreel;
             
              trailer = FileUtils.read(Configuration.getSystemRoot().getRoot().getFileItem(o.getFile()));
            }
           
            shorts.setTrailer(trailer);
           
            entity.persist(shorts);
          }
        }       
      } finally {
View Full Code Here


        shortsList.addAll(shortSection.getShorts());
      }
     
      model.addAttribute("list", list);     
     
      Shorts displayShort = null;
      for (Shorts shorts: shortsList) {
        if (shorts.getId() == id) {
          displayShort = shorts;
         
          break;
View Full Code Here

TOP

Related Classes of com.gracevallorani.jpa.entities.Shorts

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.