Package org.jdbf.engine.sql

Examples of org.jdbf.engine.sql.QueryResults


    selectCriteria.addSelectEqualTo("groupId",0);
    Criteria criteria = new Criteria("product");
    criteria.addSelectLessThan("OID",13);
    selectCriteria.addAndCriteria(criteria);
    selectCriteria.addOrderBy("OID",true);
    QueryResults results = database.select(repositoryViewName,selectCriteria);
    return results; 
    }


   
  public QueryResults selectAll(String repositoryViewName)
    throws QueryException,MappingException,CacheException{
   
   
    QueryResults results = database.select(repositoryViewName,null);
    return results; 
  }

    public static void main(String[] args) {
      try{
      SelectSample sample = new SelectSample();
      //QueryResults results = sample.selectWithCriteria("product");
      QueryResults results = sample.selectAll("product");
      sample.printQueryResults(results);
     
      }
      catch(Exception e){
        e.printStackTrace();

   
  public QueryResults selectByPrimaryKey(String repositoryViewName,PrimaryKey pk)
      throws QueryException,MappingException,CacheException{
   
     
      QueryResults results = database.selectByPrimaryKey(repositoryViewName,pk);
      return results; 
  }

     
        CompositePrimaryKeySample sample = new CompositePrimaryKeySample();
        PrimaryKey pk = new PrimaryKey();
        pk.setValueKey("OID",new Integer(1));
        pk.setValueKey("lineId",new Integer(0));
      QueryResults results = sample.selectByPrimaryKey("orderline",pk);
      sample.printQueryResults(results);
      }
      catch(Exception e){
        e.printStackTrace();
      }

TOP

Related Classes of org.jdbf.engine.sql.QueryResults

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.