Author: arminw
Date: Sat Jan 21 09:18:40 2006
New Revision: 371088
URL: http://svn.apache.org/viewcvs?rev=371088&view=rev
Log:
use QueryFactory in documentation examples
Modified:
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/pb-guide.xml
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/query.xml
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/tutorials/pb-tutorial.xml
Modified:
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/pb-guide.xml
URL:
http://svn.apache.org/viewcvs/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/pb-guide.xml?rev=371088&r1=371087&r2=371088&view=diff
==============================================================================
---
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/pb-guide.xml
(original)
+++
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/pb-guide.xml
Sat Jan 21 09:18:40 2006
@@ -222,7 +222,8 @@
</p>
<note>
Be carefully when adding <strong>permanent</strong>
listener, keep in mind you don't know
- which instance was returned next time from the pool, with
a permanent listener or without!
+ which <code>PersistenceBroker</code> instance was returned
next time from the broker pool
+ when obtain a new broker instance - with a permanent
listener or without!
<br/>
To guarantee
that any pooled broker instance use the permanent
listener, best way is to extend the
Modified:
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/query.xml
URL:
http://svn.apache.org/viewcvs/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/query.xml?rev=371088&r1=371087&r2=371088&view=diff
==============================================================================
---
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/query.xml
(original)
+++
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/guides/query.xml
Sat Jan 21 09:18:40 2006
@@ -220,7 +220,7 @@
</p>
<source><![CDATA[
crit = new Criteria();
-query = new QueryByCriteria(Person.class, crit);
+query = QueryFactory.newQuery(Person.class, crit);
query.addOrderByDescending("id");
query.addOrderByAscending("lastname");
broker.getCollectionByQuery(query);]]></source>
@@ -557,7 +557,7 @@
crit1.addOrCriteria(crit2);
-query = new QueryByCriteria(ProductGroup.class, crit1);
+query = QueryFactory.newQuery(ProductGroup.class, crit1);
broker.getObjectByQuery(query);
]]></source>
Modified:
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/tutorials/pb-tutorial.xml
URL:
http://svn.apache.org/viewcvs/db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/tutorials/pb-tutorial.xml?rev=371088&r1=371087&r2=371088&view=diff
==============================================================================
---
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/tutorials/pb-tutorial.xml
(original)
+++
db/ojb/branches/OJB_1_0_RELEASE/src/doc/forrest/src/documentation/content/xdocs/docu/tutorials/pb-tutorial.xml
Sat Jan 21 09:18:40 2006
@@ -230,7 +230,7 @@
try
{
broker = PersistenceBrokerFactory.defaultPersistenceBroker();
- QueryByCriteria query = new QueryByCriteria(template);
+ QueryByCriteria query = QueryFactory.newQuery(template);
result = (Product) broker.getObjectByQuery(query);
}
finally
@@ -287,7 +287,7 @@
criteria.addLessOrEqualThan("stock", new Integer(20));
criteria.addGreaterOrEqualThan("price", new Double(100000.0));
- QueryByCriteria query = new QueryByCriteria(Product.class, criteria);
+ QueryByCriteria query = QueryFactory.newQuery(Product.class, criteria);
results = broker.getCollectionByQuery(query);
}
finally
@@ -362,7 +362,7 @@
try
{
broker = PersistenceBrokerFactory.defaultPersistenceBroker();
- QueryByCriteria query = new QueryByCriteria(template);
+ QueryByCriteria query = QueryFactory.newQuery(template);
Product result = (Product) broker.getObjectByQuery(query);
if (result != null)
@@ -504,7 +504,7 @@
criteria.addLessOrEqualThan("stock", new Integer(20));
criteria.addGreaterOrEqualThan("price", new Double(100000.0));
- QueryByCriteria query = new QueryByCriteria(Product.class, criteria);
+ QueryByCriteria query = QueryFactory.newQuery(Product.class, criteria);
results = broker.getCollectionByQuery(query);
}
catch (PersistenceBrokerException e)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]