Package org.jeecgframework.web.demo.entity.test

Examples of org.jeecgframework.web.demo.entity.test.CourseEntity


   * 修复Excel导出导入数据
   *@Author JueYue
   *@date 2013-11-10
   */
  private void repairExcel() {
    CourseEntity course = new CourseEntity();
    course.setName("海贼王");
    TeacherEntity teacher = new TeacherEntity();
    teacher.setName("路飞");
    teacher.setPic("upload/Teacher/pic3345280233.PNG");
    course.setTeacher(teacher);
    List<StudentEntity> list = new ArrayList<StudentEntity>();
    StudentEntity student = new StudentEntity();
    student.setName("卓洛");
    student.setSex("0");
    list.add(student);
    student = new StudentEntity();
    student.setName("山治 ");
    student.setSex("0");
    list.add(student);
    course.setStudents(list);
    commonDao.save(course.getTeacher());
    commonDao.save(course);
    commonDao.save(course);
    for (StudentEntity s :course.getStudents()){
      s.setCourse(course);
    }
    commonDao.batchSave(course.getStudents());
  }
View Full Code Here

TOP

Related Classes of org.jeecgframework.web.demo.entity.test.CourseEntity

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.