db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/query QueryFactory.java
Date Wed, 11 Jun 2003 19:04:17 GMT
brj         2003/06/11 12:04:17

  Modified:    src/java/org/apache/ojb/broker/query QueryFactory.java
  Log:
  added newQueryByExample
  
  Revision  Changes    Path
  1.13      +24 -6     db-ojb/src/java/org/apache/ojb/broker/query/QueryFactory.java
  
  Index: QueryFactory.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/query/QueryFactory.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- QueryFactory.java	15 Mar 2003 15:47:03 -0000	1.12
  +++ QueryFactory.java	11 Jun 2003 19:04:17 -0000	1.13
  @@ -138,16 +138,34 @@
       }
   
       /**
  -     * Method declaration
  +     * Return a QueryByIdentity for example_or_identity
        * @param example_or_identity
        * @return
        */
  -    public static Query newQuery(Object example_or_identity)
  +    public static QueryByIdentity newQuery(Object example_or_identity)
  +    {
  +        return newQueryByIdentity(example_or_identity);
  +    }
  +
  +    /**
  +     * Return a QueryByIdentity for example_or_identity
  +     * @param example_or_identity
  +     * @return
  +     */
  +    public static QueryByIdentity newQueryByIdentity(Object example_or_identity)
       {
  -        /**
  -         * should add criteria here.
  -         */
           return new QueryByIdentity(example_or_identity);
  +    }
  +
  +    /**
  +     * Return a QueryByCriteria for example
  +     * <br>Use with care because building of Query is not foolproof !!!
  +     * @param example
  +     * @return
  +     */
  +    public static QueryByCriteria newQueryByExample(Object example)
  +    {
  +        return new QueryByCriteria(example);
       }
   
       /**
  
  
  

Mime
View raw message