arminw      2005/01/13 08:14:17

  Modified:    src/java/org/apache/ojb/broker/query QueryByIdentity.java
  Log:
  fix javadoc
  
  Revision  Changes    Path
  1.11      +35 -16    
db-ojb/src/java/org/apache/ojb/broker/query/QueryByIdentity.java
  
  Index: QueryByIdentity.java
  ===================================================================
  RCS file: 
/home/cvs/db-ojb/src/java/org/apache/ojb/broker/query/QueryByIdentity.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- QueryByIdentity.java      25 Sep 2004 14:54:56 -0000      1.10
  +++ QueryByIdentity.java      13 Jan 2005 16:14:16 -0000      1.11
  @@ -18,23 +18,42 @@
   import org.apache.ojb.broker.Identity;
   
   /**
  - * represents a search by identity.
  - * "find the article with id 7"
  - * could be represented as:
  - *
  - * Article example = new Article();
  - * example.setId(7);
  - * Query qry = new QueryByIdentity(example);
  - *
  - * The PersistenceBroker can retrieve Objects by examples as follows:
  - *
  - * PersistenceBroker broker = 
PersistenceBrokerFactory.createPersistenceBroker();
  - * Collection col = broker.getObjectByQuery(qry);
  + * Represents a search by identity.
  + * <i>"find the article with id 7"</i>
  + * could be represented as:<br/>
  + * <br/>
    *
  + * <code>
  + * Article example = new Article();<br/>
  + * example.setId(7);<br/>
  + * Query qry = new QueryByIdentity(example);<br/>
  + * </code>
  + * <br/>
  + * The PersistenceBroker can retrieve Objects by examples as follows:<br/>
  + * <br/>
  + * <code>
  + * PersistenceBroker broker = 
PersistenceBrokerFactory.createPersistenceBroker();<br/>
  + * Collection col = broker.getObjectByQuery(qry);<br/>
  + * </code>
  + * <br/>
    * This Class can also handle working with OJB Identity objects:
  - * "find the article with Identity xyz" could be represnted as
  - * Identity xyz = new Identity(example);
  - * Query qry = new QueryByIdentity(xyz);
  + * <i>"find the article with Identity xyz"</i> could be represnted as<br/>
  + * <br/>
  + * <code>
  + * Article example = new Article();<br/>
  + * example.setId(7);<br/>
  + * Identity xyz = broker.serviceIdentity().buildIdentity(example);<br/>
  + * Query qry = new QueryByIdentity(xyz);<br/>
  + * Collection col = broker.getObjectByQuery(qry);<br/>
  + * </code>
  + * <br/>
  + * But in this case a smarter solution will be<br/>
  + * <br/>
  + * <code>
  + * Identity xyz = broker.serviceIdentity().buildIdentity(Article.class, new 
Integer(7));<br/>
  + * Collection col = broker.getObjectByIdentity(xyz);<br/>
  + * </code>
  + *
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Thomas Mahler<a>
    * @version $Id$
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to