Examples of VoiceOverFactory


Examples of com.gracevallorani.jpa.factories.VoiceOverFactory

    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);
View Full Code Here

Examples of com.gracevallorani.jpa.factories.VoiceOverFactory

    }
       
    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 {
        strategy.refresh(vo);
     
    } finally {
      strategy.close();
    }
   
    if (filePath != null) {
      log.info("uploading file " + filePath);
     
View Full Code Here

Examples of com.gracevallorani.jpa.factories.VoiceOverFactory

    return JSP_DISPLAY;   
 

  @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();
    }
 
    return JSP_DISPLAY;   
  }
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.