henning 2004/12/01 08:28:06
Modified: . Tag: TORQUE_3_1_BRANCH project-base.xml
src/generator/src/templates/om Tag: TORQUE_3_1_BRANCH
Peer.vm
xdocs Tag: TORQUE_3_1_BRANCH changes.xml
Log:
TRQS 254, add doSelectJoinXYZ methods to the generated peer classes. Patch
by Martin Goulet. Thanks.
Revision Changes Path
No revision
No revision
1.9.2.15 +4 -0 db-torque/project-base.xml
Index: project-base.xml
===================================================================
RCS file: /home/cvs/db-torque/project-base.xml,v
retrieving revision 1.9.2.14
retrieving revision 1.9.2.15
diff -u -r1.9.2.14 -r1.9.2.15
--- project-base.xml 1 Dec 2004 15:49:34 -0000 1.9.2.14
+++ project-base.xml 1 Dec 2004 16:28:05 -0000 1.9.2.15
@@ -237,6 +237,10 @@
<email>[EMAIL PROTECTED]</email>
</contributor>
<contributor>
+ <name>Martin Goulet</name>
+ <email>[EMAIL PROTECTED]</email>
+ </contributor>
+ <contributor>
<name>James Hillyerd</name>
<email>[EMAIL PROTECTED]</email>
</contributor>
No revision
No revision
1.5.2.14 +47 -4 db-torque/src/generator/src/templates/om/Peer.vm
Index: Peer.vm
===================================================================
RCS file: /home/cvs/db-torque/src/generator/src/templates/om/Peer.vm,v
retrieving revision 1.5.2.13
retrieving revision 1.5.2.14
diff -u -r1.5.2.13 -r1.5.2.14
--- Peer.vm 30 Oct 2004 12:10:32 -0000 1.5.2.13
+++ Peer.vm 1 Dec 2004 16:28:06 -0000 1.5.2.14
@@ -1228,7 +1228,24 @@
* @throws TorqueException Any exceptions caught during processing will
be
* rethrown wrapped into a TorqueException.
*/
- protected static List doSelectJoin${joinColumnId}(Criteria criteria)
+ protected static List doSelectJoin${joinColumnId}(Criteria criteria,
Connection conn)
+ throws TorqueException
+ {
+ return doSelectJoin${joinColumnId}(criteria, null);
+ }
+
+ /**
+ * selects a collection of $className objects pre-filled with their
+ * $joinClassName objects.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in ${table.JavaName}Peer.
+ *
+ * @throws TorqueException Any exceptions caught during processing will
be
+ * rethrown wrapped into a TorqueException.
+ */
+ protected static List doSelectJoin${joinColumnId}(Criteria criteria,
Connection conn)
throws TorqueException
{
setDbName(criteria);
@@ -1282,7 +1299,12 @@
#end
#end
- List rows = BasePeer.doSelect(criteria);
+ List rows;
+ if( conn == null )
+ rows = BasePeer.doSelect(criteria);
+ else
+ rows = BasePeer.doSelect(criteria,conn);
+
List results = new ArrayList();
for (int i = 0; i < rows.size(); i++)
@@ -1373,7 +1395,6 @@
#set ( $collThisTableMs="${className}RelatedBy$relatedByCol" )
#end
-
/**
* selects a collection of $className objects pre-filled with
* all related objects.
@@ -1388,6 +1409,23 @@
protected static List doSelectJoinAllExcept${excludeString}(Criteria
criteria)
throws TorqueException
{
+ return doSelectJoinAllExcept${excludeString}(criteria, null);
+ }
+
+ /**
+ * selects a collection of $className objects pre-filled with
+ * all related objects.
+ *
+ * This method is protected by default in order to keep the public
+ * api reasonable. You can provide public methods for those you
+ * actually need in ${table.JavaName}Peer.
+ *
+ * @throws TorqueException Any exceptions caught during processing will
be
+ * rethrown wrapped into a TorqueException.
+ */
+ protected static List doSelectJoinAllExcept${excludeString}(Criteria
criteria, Connection conn)
+ throws TorqueException
+ {
setDbName(criteria);
addSelectColumns(criteria);
@@ -1442,7 +1480,12 @@
#end
#end
- List rows = BasePeer.doSelect(criteria);
+ List rows;
+ if( conn == null )
+ rows = BasePeer.doSelect(criteria);
+ else
+ rows = BasePeer.doSelect(criteria,conn);
+
List results = new ArrayList();
for (int i = 0; i < rows.size(); i++)
No revision
No revision
1.140.2.23 +4 -0 db-torque/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/db-torque/xdocs/changes.xml,v
retrieving revision 1.140.2.22
retrieving revision 1.140.2.23
diff -u -r1.140.2.22 -r1.140.2.23
--- changes.xml 1 Dec 2004 15:49:34 -0000 1.140.2.22
+++ changes.xml 1 Dec 2004 16:28:06 -0000 1.140.2.23
@@ -26,6 +26,10 @@
<body>
<release version="3.1.2-dev" date="in CVS">
+ <action type="add" dev="henning" issue="TRQS254">
+ Creates doSelectJoinXYZ methods that take a connection object as
parameter in
+ the Peer objects. Suggested by Martin Goulet.
+ </action>
<action type="add" dev="henning" issue="TRQS250">
Patch to allow aliases columns in groupBy clauses. Patch suggested by
Tarlika Elisabeth Schmitz.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]