Package test

Examples of test.StudentForm


    gr = (List<Grupa>) query.getResultList();
   
    if (!gr.isEmpty()) {
      for (Grupa g : gr) {
        for (Student s : g.getStudenti()) {
          StudentForm sf=new StudentForm();
          sf.setNrMatricol(s.getNrMatricol());
          sf.setAn(String.valueOf(s.getAnStudiu()));
          sf.setNume(s.getNume()+" "+s.getPrenume());
          sf.setGrupa(g.getNumeGrupa());
          sf.setOrar("Orar "+g.getNumeGrupa());
          sf.setCatalog("Go to ...");
          stForm.add(sf);
        }
      }
      em.getTransaction().commit();
     
View Full Code Here


    gr = (List<Grupa>) query.getResultList();

    if (!gr.isEmpty()) {
      for (Grupa g : gr) {
        for (Student s : g.getStudenti()) {
          StudentForm sf = new StudentForm();
          sf.setNrMatricol(s.getNrMatricol());
          sf.setAn(s.getAnStudiu());
          sf.setNume(s.getNume() + " " + s.getPrenume());
          sf.setNumeBaza(s.getNume());
          sf.setGrupa(g.getNumeGrupa());
          sf.setEmail(s.getEmail());
          sf.setPrenume(s.getPrenume());
          sf.setOrar(g.getNumeGrupa());
          sf.setCatalog("Go to ...");
          stForm.add(sf);
        }
      }
      em.getTransaction().commit();
      em.close();
View Full Code Here

    gr = (List<Grupa>) query.getResultList();

    if (!gr.isEmpty()) {
      for (Grupa g : gr) {
        for (Student s : g.getStudenti()) {
          StudentForm sf = new StudentForm();
          sf.setNrMatricol(s.getNrMatricol());
          sf.setAn(s.getAnStudiu());
          sf.setNume(s.getNume() + " " + s.getPrenume());
          sf.setNumeBaza(s.getNume());
          sf.setGrupa(g.getNumeGrupa());
          sf.setEmail(s.getEmail());
          sf.setPrenume(s.getPrenume());
          sf.setOrar(g.getNumeGrupa());
          sf.setCatalog("Go to ...");
          stForm.add(sf);
        }
      }
      em.getTransaction().commit();
      em.close();
View Full Code Here

        "SELECT s FROM Student s WHERE s.nrMatricol=:v1").setParameter(
        "v1", nrMatricol);

    st = query.getResultList();

    StudentForm result = new StudentForm();
    if (!st.isEmpty()) {
      String numeGrupa = (String) em
          .createNativeQuery(
              "SELECT grupa.NUME_GRUPA  FROM Grupa,Student WHERE grupa.ID_GRUPA=student.studenti_id_grupa AND student.NR_MATRICOL=?1")
          .setParameter(1, nrMatricol).getSingleResult();

      result.setAn(st.get(0).getAnStudiu());
      result.setEmail(st.get(0).getEmail());
      result.setGrupa(numeGrupa);
      result.setNrMatricol(nrMatricol);
      result.setNume(st.get(0).getNume());
      result.setPrenume(st.get(0).getPrenume());
    }
    em.getTransaction().commit();
    em.close();
    return result;
  }
View Full Code Here

        "SELECT s FROM Student s WHERE s.nrMatricol=:v1").setParameter(
        "v1", nrMatricol);

    st = query.getResultList();

    StudentForm result = new StudentForm();
    if (!st.isEmpty()) {
      String numeGrupa = (String) em
          .createNativeQuery(
              "SELECT grupa.NUME_GRUPA  FROM Grupa,Student WHERE grupa.ID_GRUPA=student.studenti_id_grupa AND student.NR_MATRICOL=?1")
          .setParameter(1, nrMatricol).getSingleResult();

      result.setAn(st.get(0).getAnStudiu());
      result.setEmail(st.get(0).getEmail());
      result.setGrupa(numeGrupa);
      result.setNrMatricol(nrMatricol);
      result.setNume(st.get(0).getNume());
      result.setPrenume(st.get(0).getPrenume());
    }
    em.getTransaction().commit();
    em.close();
    return result;
  }
