Package org.apache.empire.db.example

Examples of org.apache.empire.db.example.MyDB


  }

  @Test
  public void useGeneratedCode() throws Exception {

    MyDB db = MyDB.get();
    Employees EMP = db.EMPLOYEES;

    DBDatabaseDriver driver = new DBDatabaseDriverHSql();
    db.open(driver, conn);
    DBCommand cmd = db.createCommand();
    cmd.select(EMP.EMPLOYEE_ID, EMP.FIRSTNAME);

    int rowCount = 0;
    DBReader reader = new DBReader();
    try {
View Full Code Here


  }

  @Test
  public void useGeneratedCode() throws Exception {

    MyDB db = MyDB.get();
    EMPLOYEES EMP = db.EMPLOYEES;

    DBDatabaseDriver driver = new DBDatabaseDriverHSql();
    db.open(driver, conn);
    DBCommand cmd = db.createCommand();
    cmd.select(EMP.EMPLOYEE_ID, EMP.FIRSTNAME);

    int rowCount = 0;
    DBReader reader = new DBReader();
    try {
      System.err.println(cmd.getSelect());
      boolean succes = reader.open(cmd, conn);
      assertTrue(db.getErrorMessage(), succes);
      while (reader.moveNext()) {
        rowCount++;
        System.out.println(reader.getString(EMP.EMPLOYEE_ID) + "\t" + reader.getString(EMP.FIRSTNAME));
      }
    } finally {
View Full Code Here

TOP

Related Classes of org.apache.empire.db.example.MyDB

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.