Examples of PersistentAccess


Examples of br.com.procempa.modus.session.PersistentAccess

    return turmas;
  }
 
  public static void remove(Long id) throws Exception {
    try {
      PersistentAccess pa = PersistentAccessFactory.getInstance();
      Turma turma = (Turma) pa.find(Turma.class, id);
     
      List<Encontro> encontros = EncontroDataServices.getList(turma);
      for (Encontro encontro : encontros) {
        EncontroDataServices.remove(encontro.getId());
      }
     
      List<Inscricao> inscritos = InscricaoDataServices.getList(turma);
      for (Inscricao inscrito : inscritos) {
        InscricaoDataServices.remove(inscrito.getId());
      }
     
      pa.remove(turma);
    } catch (Exception e) {
      throw new Exception(e.getClass().getName() + ": " + e.getMessage());
    }
  }
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.