db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1554841 - /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doInsert.vm
Date Thu, 02 Jan 2014 16:07:58 GMT
Author: tfischer
Date: Thu Jan  2 16:07:57 2014
New Revision: 1554841

URL: http://svn.apache.org/r1554841
Log:
TORQUE-305 modify templates for insert into ... select statements 

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doInsert.vm

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doInsert.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doInsert.vm?rev=1554841&r1=1554840&r2=1554841&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doInsert.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doInsert.vm
Thu Jan  2 16:07:57 2014
@@ -95,3 +95,93 @@
     {
         ${peerImplGetter}().doInsert(obj, con);
     }
+
+    /**
+     * Executes a insert into...select statement.
+     *
+     * @param toInsertInto the columns in which to insert, not null.
+     * @param criteria the criteria which selects the values to insert,
+     *        not null.
+     *
+     * @return the number of inserted rows.
+     *
+     * @throws TorqueException if a database error occurs.
+     */
+    public static int doInsert(
+                final Column[] toInsertInto,
+                final Criteria criteria)
+            throws TorqueException
+    {
+        return ${peerImplGetter}().doInsert(toInsertInto, criteria);
+    }
+
+    /**
+     * Executes a insert into...select statement.
+     *
+     * @param toInsertInto the columns in which to insert, not null.
+     * @param criteria the criteria which selects the values to insert,
+     *        not null.
+     * @param dbName the database name, or null to take the database name
+     *        from getDatabaseName().
+     *
+     * @return the number of inserted rows.
+     *
+     * @throws TorqueException if a database error occurs.
+     */
+    public static int doInsert(
+                final Column[] toInsertInto,
+                final Criteria criteria,
+                final String dbName)
+            throws TorqueException
+    {
+        return ${peerImplGetter}().doInsert(toInsertInto, criteria, dbName);
+    }
+
+    /**
+     * Executes a insert into...select statement.
+     *
+     * @param toInsertInto the columns in which to insert, not null.
+     * @param criteria the criteria which selects the values to insert,
+     *        not null.
+     * @param connection the database connection to use, not null.
+     *
+     * @return the number of inserted rows.
+     *
+     * @throws TorqueException if a database error occurs.
+     */
+    public static int doInsert(
+                final Column[] toInsertInto,
+                final Criteria criteria,
+                final Connection connection)
+            throws TorqueException
+    {
+        return ${peerImplGetter}().doInsert(toInsertInto, criteria, connection);
+    }
+
+    /**
+     * Executes a insert into...select statement.
+     *
+     * @param toInsertInto the columns in which to insert, not null.
+     * @param criteria the criteria which selects the values to insert,
+     *        not null.
+     * @param dbName the database name, or null to take the database name
+     *        from getDatabaseName().
+     * @param connection the database connection to use, not null.
+     *
+     * @return the number of inserted rows.
+     *
+     * @throws TorqueException if a database error occurs.
+     */
+    public static int doInsert(
+                final Column[] toInsertInto,
+                final Criteria criteria,
+                String dbName,
+                final Connection connection)
+            throws TorqueException
+    {
+        return ${peerImplGetter}().doInsert(
+                 toInsertInto,
+                 criteria,
+                 dbName,
+                 connection);
+    }



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message