Search in sources :

Example 1 with IdCard

use of com.litepaltest.model.IdCard in project LitePal by LitePalFramework.

the class DeleteTest method initJude.

private void initJude() {
    jude = new Student();
    jude.setName("Jude");
    jude.setAge(13);
    judeCard = new IdCard();
    judeCard.setAddress("Jude Street");
    judeCard.setNumber("123456");
    jude.setIdcard(judeCard);
    judeCard.setStudent(jude);
}
Also used : IdCard(com.litepaltest.model.IdCard) Student(com.litepaltest.model.Student)

Example 2 with IdCard

use of com.litepaltest.model.IdCard in project LitePal by LitePalFramework.

the class DeleteTest method initJohn.

private void initJohn() {
    john = new Teacher();
    john.setTeacherName("John");
    john.setAge(33);
    john.setTeachYears(13);
    johnCard = new IdCard();
    johnCard.setAddress("John Street");
    johnCard.setNumber("123458");
    john.setIdCard(johnCard);
}
Also used : Teacher(com.litepaltest.model.Teacher) IdCard(com.litepaltest.model.IdCard)

Example 3 with IdCard

use of com.litepaltest.model.IdCard in project LitePal by LitePalFramework.

the class DeleteTest method initMike.

private void initMike() {
    mike = new Teacher();
    mike.setTeacherName("Mike");
    mike.setAge(36);
    mike.setTeachYears(16);
    mikeCard = new IdCard();
    mikeCard.setAddress("Mike Street");
    mikeCard.setNumber("123459");
    mike.setIdCard(mikeCard);
}
Also used : Teacher(com.litepaltest.model.Teacher) IdCard(com.litepaltest.model.IdCard)

Example 4 with IdCard

use of com.litepaltest.model.IdCard in project LitePal by LitePalFramework.

the class QueryEagerTest method setUp.

@Override
protected void setUp() {
    Calendar calendar = Calendar.getInstance();
    classroom = new Classroom();
    classroom.setName("Classroom 11");
    idcard1 = new IdCard();
    idcard1.setNumber("320311");
    idcard2 = new IdCard();
    idcard2.setNumber("320322");
    calendar.clear();
    calendar.set(1990, 9, 16, 0, 0, 0);
    student1 = new Student();
    student1.setName("Student 1");
    student1.setClassroom(classroom);
    student1.setIdcard(idcard1);
    student1.setBirthday(calendar.getTime());
    calendar.clear();
    calendar.set(1989, 7, 7, 0, 0, 0);
    student2 = new Student();
    student2.setName("Student 2");
    student2.setClassroom(classroom);
    student2.setBirthday(calendar.getTime());
    student3 = new Student();
    student3.setName("Student 3");
    teacher1 = new Teacher();
    teacher1.setTeacherName("Teacher 1");
    teacher1.setTeachYears(3);
    teacher1.setIdCard(idcard2);
    teacher2 = new Teacher();
    teacher2.setSex(false);
    teacher2.setTeacherName("Teacher 2");
    student1.getTeachers().add(teacher1);
    student1.getTeachers().add(teacher2);
    student2.getTeachers().add(teacher2);
    classroom.getTeachers().add(teacher1);
    classroom.save();
    student1.save();
    student2.save();
    student3.save();
    idcard1.save();
    idcard2.save();
    teacher1.save();
    teacher2.save();
}
Also used : Calendar(java.util.Calendar) Classroom(com.litepaltest.model.Classroom) Teacher(com.litepaltest.model.Teacher) IdCard(com.litepaltest.model.IdCard) Student(com.litepaltest.model.Student)

Example 5 with IdCard

use of com.litepaltest.model.IdCard in project LitePal by LitePalFramework.

the class One2OneUniSaveTest method init.

private void init() {
    t = new Teacher();
    t.setTeacherName("Will");
    t.setTeachYears(10);
    t.setAge(40);
    i = new IdCard();
    i.setNumber("9997777121");
    i.setAddress("shanghai road");
}
Also used : Teacher(com.litepaltest.model.Teacher) IdCard(com.litepaltest.model.IdCard)

Aggregations

IdCard (com.litepaltest.model.IdCard)12 Student (com.litepaltest.model.Student)8 Teacher (com.litepaltest.model.Teacher)7 Classroom (com.litepaltest.model.Classroom)4 Calendar (java.util.Calendar)3 Cursor (android.database.Cursor)1 Cellphone (com.litepaltest.model.Cellphone)1 ArrayList (java.util.ArrayList)1 Random (java.util.Random)1