Package application.database

Examples of application.database.Patient


  @Before
  public void prepare() throws Exception {
    db.dropTables();
    db.createTables();
    for (int i = 0; i < 10; i++) {
      Patient patient = new Patient(new HashMap<String, Object>(){{
        Random rand = new Random();
        put("name", String.valueOf(rand.nextInt()));
        put("surname", String.valueOf(rand.nextInt()));
      }}
      );
      patient.save();
    }
  }
View Full Code Here


    }
  }
 
  @Test
  public void testFindByPk() throws Exception{
    Patient cur = (new Patient()).findByPk(1);
    cur.name="lah";
    cur.save();
  }
View Full Code Here

    cur.save();
  }

  @Test
  public void testSave() throws Exception{
    Patient cur = new Patient();
    cur.name="loh";
    cur.surname="lohov";
    cur.patronymic="lohovich";
    cur.birth_date=Long.valueOf((new Date()).getTime()).intValue();
    cur.sex="male";
    cur.save();
  }
View Full Code Here

    cur.save();
  }
 
  @Test
  public void testSelectByValues() throws Exception {
    ArrayList<Patient> patients = (new Patient()).selectByValues(new HashMap<String,Object>());
    for (Patient p : patients) {
      System.out.println(p.name);
    }
  }
View Full Code Here

TOP

Related Classes of application.database.Patient

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.