Package br.com.procempa.modus.session

Examples of br.com.procempa.modus.session.PersistentAccess.search()


  public static List<Presenca> getList(Inscricao inscricao) throws Exception {
    List<Presenca> presencas = new ArrayList<Presenca>();
    PersistentAccess pa = PersistentAccessFactory.getInstance();
    HashMap<String, Object> params = new HashMap<String, Object>();
    params.put("inscricao", inscricao);
    List<Persistent> list = pa.search("FROM Presenca WHERE inscricao = :inscricao",params);
    for (Persistent persistent : list) {
      presencas.add((Presenca) persistent);
    }
    return presencas;
  }
View Full Code Here


  public static List<Presenca> getList(Encontro encontro) throws Exception {
    List<Presenca> presencas = new ArrayList<Presenca>();
    PersistentAccess pa = PersistentAccessFactory.getInstance();
    HashMap<String, Object> params = new HashMap<String, Object>();
    params.put("encontro", encontro);
    List<Persistent> list = pa.search("FROM Presenca WHERE encontro = :encontro",params);
    for (Persistent persistent : list) {
      presencas.add((Presenca) persistent);
    }
    return presencas;
  }
View Full Code Here

  public static List<PresencaVO> getListVO(Turma turma) throws Exception {
    List<PresencaVO> presencas = new ArrayList<PresencaVO>();
    PersistentAccess pa = PersistentAccessFactory.getInstance();
    HashMap<String, Object> params = new HashMap<String, Object>();
    params.put("turma", turma);
    List<Persistent> list = pa
        .search(
            "FROM Presenca WHERE inscricao.turma = :turma ORDER BY inscricao.usuario.nome",
            params);
   
    Long idAnterior = new Long(-1);
View Full Code Here

public class ConteudoDataServices implements DataServices{
   
  public static List<Conteudo> getList() throws Exception {
    List<Conteudo> conteudos = new ArrayList<Conteudo>();
    PersistentAccess pa = PersistentAccessFactory.getInstance();
    List<Persistent> list = pa.search("FROM Conteudo");
    for (Persistent persistent : list) {
      conteudos.add((Conteudo) persistent);
    }
    return conteudos;
  }
View Full Code Here

  public static List<Conteudo> getList(Curso curso) throws Exception {
    List<Conteudo> conteudos = new ArrayList<Conteudo>();
    PersistentAccess pa = PersistentAccessFactory.getInstance();
    HashMap<String, Object> params = new HashMap<String, Object>();
    params.put("curso", curso);
    List<Persistent> list = pa.search("FROM Conteudo WHERE curso = :curso",params);
    for (Persistent persistent : list) {
      conteudos.add((Conteudo) persistent);
    }
    return conteudos;
 
View Full Code Here

  public static List<Inscricao> getList(Turma turma) throws Exception {
    List<Inscricao> inscritos = new ArrayList<Inscricao>();
    PersistentAccess pa = PersistentAccessFactory.getInstance();
    HashMap<String, Object> params = new HashMap<String, Object>();
    params.put("turma", turma);
    List<Persistent> list = pa.search("FROM Inscricao WHERE turma = :turma",params);
    for (Persistent persistent : list) {
      inscritos.add((Inscricao) persistent);
    }
    return inscritos;
  }
View Full Code Here

  }
 
  public static List<Inscricao> getList() throws Exception {
    List<Inscricao> inscritos = new ArrayList<Inscricao>();
    PersistentAccess pa = PersistentAccessFactory.getInstance();
    List<Persistent> list = pa.search("FROM Inscricao");
    for (Persistent persistent : list) {
      inscritos.add((Inscricao) persistent);
    }
    return inscritos;
  }
View Full Code Here

  public static List<Inscricao> getList(Usuario usuario) throws Exception {
    List<Inscricao> inscritos = new ArrayList<Inscricao>();
    PersistentAccess pa = PersistentAccessFactory.getInstance();
    HashMap<String, Object> params = new HashMap<String, Object>();
    params.put("usuario", usuario);
    List<Persistent> list = pa.search("FROM Inscricao WHERE usuario = :usuario",params);
    for (Persistent persistent : list) {
      inscritos.add((Inscricao) persistent);
    }
    return inscritos;
  }
View Full Code Here

  public static List<Inscricao> getList(Curso curso) throws Exception {
    List<Inscricao> inscritos = new ArrayList<Inscricao>();
    PersistentAccess pa = PersistentAccessFactory.getInstance();
    HashMap<String, Object> params = new HashMap<String, Object>();
    params.put("curso", curso);
    List<Persistent> list = pa.search("FROM Inscricao WHERE turma.curso = :curso",params);
    for (Persistent persistent : list) {
      inscritos.add((Inscricao) persistent);
    }
    return inscritos;
  }
View Full Code Here

  public static List<Visita> getList(HashMap<String, Object> params)
      throws Exception {
    List<Visita> items = new ArrayList<Visita>();
    PersistentAccess pa = PersistentAccessFactory.getInstance();
    List<Persistent> list = pa.search("FROM Visita ");
    for (Persistent persistent : list) {
      items.add((Visita) persistent);
    }

    return items;
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.