View Full Code Here

    gr = (List<Grupa>) query.getResultList();
   
    if (!gr.isEmpty()) {
      for (Grupa g : gr) {
        for (Student s : g.getStudenti()) {
          StudentForm sf=new StudentForm();
          sf.setNrMatricol(s.getNrMatricol());
          sf.setAn(String.valueOf(s.getAnStudiu()));
          sf.setNume(s.getNume()+" "+s.getPrenume());
          sf.setNumeBaza(s.getNume());
          sf.setGrupa(g.getNumeGrupa());
          sf.setEmail(s.getEmail());
          sf.setPrenume(s.getPrenume());
          sf.setOrar(g.getNumeGrupa());
          sf.setCatalog("Go to ...");
          stForm.add(sf);
        }
      }
      em.getTransaction().commit();
      em.close();
View Full Code Here

            "SELECT s FROM Student s WHERE s.nrMatricol=:v1")
        .setParameter("v1", nrMatricol);
       
    st =  query.getResultList();
   
    StudentForm result=new StudentForm();
    if(!st.isEmpty())
    {
      String numeGrupa = (String) em.createNativeQuery("SELECT grupa.NUME_GRUPA  FROM Grupa,Student WHERE grupa.ID_GRUPA=student.studenti_id_grupa AND student.NR_MATRICOL=?1")
                  .setParameter(1, nrMatricol).getSingleResult();
      System.out.println(numeGrupa);
      result.setAn(String.valueOf(st.get(0).getAnStudiu()));
      result.setEmail(st.get(0).getEmail());
      result.setGrupa(numeGrupa);
      result.setNrMatricol(nrMatricol);
      result.setNume(st.get(0).getNume());
      result.setPrenume(st.get(0).getPrenume());
    }
    em.getTransaction().commit();
    em.close();
    return result;
  }
View Full Code Here

    gr = (List<Grupa>) query.getResultList();

    if (!gr.isEmpty()) {
      for (Grupa g : gr) {
        for (Student s : g.getStudenti()) {
          StudentForm sf = new StudentForm();
          sf.setNrMatricol(s.getNrMatricol());
          sf.setAn(s.getAnStudiu());
          sf.setNume(s.getNume() + " " + s.getPrenume());
          sf.setNumeBaza(s.getNume());
          sf.setGrupa(g.getNumeGrupa());
          sf.setEmail(s.getEmail());
          sf.setPrenume(s.getPrenume());
          sf.setOrar(g.getNumeGrupa());
          sf.setCatalog("Go to ...");
          stForm.add(sf);
        }
      }
      em.getTransaction().commit();
      em.close();
View Full Code Here

        "SELECT s FROM Student s WHERE s.nrMatricol=:v1").setParameter(
        "v1", nrMatricol);

    st = query.getResultList();

    StudentForm result = new StudentForm();
    if (!st.isEmpty()) {
      String numeGrupa = (String) em
          .createNativeQuery(
              "SELECT grupa.NUME_GRUPA  FROM Grupa,Student WHERE grupa.ID_GRUPA=student.studenti_id_grupa AND student.NR_MATRICOL=?1")
          .setParameter(1, nrMatricol).getSingleResult();

      result.setAn(st.get(0).getAnStudiu());
      result.setEmail(st.get(0).getEmail());
      result.setGrupa(numeGrupa);
      result.setNrMatricol(nrMatricol);
      result.setNume(st.get(0).getNume());
      result.setPrenume(st.get(0).getPrenume());
    }
    em.getTransaction().commit();
    em.close();
    return result;
  }
View Full Code Here

    gr = (List<Grupa>) query.getResultList();
   
    if (!gr.isEmpty()) {
      for (Grupa g : gr) {
        for (Student s : g.getStudenti()) {
          StudentForm sf=new StudentForm();
          sf.setNrMatricol(s.getNrMatricol());
          sf.setAn(String.valueOf(s.getAnStudiu()));
          sf.setNume(s.getNume()+" "+s.getPrenume());
          sf.setGrupa(g.getNumeGrupa());
          sf.setOrar("Orar "+g.getNumeGrupa());
          sf.setCatalog("Go to ...");
          stForm.add(sf);
        }
      }
      em.getTransaction().commit();
     
View Full Code Here

TOP

Related Classes of test.StudentForm

Copyright © 2018 www.massapicom. 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.