Package common.db.repository

Examples of common.db.repository.SqlQueryParam


  }

  public ProbaDva testInsert(ProbaDva pr)
  {
    SqlQueryParam sqlParam = sqlGenerator().getInsert(Entity.probaDva, pr);

    Integer pk = (Integer)getQuerryRunner().insertWithKeyReturn(sqlParam.getSql(), sqlParam.getParams());


    pr.setId(pk);
    return pr;
View Full Code Here


  }

  public void testUpdate(ProbaDva pr)
  {
     SqlQueryParam sqlParam = sqlGenerator().getUpdate(Entity.probaDva, pr);

    getQuerryRunner().update(sqlParam.getSql(), sqlParam.getParams());
  }
View Full Code Here

    getQuerryRunner().update(sqlParam.getSql(), sqlParam.getParams());
  }

  public void testSelect(ProbaDva pr)
  {
    SqlQueryParam sqlParam = sqlGenerator().getSelect(Entity.probaDva, pr, "byNumber");
    System.out.println(sqlParam.getSql());

    List<ProbaDva> p = getQuerryRunner().query(sqlParam.getSql(),
        ProbaDvaProcessor.getListHandler(),
        sqlParam.getParams());

    System.out.println("All:" + p.toString());

  }
View Full Code Here

  }

  public void testDelete(ProbaDva pr)
  {
    SqlQueryParam sqlParam = sqlGenerator().getDelete(Entity.probaDva, pr, "byNumber");
      getQuerryRunner().update(sqlParam.getSql(), sqlParam.getParams());

  }
View Full Code Here

  }


  public Object Insert(String mappingTable, Object entity, String... view)
  {
    SqlQueryParam sqlParam = sqlGenerator.getInsert(mappingTable, entity, view);
    return insertWithKeyReturn(sqlParam);
  }
View Full Code Here

    return insertWithKeyReturn(sqlParam);
  }

  public int Update(String mappingTable, Object entity, String... view)
  {
    SqlQueryParam sqlParam = sqlGenerator.getUpdate(mappingTable, entity, view);
      return update(sqlParam);
  }
View Full Code Here

      return update(sqlParam);
  }

  public int Delete(String mappingTable, Object entity, String... view)
  {
    SqlQueryParam sqlParam = sqlGenerator.getDelete(mappingTable, entity, view);
    return update(sqlParam);
  }
View Full Code Here

    return update(sqlParam);
  }

  public <E> E Select(String mappingTable, Object entity, ResultSetHandler<E> rsh, String... view)
  {
    SqlQueryParam sqlParam = sqlGenerator.getSelect(mappingTable, entity, view);
    return query(sqlParam, rsh);
  }
View Full Code Here

    return query(sqlParam, rsh);
  }

  public Object[] InsertWithMultyRet(String mappingTable, Object entity, String... view)
  {
    SqlQueryParam sqlParam = sqlGenerator.getInsert(mappingTable, entity, view);
    return insertWithMultyReturn(sqlParam);
  }
View Full Code Here

      }

    }


    return new SqlQueryParam(query, params.toArray(), qenericArr);
  }
View Full Code Here

TOP

Related Classes of common.db.repository.SqlQueryParam

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.