Examples of VoiceOver


Examples of com.gracevallorani.jpa.entities.VoiceOver

      @RequestParam(value = "id", required = false, defaultValue = "0") int id,
      @RequestParam(value = "sectionid", required = false, defaultValue = "0") int sectionid) {
    form.setId(id);
   
    if (id != 0) {
      VoiceOver vo;
     
      IJpaFactory<VoiceOver> factory = new VoiceOverFactory(new J2eeConfig());
     
      try {
        vo = factory.get(id);           
      } finally {
        factory.close();
      }

      form.setOrder(vo.getOrder());
      form.setTitle(vo.getTitle());
      form.setMp3(null);
      form.setSectionid(sectionid);
    }
   
    return JSP_EDIT;
View Full Code Here

Examples of com.gracevallorani.jpa.entities.VoiceOver

      return JSP_EDIT;
    }
       
    String filePath = SpringMvcUtils.getPath(FILE_MP3_PREFIX, form.getMp3());
   
    VoiceOver vo;   
    IJpaFactory<VoiceOver> strategy = new VoiceOverFactory(new J2eeConfig());
   
    try {
      if (form.getId() == 0) {
        vo = new VoiceOver();
       
        IJpaFactory<VoiceOverSection> factory2 = new VoiceOverSectionFactory(new J2eeConfig());
       
        try {
          VoiceOverSection vos = factory2.get(form.getSectionid());
          vo.setVoiceOverSection(vos);         
        } finally {
          factory2.close();
        }
      } else {
        vo = strategy.get(form.getId());
      }     

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

      if (filePath != null) {
        vo.setMp3(FILE_STORAGE_PREFIX + filePath);
      }

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

Examples of com.gracevallorani.jpa.entities.VoiceOver

  @RequestMapping(value = "delete", method = RequestMethod.GET)
  public String getDelete(@RequestParam(value = "id", required = true) int id) throws Exception {   
    IJpaFactory<VoiceOver> strategy = new VoiceOverFactory(new J2eeConfig());
       
    try {
      VoiceOver vo = strategy.get(id);
      strategy.setTransactional(true);
      strategy.delete(vo);
    } finally {
      strategy.close();
    }
View Full Code Here

Examples of com.gracevallorani.jpa.entities.VoiceOver

   
    return res;
  }
 
  private VoiceOver addVoiceOver(EntityManager em, VoiceOverSection vos, String title, int order, String url) {
    VoiceOver res = new VoiceOver();
    res.setOrder(order);
    res.setTitle(title);
    res.setMp3(url);
    res.setVoiceOverSection(vos);

    EntityTransaction et = em.getTransaction();
    et.begin();
    em.persist(res);
    et.commit();
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.