Package common.db

Examples of common.db.QueryRunner


    new TestMain().run();
  }

  public void deleteMultyByNumber(Integer[] indexDelete)
  {
    QueryRunner queryRunner = new QueryRunner(dbParam);

    for(Integer i : indexDelete)
    {
      queryRunner.update(sqlRes.query("deleteMultyByNumber"), i);
    }

  }
View Full Code Here


  }

  public void testMultyInsert()
  {
    QueryRunner queryRunner = new QueryRunner(dbParam);

    for(int i = 0; i < 10; i++)
    {
      queryRunner.update(sqlRes.query("multyInsert"),"name "+i,i);
    }
  }
View Full Code Here

  }

  public void testMultySelect()
  {
    //new QueryRunner(); rad sa predefinisanim DBParam, pogledaj u klasi
    QueryRunner queryRunner = new QueryRunner(dbParam); // new QuerryRunner(dbParam); da radis sa proizvoljnom bazom
    List<Proba> lists = queryRunner.query(sqlRes.query("multySelect"), ProbaRowProcessor.getListHandler());
    for (Proba p : lists)
    {
      System.out.println("testMultySelect:" + p.toString());
    }
View Full Code Here



  public void testInsert()
  {
    QueryRunner queryRunner = new QueryRunner(dbParam);
    Integer i = (Integer)queryRunner.insertWithKeyReturn(sqlRes.query("testInsert"),
        "name_example",
        10 );
    ;

    System.out.println("Inserted "+i);
View Full Code Here

    //System.out.println("Key returned "+p.toString());
  }

  public void testUpdate()
  {
    QueryRunner queryRunner = new QueryRunner(dbParam);

    queryRunner.update(sqlRes.query("testUpdate"),"gg_ttt", 5);

  }
View Full Code Here

  }

  public void testDeleteAll()
  {
    QueryRunner queryRunner = new QueryRunner(dbParam);

    Integer rowDelted = queryRunner.update(sqlRes.query("testDeleteAll"));
    System.out.println("Count of row deleted"+rowDelted);



  }
View Full Code Here

  }

  public static QueryRunner getQuerryRunner()
  {
    return new QueryRunner(dbParam);
  }
View Full Code Here

TOP

Related Classes of common.db.QueryRunner

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.