Examples of VoiceOverSectionFactory


Examples of com.gracevallorani.jpa.factories.VoiceOverSectionFactory

public final class VoiceOverSectionController {
  static public final String DATA_KEY = "data";
 
  @RequestMapping(value = "voiceover/index", method = RequestMethod.GET)
  public String showIndex(Model model) {
    VoiceOverSectionFactory strategy = new VoiceOverSectionFactory(new J2eeConfig());
   
    List<VoiceOverSection> sections = strategy.getAll();
   
    for (VoiceOverSection section: sections) {
      Collections.sort(section.getVoiceovers(), new VoiceOverOrderComparator());
    }
   
    try {
      model.addAttribute("list", sections);
      return "/WEB-INF/website/voiceover/index.jsp";
    } finally {
      strategy.close();
    }
  }
View Full Code Here

Examples of com.gracevallorani.jpa.factories.VoiceOverSectionFactory

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

Examples of com.gracevallorani.jpa.factories.VoiceOverSectionFactory

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

Examples of com.gracevallorani.jpa.factories.VoiceOverSectionFactory

    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);
     
    } 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.