mpoeschl 2002/11/27 05:24:04
Modified: src/templates/om Peer.vm
Log:
o javadocs
Revision Changes Path
1.45 +151 -34 jakarta-turbine-torque/src/templates/om/Peer.vm
Index: Peer.vm
===================================================================
RCS file: /home/cvs/jakarta-turbine-torque/src/templates/om/Peer.vm,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- Peer.vm 15 Nov 2002 12:53:02 -0000 1.44
+++ Peer.vm 27 Nov 2002 13:24:04 -0000 1.45
@@ -64,6 +64,8 @@
/**
* @return the map builder for this peer
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static MapBuilder getMapBuilder()
throws TorqueException
@@ -117,7 +119,12 @@
/** A class that can be returned by this peer. */
protected static final Class CLASS_DEFAULT = initClass(CLASSNAME_DEFAULT);
- /** Class object initialization method. */
+ /**
+ * Class object initialization method.
+ *
+ * @param className name of the class to initialize
+ * @return the initialized class
+ */
private static Class initClass(String className)
{
Class c = null;
@@ -127,11 +134,11 @@
}
catch (Throwable t)
{
- category.error("A FATAL ERROR has occurred which should not " +
- "have happened under any circumstance. Please notify " +
- "the Turbine developers <[EMAIL PROTECTED]> " +
- "and give as many details as possible (including the error " +
- "stack trace).", t);
+ category.error("A FATAL ERROR has occurred which should not "
+ + "have happened under any circumstance. Please notify "
+ + "the Turbine developers <[EMAIL PROTECTED]> "
+ + "and give as many details as possible (including the error "
+ + "stack trace).", t);
// Error objects should always be propogated.
if (t instanceof Error)
@@ -148,6 +155,11 @@
* Get the list of objects for a ResultSet. Please not that your
* resultset MUST return columns in the right order. You can use
* getFieldNames() in BaseObject to get the correct sequence.
+ *
+ * @param results the ResultSet
+ * @return the list of objects
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static List resultSet2Objects(java.sql.ResultSet results)
throws TorqueException
@@ -215,7 +227,11 @@
#end
/**
- * Method to do inserts
+ * Method to do inserts.
+ *
+ * @param criteria object used to create the INSERT statement.
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static ObjectKey doInsert(Criteria criteria)
throws TorqueException
@@ -228,6 +244,11 @@
* Method to do inserts. This method is to be used during a transaction,
* otherwise use the doInsert(Criteria) method. It will take care of
* the connection details internally.
+ *
+ * @param criteria object used to create the INSERT statement.
+ * @param con the connection to use
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static ObjectKey doInsert(Criteria criteria, Connection con)
throws TorqueException
@@ -288,7 +309,13 @@
}
}
- /** Add all the columns needed to create a new object */
+ /**
+ * Add all the columns needed to create a new object.
+ *
+ * @param criteria object containing the columns to add.
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
+ */
public static void addSelectColumns(Criteria criteria)
throws TorqueException
{
@@ -304,6 +331,9 @@
* from a specified offset. This is done so that you can select
* other rows than just those needed for this object. You may
* for example want to create two objects from the same row.
+ *
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static $table.JavaName row2Object(Record row,
int offset,
@@ -336,6 +366,9 @@
* from a specified offset. This is done so that you can select
* other rows than just those needed for this object. You may
* for example want to create two objects from the same row.
+ *
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static void populateObject(Record row,
int offset,
@@ -375,14 +408,28 @@
}
}
- /** Method to do selects */
+ /**
+ * Method to do selects.
+ *
+ * @param criteria object used to create the SELECT statement.
+ * @return List of selected Objects
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
+ */
public static List doSelect(Criteria criteria) throws TorqueException
{
return populateObjects(doSelectVillageRecords(criteria));
}
-
- /** Method to do selects within a transaction */
+ /**
+ * Method to do selects within a transaction.
+ *
+ * @param criteria object used to create the SELECT statement.
+ * @param con the connection to use
+ * @return List of selected Objects
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
+ */
public static List doSelect(Criteria criteria, Connection con)
throws TorqueException
{
@@ -395,6 +442,9 @@
* returned by this method should be considered readonly. Do not
* alter the data and call save(), your results may vary, but are
* certainly likely to result in hard to track MT bugs.
+ *
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static List doSelectVillageRecords(Criteria criteria)
throws TorqueException
@@ -406,6 +456,10 @@
/**
* Grabs the raw Village records to be formed into objects.
* This method should be used for transactions
+ *
+ * @param con the connection to use
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static List doSelectVillageRecords(Criteria criteria, Connection con)
throws TorqueException
@@ -481,6 +535,9 @@
/**
* The returned List will contain objects of the default type or
* objects that inherit from the default.
+ *
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static List populateObjects(List records)
throws TorqueException
@@ -509,6 +566,9 @@
/**
* The returned Class will contain objects of the default type or
* objects that inherit from the default.
+ *
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static Class getOMClass(Record record, int offset)
throws TorqueException
@@ -556,6 +616,9 @@
* The class that the Peer will make instances of.
* If the BO is abstract then you must implement this method
* in the BO.
+ *
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static Class getOMClass()
throws TorqueException
@@ -578,6 +641,8 @@
*
* @param criteria object containing data that is used to create the UPDATE
* statement.
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static void doUpdate(Criteria criteria) throws TorqueException
{
@@ -592,7 +657,9 @@
*
* @param criteria object containing data that is used to create the UPDATE
* statement.
- * @param dbCon the connection to use
+ * @param con the connection to use
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static void doUpdate(Criteria criteria, Connection con)
throws TorqueException
@@ -661,6 +728,8 @@
* Method to do deletes.
*
* @param criteria object containing data that is used DELETE from database.
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static void doDelete(Criteria criteria) throws TorqueException
{
@@ -674,7 +743,9 @@
* the connection details internally.
*
* @param criteria object containing data that is used DELETE from database.
- * @param dbCon the connection to use
+ * @param con the connection to use
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static void doDelete(Criteria criteria, Connection con)
throws TorqueException
@@ -735,13 +806,23 @@
}
}
- /** Method to do selects */
+ /**
+ * Method to do selects
+ *
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
+ */
public static List doSelect($table.JavaName obj) throws TorqueException
{
return doSelect(buildCriteria(obj));
}
- /** Method to do inserts */
+ /**
+ * Method to do inserts
+ *
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
+ */
public static void doInsert($table.JavaName obj) throws TorqueException
{
#if ($table.IdMethod.equals("none") || $table.PrimaryKeys.size() == 0)
@@ -755,6 +836,8 @@
/**
* @param obj the data object to update in the database.
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static void doUpdate($table.JavaName obj) throws TorqueException
{
@@ -764,6 +847,8 @@
/**
* @param obj the data object to delete in the database.
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static void doDelete($table.JavaName obj) throws TorqueException
{
@@ -776,6 +861,9 @@
* care of the connection details internally.
*
* @param obj the data object to insert into the database.
+ * @param con the connection to use
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static void doInsert($table.JavaName obj, Connection con)
throws TorqueException
@@ -795,6 +883,9 @@
* care of the connection details internally.
*
* @param obj the data object to update in the database.
+ * @param con the connection to use
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static void doUpdate($table.JavaName obj, Connection con)
throws TorqueException
@@ -809,6 +900,9 @@
* care of the connection details internally.
*
* @param obj the data object to delete in the database.
+ * @param con the connection to use
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static void doDelete($table.JavaName obj, Connection con)
throws TorqueException
@@ -820,6 +914,8 @@
* Method to do deletes.
*
* @param pk ObjectKey that is used DELETE from database.
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static void doDelete(ObjectKey pk) throws TorqueException
{
@@ -833,6 +929,9 @@
* care of the connection details internally.
*
* @param pk the primary key for the object to delete in the database.
+ * @param con the connection to use
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static void doDelete(ObjectKey pk, Connection con)
throws TorqueException
@@ -857,7 +956,7 @@
#end
return criteria;
}
-
+
/** Build a Criteria object from the data object for this peer */
public static Criteria buildCriteria( $table.JavaName obj )
{
@@ -890,6 +989,8 @@
* Retrieve a single object by pk
*
* @param pk the primary key
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static $table.JavaName ${retrieveMethod}($pk.JavaNative pk)
throws TorqueException
@@ -902,6 +1003,8 @@
* Retrieve a single object by pk
*
* @param pk the primary key
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static $table.JavaName ${retrieveMethod}(ObjectKey pk)
throws TorqueException
@@ -925,6 +1028,8 @@
*
* @param pk the primary key
* @param con the connection to use
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static $table.JavaName ${retrieveMethod}(ObjectKey pk, Connection con)
throws TorqueException
@@ -945,6 +1050,8 @@
* Retrieve a multiple objects by pk
*
* @param pks List of primary keys
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static List ${retrieveMethod}s(List pks)
throws TorqueException
@@ -968,6 +1075,8 @@
*
* @param pks List of primary keys
* @param dbcon the connection to use
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
public static List ${retrieveMethod}s( List pks, Connection dbcon )
throws TorqueException
@@ -1138,14 +1247,17 @@
## ------------------------------------------------------------
- /**
- * 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.
- */
+ /**
+ * 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 c)
throws TorqueException
{
@@ -1307,14 +1419,17 @@
#end
- /**
- * 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.
- */
+ /**
+ * 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 c)
throws TorqueException
{
@@ -1481,8 +1596,10 @@
#if (!$table.isAlias())
/**
* Returns the TableMap related to this peer. This method is not
- * needed for general use but a specific application could have a
- * need.
+ * needed for general use but a specific application could have a need.
+ *
+ * @throws TorqueException Any exceptions caught during processing will be
+ * rethrown wrapped into a TorqueException.
*/
protected static TableMap getTableMap()
throws TorqueException
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>