Examples of VoiceOverSection


Examples of com.gracevallorani.jpa.entities.VoiceOverSection

        vo = new VoiceOver();
       
        IJpaFactory<VoiceOverSection> factory2 = new VoiceOverSectionFactory(new J2eeConfig());
       
        try {
          VoiceOverSection vos = factory2.get(form.getSectionid());
          vo.setVoiceOverSection(vos);         
        } finally {
          factory2.close();
        }
      } else {
View Full Code Here

Examples of com.gracevallorani.jpa.entities.VoiceOverSection

      Model model,
      @RequestParam(value = "id", required = false, defaultValue = "0") int id) {
    form.setId(id);
   
    if (id != 0) {
      VoiceOverSection vos;
     
      IJpaFactory<VoiceOverSection> factory = new VoiceOverSectionFactory(new J2eeConfig());
     
      try {
        vos = factory.get(id);           
      } finally {
        factory.close();
      }

      form.setOrder(vos.getOrder());
      form.setTitle(vos.getTitle());
    }
   
    return JSP_EDIT_SECTION;
 
View Full Code Here

Examples of com.gracevallorani.jpa.entities.VoiceOverSection

  public String postEditSection(@Valid VoiceOverSectionForm form, BindingResult result, Model model) {
    if (result.hasErrors()) {
      return JSP_EDIT_SECTION;
    }
   
    VoiceOverSection vos;
    IJpaFactory<VoiceOverSection> strategy = new VoiceOverSectionFactory(new J2eeConfig());
    strategy.setTransactional(true);
   
    try {
      if (form.getId() == 0) {
        vos = new VoiceOverSection();
      } else {
        vos = strategy.get(form.getId());
      }     

      vos.setOrder(form.getOrder());
      vos.setTitle(form.getTitle());

      if (form.getId() == 0) {
        strategy.add(vos);             
      } else {
        strategy.refresh(vos);
View Full Code Here

Examples of com.gracevallorani.jpa.entities.VoiceOverSection

      em.getTransaction().commit();         
    }   
  }

  private VoiceOverSection addVoiceOverSection(EntityManager em, String title, int order) {
    VoiceOverSection res = new VoiceOverSection();
    res.setOrder(order);
    res.setTitle(title);

    EntityTransaction et = em.getTransaction();
    et.begin();
    em.persist(res);
    et.commit();
View Full Code Here

Examples of com.gracevallorani.jpa.entities.VoiceOverSection

    Query q = em.createQuery("SELECT vos FROM VoiceOverSection vos ORDER BY vos.order");
   
    List<VoiceOverSection> l = (List<VoiceOverSection>)q.getResultList();
   
    if (l.size() == 0) {
      VoiceOverSection vos = addVoiceOverSection(em, "Adverts", 0);           
      addVoiceOver(em, vos, "Album Soul Love", 0, "/files/voiceover/advert-soul-love-album/soul-love-album.mp3");
      addVoiceOver(em, vos, "Learn Direct", 1, "/files/voiceover/advert-learn-direct/learn-direct.mp3");     
      addVoiceOver(em, vos, "NHS - Stop Smoking", 2, "/files/voiceover/advert-nhs-stop-smoking/nhs-stop-smoking.mp3");
     
      //////////////
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.