Examples of Student


Examples of org.drools.planner.examples.examination.domain.Student

            List<Student> studentList = new ArrayList<Student>(studentMap.values());
            examination.setStudentList(studentList);
        }

        private Student findOrCreateStudent(Map<Integer, Student> studentMap, int id) {
            Student student = studentMap.get(id);
            if (student == null) {
                student = new Student();
                student.setId((long) id);
                studentMap.put(id, student);
            }
            return student;
        }
View Full Code Here

Examples of org.fenixedu.academic.domain.student.Student

        return mapping.findForward("chooseStudent");
    }

    public ActionForward viewStudent(final ActionMapping mapping, final ActionForm actionForm, final HttpServletRequest request,
            final HttpServletResponse response) {
        Student student = getDomainObject(request, "studentId");

        request.setAttribute("student", student);

        return mapping.findForward("viewStudent");
    }
View Full Code Here

Examples of org.javalite.activejdbc.test_models.Student

    @Test
    public void test(){

        deleteAndPopulateTables("students", "courses", "registrations");
       
        Student student = Student.findById(1);
        List<Course> courses = student.getAll(Course.class);
        a(2).shouldBeEqual(courses.size());

        student = Student.findById(2);
        courses = student.getAll(Course.class);
        a(1).shouldBeEqual(courses.size());

        Course c = Course.findById(1);
        List<Student> Students = c.getAll(Student.class);
        a(2).shouldBeEqual(Students.size());
View Full Code Here

Examples of org.jboss.cache.aop.test.Student

   public void testSeriazableSubObject() throws Exception
   {
      log_.info("testSerializableSubObject() ....");

      Student ben = new Student();
      ben.setName("Ben");
      ben.setYear("9th grade");
      CacheObject co1 = new CacheObject("1");
      ben.setCO1(co1);
      CacheObject co2 = new CacheObject("2");
      ben.setCO2(co2);

      cache_.putObject("/test", ben);

      Student be = (Student)cache1_.getObject("/test");
      assertNotNull("CacheObject should not be null", be.getCO1());
      assertNotNull("CacheObject should not be null", be.getCO2());
      assertEquals("1", be.getCO1().getId());
      assertEquals("2", be.getCO2().getId());
   }
View Full Code Here

Examples of org.jboss.cache.data.Student

//         ((Student)obj).setSchool("Pingtung");
      }

      static Object constructObject()
      {
         Student joe = new Student();
         joe.setName("Joe");

         Address add = new Address();
         add.setZip(94086);
         add.setCity("Sunnyvale)");
         add.setStreet("Albertson");
         joe.setAddress(add);

         String str;
         for(int i=0; i < objectListSize_; i++)
         {
            Course course = new Course();
            str = RandomString.randomstring(10,20);
            course.setInstructor(str);
            str = RandomString.randomstring(10,20);
            course.setTitle(str);
            str = RandomString.randomstring(10,20);
            course.setRoom(str);
            joe.addCourse(course);
         }

         return joe;
      }
View Full Code Here

Examples of org.jboss.serial.data.cache.Student

public class TestFromJBossCache {

  public static Student createTestInstance()
  {
        Student joe = new Student();
        joe.setName("Joe");

        Address add = new Address();
        add.setZip(94086);
        add.setCity("Sunnyvale)");
        add.setStreet("Albertson");
        joe.setAddress(add);

        String str;
        for(int i=0; i < 100; i++)
        {
           Course course = new Course();
           str = RandomString.randomstring(10,20);
           course.setInstructor(str);
           str = RandomString.randomstring(10,20);
           course.setTitle(str);
           str = RandomString.randomstring(10,20);
           course.setRoom(str);
           joe.addCourse(course);
        }

        return joe;
   
  }
View Full Code Here

Examples of org.jpa.Student

   
    g.setNumeGrupa("gr1");
    em.persist(g);
    int idgr = g.getIdGrupa();
    for (int i = 0; i < 3; i++) {
      s = new Student();
      s.setIdGrupa(0);
      s.setAnStudiu(1);
      s.setEmail("email");
      s.setNrMatricol(1);
      s.setNume("Student_" + i);
View Full Code Here

Examples of org.objectweb.speedo.pobjects.collection.serialization.Student

    }
   
    public void testSerializeWithCollection() {
        PersistenceManager pm = pmf.getPersistenceManager();
        Professor prof = new Professor("prof");
        Student s1 = new Student(1);
        Student s2 = new Student(2);
        Student s3 = new Student(3);
        Collection col = new ArrayList();
        col.add(s1);
        col.add(s2);
        col.add(s3);
        Course c = new Course("Course1");
        c.setProf(prof);
        c.setStudents(col);
        pm.currentTransaction().begin();
        pm.makePersistent(c);
        Object oid = pm.getObjectId(c);
        Course copyOfC = (Course) pm.detachCopy(c);
        pm.currentTransaction().commit();
        pm.close();
    File f = new File(new File(new File("output"),"test"), "testSerializeWithCollection");
    if (f.exists()) {
      f.delete();
    }
    try {
      ObjectOutputStream oos = new ObjectOutputStream(
          new FileOutputStream(f));
      oos.writeObject(copyOfC);
      oos.close();

      c = null;
      ObjectInputStream ois = new ObjectInputStream(
          new FileInputStream(f));
      c = (Course) ois.readObject();
      ois.close();
      assertEquals("Not the same professor", c.getProf().getName(), copyOfC.getProf().getName());
      assertEquals("Not the same list of students", col.size(), copyOfC.getStudents().size());
      int sid = 0;
      int copySid = 0;
      pm = pmf.getPersistenceManager();
      Iterator itCol = col.iterator();
      Iterator itCopy = copyOfC.getStudents().iterator();
      while (itCol.hasNext()) {
        Student s = (Student) itCol.next();
        sid += s.getSid();
        s = (Student) itCopy.next();
        copySid += s.getSid();
      }
      assertEquals(sid, copySid);
      pm.close();
    } catch (Exception e) {
      logger.log(BasicLevel.ERROR, "testSerializeWithCollection fails: ", e);
View Full Code Here

Examples of org.optaplanner.examples.examination.domain.Student

            List<Student> studentList = new ArrayList<Student>(studentMap.values());
            examination.setStudentList(studentList);
        }

        private Student findOrCreateStudent(Map<Integer, Student> studentMap, int id) {
            Student student = studentMap.get(id);
            if (student == null) {
                student = new Student();
                student.setId((long) id);
                studentMap.put(id, student);
            }
            return student;
        }
View Full Code Here

Examples of project.entities.institute.Student

public class StudentDAOImpl extends HibernateDaoSupport implements StudentDAO {

  @Override
  public Student createStudent(Date acceptanceDate, Date deductionDate,
      int group, String number, int person, String testBook) {
    Student student = new Student(acceptanceDate, deductionDate, group,
        number, person, testBook);
    return (Student) getHibernateTemplate().save(student);
  }
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.