1packageorg.apache.jetspeed.om.dbregistry;
23import java.math.BigDecimal;
4import java.sql.Connection;
5import java.sql.SQLException;
6import java.util.ArrayList;
7import java.util.Date;
8import java.util.Iterator;
9import java.util.LinkedList;
10import java.util.List;
1112import org.apache.torque.NoRowsException;
13import org.apache.torque.TooManyRowsException;
14import org.apache.torque.Torque;
15import org.apache.torque.TorqueException;
16import org.apache.torque.map.MapBuilder;
17import org.apache.torque.map.TableMap;
18import org.apache.torque.om.DateKey;
19import org.apache.torque.om.NumberKey;
20import org.apache.torque.om.StringKey;
21import org.apache.torque.om.ObjectKey;
22import org.apache.torque.om.SimpleKey;
23import org.apache.torque.util.BasePeer;
24import org.apache.torque.util.Criteria;
2526import com.workingdogs.village.DataSetException;
27import com.workingdogs.village.QueryDataSet;
28import com.workingdogs.village.Record;
2930// Local classes31importorg.apache.jetspeed.om.dbregistry.map.*;
323334/***35 * This class was autogenerated by Torque on:36 *37 * [Thu Apr 22 23:12:36 EDT 2004]38 *39 */40publicabstractclassBaseMediatypePeer41extends BasePeer
42 {
4344/*** the default database name for this class */45publicstaticfinal String DATABASE_NAME = "default";
4647/*** the table name for this class */48publicstaticfinal String TABLE_NAME = "MEDIATYPE";
4950/***51 * @return the map builder for this peer52 * @throws TorqueException Any exceptions caught during processing will be53 * rethrown wrapped into a TorqueException.54 */55publicstatic MapBuilder getMapBuilder()
56 throws TorqueException
57 {
58return getMapBuilder(MediatypeMapBuilder.CLASS_NAME);
59 }
6061/*** the column name for the ID field */62publicstaticfinal String ID;
63/*** the column name for the NAME field */64publicstaticfinal String NAME;
65/*** the column name for the HIDDEN field */66publicstaticfinal String HIDDEN;
67/*** the column name for the MIMETYPE field */68publicstaticfinal String MIMETYPE;
69/*** the column name for the ROLE field */70publicstaticfinal String ROLE;
71/*** the column name for the TITLE field */72publicstaticfinal String TITLE;
73/*** the column name for the DESCRIPTION field */74publicstaticfinal String DESCRIPTION;
75/*** the column name for the IMAGE field */76publicstaticfinal String IMAGE;
7778static79 {
80 ID = "MEDIATYPE.ID";
81 NAME = "MEDIATYPE.NAME";
82 HIDDEN = "MEDIATYPE.HIDDEN";
83 MIMETYPE = "MEDIATYPE.MIMETYPE";
84 ROLE = "MEDIATYPE.ROLE";
85 TITLE = "MEDIATYPE.TITLE";
86 DESCRIPTION = "MEDIATYPE.DESCRIPTION";
87 IMAGE = "MEDIATYPE.IMAGE";
88if (Torque.isInit())
89 {
90try91 {
92 getMapBuilder();
93 }
94catch (Exception e)
95 {
96 log.error("Could not initialize Peer", e);
97 }
98 }
99else100 {
101 Torque.registerMapBuilder(MediatypeMapBuilder.CLASS_NAME);
102 }
103 }
104105/*** number of columns for this peer */106publicstaticfinalint numColumns = 8;
107108/*** A class that can be returned by this peer. */109protectedstaticfinal String CLASSNAME_DEFAULT =
110"org.apache.jetspeed.om.dbregistry.Mediatype";
111112/*** A class that can be returned by this peer. */113protectedstaticfinal Class CLASS_DEFAULT = initClass(CLASSNAME_DEFAULT);
114115/***116 * Class object initialization method.117 *118 * @param className name of the class to initialize119 * @return the initialized class120 */121privatestatic Class initClass(String className)
122 {
123 Class c = null;
124try125 {
126 c = Class.forName(className);
127 }
128catch (Throwable t)
129 {
130 log.error("A FATAL ERROR has occurred which should not "131 + "have happened under any circumstance. Please notify "132 + "the Torque developers <turbine-torque-dev@jakarta.apache.org> "133 + "and give as many details as possible (including the error "134 + "stack trace).", t);
135136// Error objects should always be propogated.137if (t instanceof Error)
138 {
139throw (Error) t.fillInStackTrace();
140 }
141 }
142return c;
143 }
144145/***146 * Get the list of objects for a ResultSet. Please not that your147 * resultset MUST return columns in the right order. You can use148 * getFieldNames() in BaseObject to get the correct sequence.149 *150 * @param results the ResultSet151 * @return the list of objects152 * @throws TorqueException Any exceptions caught during processing will be153 * rethrown wrapped into a TorqueException.154 */155publicstatic List resultSet2Objects(java.sql.ResultSet results)
156 throws TorqueException
157 {
158try159 {
160 QueryDataSet qds = null;
161 List rows = null;
162try163 {
164 qds = new QueryDataSet(results);
165 rows = getSelectResults(qds);
166 }
167finally168 {
169if (qds != null)
170 {
171 qds.close();
172 }
173 }
174175return populateObjects(rows);
176 }
177catch (SQLException e)
178 {
179thrownew TorqueException(e);
180 }
181catch (DataSetException e)
182 {
183thrownew TorqueException(e);
184 }
185 }
186187188189/***190 * Method to do inserts.191 *192 * @param criteria object used to create the INSERT statement.193 * @throws TorqueException Any exceptions caught during processing will be194 * rethrown wrapped into a TorqueException.195 */196publicstatic ObjectKey doInsert(Criteria criteria)
197 throws TorqueException
198 {
199returnBaseMediatypePeer200 .doInsert(criteria, (Connection) null);
201 }
202203/***204 * Method to do inserts. This method is to be used during a transaction,205 * otherwise use the doInsert(Criteria) method. It will take care of206 * the connection details internally.207 *208 * @param criteria object used to create the INSERT statement.209 * @param con the connection to use210 * @throws TorqueException Any exceptions caught during processing will be211 * rethrown wrapped into a TorqueException.212 */213publicstatic ObjectKey doInsert(Criteria criteria, Connection con)
214 throws TorqueException
215 {
216// check for conversion from boolean to int217if (criteria.containsKey(HIDDEN))
218 {
219 Object possibleBoolean = criteria.get(HIDDEN);
220if (possibleBoolean instanceof Boolean)
221 {
222if (((Boolean) possibleBoolean).booleanValue())
223 {
224 criteria.add(HIDDEN, 1);
225 }
226else227 {
228 criteria.add(HIDDEN, 0);
229 }
230 }
231 }
232233// Set the correct dbName if it has not been overridden234// criteria.getDbName will return the same object if not set to235// another value so == check is okay and faster236if (criteria.getDbName() == Torque.getDefaultDB())
237 {
238 criteria.setDbName(DATABASE_NAME);
239 }
240if (con == null)
241 {
242return BasePeer.doInsert(criteria);
243 }
244else245 {
246return BasePeer.doInsert(criteria, con);
247 }
248 }
249250/***251 * Add all the columns needed to create a new object.252 *253 * @param criteria object containing the columns to add.254 * @throws TorqueException Any exceptions caught during processing will be255 * rethrown wrapped into a TorqueException.256 */257publicstaticvoid addSelectColumns(Criteria criteria)
258 throws TorqueException
259 {
260 criteria.addSelectColumn(ID);
261 criteria.addSelectColumn(NAME);
262 criteria.addSelectColumn(HIDDEN);
263 criteria.addSelectColumn(MIMETYPE);
264 criteria.addSelectColumn(ROLE);
265 criteria.addSelectColumn(TITLE);
266 criteria.addSelectColumn(DESCRIPTION);
267 criteria.addSelectColumn(IMAGE);
268 }
269270/***271 * Create a new object of type cls from a resultset row starting272 * from a specified offset. This is done so that you can select273 * other rows than just those needed for this object. You may274 * for example want to create two objects from the same row.275 *276 * @throws TorqueException Any exceptions caught during processing will be277 * rethrown wrapped into a TorqueException.278 */279publicstaticMediatype row2Object(Record row,
280int offset,
281 Class cls)
282 throws TorqueException
283 {
284try285 {
286Mediatype obj = (Mediatype) cls.newInstance();
287 MediatypePeer.populateObject(row, offset, obj);
288 obj.setModified(false);
289 obj.setNew(false);
290291return obj;
292 }
293catch (InstantiationException e)
294 {
295thrownew TorqueException(e);
296 }
297catch (IllegalAccessException e)
298 {
299thrownew TorqueException(e);
300 }
301 }
302303/***304 * Populates an object from a resultset row starting305 * from a specified offset. This is done so that you can select306 * other rows than just those needed for this object. You may307 * for example want to create two objects from the same row.308 *309 * @throws TorqueException Any exceptions caught during processing will be310 * rethrown wrapped into a TorqueException.311 */312publicstaticvoid populateObject(Record row,
313int offset,
314Mediatype obj)
315 throws TorqueException
316 {
317try318 {
319 obj.setId(row.getValue(offset + 0).asLong());
320 obj.setName(row.getValue(offset + 1).asString());
321 obj.setHidden(row.getValue(offset + 2).asBoolean());
322 obj.setMimetype(row.getValue(offset + 3).asString());
323 obj.setRole(row.getValue(offset + 4).asString());
324 obj.setTitle(row.getValue(offset + 5).asString());
325 obj.setDescription(row.getValue(offset + 6).asString());
326 obj.setImage(row.getValue(offset + 7).asString());
327 }
328catch (DataSetException e)
329 {
330thrownew TorqueException(e);
331 }
332 }
333334/***335 * Method to do selects.336 *337 * @param criteria object used to create the SELECT statement.338 * @return List of selected Objects339 * @throws TorqueException Any exceptions caught during processing will be340 * rethrown wrapped into a TorqueException.341 */342publicstatic List doSelect(Criteria criteria) throws TorqueException
343 {
344return populateObjects(doSelectVillageRecords(criteria));
345 }
346347/***348 * Method to do selects within a transaction.349 *350 * @param criteria object used to create the SELECT statement.351 * @param con the connection to use352 * @return List of selected Objects353 * @throws TorqueException Any exceptions caught during processing will be354 * rethrown wrapped into a TorqueException.355 */356publicstatic List doSelect(Criteria criteria, Connection con)
357 throws TorqueException
358 {
359return populateObjects(doSelectVillageRecords(criteria, con));
360 }
361362/***363 * Grabs the raw Village records to be formed into objects.364 * This method handles connections internally. The Record objects365 * returned by this method should be considered readonly. Do not366 * alter the data and call save(), your results may vary, but are367 * certainly likely to result in hard to track MT bugs.368 *369 * @throws TorqueException Any exceptions caught during processing will be370 * rethrown wrapped into a TorqueException.371 */372publicstatic List doSelectVillageRecords(Criteria criteria)
373 throws TorqueException
374 {
375returnBaseMediatypePeer376 .doSelectVillageRecords(criteria, (Connection) null);
377 }
378379/***380 * Grabs the raw Village records to be formed into objects.381 * This method should be used for transactions382 *383 * @param con the connection to use384 * @throws TorqueException Any exceptions caught during processing will be385 * rethrown wrapped into a TorqueException.386 */387publicstatic List doSelectVillageRecords(Criteria criteria, Connection con)
388 throws TorqueException
389 {
390if (criteria.getSelectColumns().size() == 0)
391 {
392 addSelectColumns(criteria);
393 }
394395// check for conversion from boolean to int396if (criteria.containsKey(HIDDEN))
397 {
398 Object possibleBoolean = criteria.get(HIDDEN);
399if (possibleBoolean instanceof Boolean)
400 {
401if (((Boolean) possibleBoolean).booleanValue())
402 {
403 criteria.add(HIDDEN, 1);
404 }
405else406 {
407 criteria.add(HIDDEN, 0);
408 }
409 }
410 }
411412// Set the correct dbName if it has not been overridden413// criteria.getDbName will return the same object if not set to414// another value so == check is okay and faster415if (criteria.getDbName() == Torque.getDefaultDB())
416 {
417 criteria.setDbName(DATABASE_NAME);
418 }
419// BasePeer returns a List of Value (Village) arrays. The array420// order follows the order columns were placed in the Select clause.421if (con == null)
422 {
423return BasePeer.doSelect(criteria);
424 }
425else426 {
427return BasePeer.doSelect(criteria, con);
428 }
429 }
430431/***432 * The returned List will contain objects of the default type or433 * objects that inherit from the default.434 *435 * @throws TorqueException Any exceptions caught during processing will be436 * rethrown wrapped into a TorqueException.437 */438publicstatic List populateObjects(List records)
439 throws TorqueException
440 {
441 List results = new ArrayList(records.size());
442443// populate the object(s)444for (int i = 0; i < records.size(); i++)
445 {
446 Record row = (Record) records.get(i);
447 results.add(MediatypePeer.row2Object(row, 1,
448 MediatypePeer.getOMClass()));
449 }
450return results;
451 }
452453454/***455 * The class that the Peer will make instances of.456 * If the BO is abstract then you must implement this method457 * in the BO.458 *459 * @throws TorqueException Any exceptions caught during processing will be460 * rethrown wrapped into a TorqueException.461 */462publicstatic Class getOMClass()
463 throws TorqueException
464 {
465return CLASS_DEFAULT;
466 }
467468/***469 * Method to do updates.470 *471 * @param criteria object containing data that is used to create the UPDATE472 * statement.473 * @throws TorqueException Any exceptions caught during processing will be474 * rethrown wrapped into a TorqueException.475 */476publicstaticvoid doUpdate(Criteria criteria) throws TorqueException
477 {
478BaseMediatypePeer479 .doUpdate(criteria, (Connection) null);
480 }
481482/***483 * Method to do updates. This method is to be used during a transaction,484 * otherwise use the doUpdate(Criteria) method. It will take care of485 * the connection details internally.486 *487 * @param criteria object containing data that is used to create the UPDATE488 * statement.489 * @param con the connection to use490 * @throws TorqueException Any exceptions caught during processing will be491 * rethrown wrapped into a TorqueException.492 */493publicstaticvoid doUpdate(Criteria criteria, Connection con)
494 throws TorqueException
495 {
496 Criteria selectCriteria = new Criteria(DATABASE_NAME, 2);
497 selectCriteria.put(ID, criteria.remove(ID));
498// check for conversion from boolean to int499if (criteria.containsKey(HIDDEN))
500 {
501 Object possibleBoolean = criteria.get(HIDDEN);
502if (possibleBoolean instanceof Boolean)
503 {
504if (((Boolean) possibleBoolean).booleanValue())
505 {
506 criteria.add(HIDDEN, 1);
507 }
508else509 {
510 criteria.add(HIDDEN, 0);
511 }
512 }
513 }
514515// Set the correct dbName if it has not been overridden516// criteria.getDbName will return the same object if not set to517// another value so == check is okay and faster518if (criteria.getDbName() == Torque.getDefaultDB())
519 {
520 criteria.setDbName(DATABASE_NAME);
521 }
522if (con == null)
523 {
524 BasePeer.doUpdate(selectCriteria, criteria);
525 }
526else527 {
528 BasePeer.doUpdate(selectCriteria, criteria, con);
529 }
530 }
531532/***533 * Method to do deletes.534 *535 * @param criteria object containing data that is used DELETE from database.536 * @throws TorqueException Any exceptions caught during processing will be537 * rethrown wrapped into a TorqueException.538 */539publicstaticvoid doDelete(Criteria criteria) throws TorqueException
540 {
541BaseMediatypePeer542 .doDelete(criteria, (Connection) null);
543 }
544545/***546 * Method to do deletes. This method is to be used during a transaction,547 * otherwise use the doDelete(Criteria) method. It will take care of548 * the connection details internally.549 *550 * @param criteria object containing data that is used DELETE from database.551 * @param con the connection to use552 * @throws TorqueException Any exceptions caught during processing will be553 * rethrown wrapped into a TorqueException.554 */555publicstaticvoid doDelete(Criteria criteria, Connection con)
556 throws TorqueException
557 {
558// check for conversion from boolean to int559if (criteria.containsKey(HIDDEN))
560 {
561 Object possibleBoolean = criteria.get(HIDDEN);
562if (possibleBoolean instanceof Boolean)
563 {
564if (((Boolean) possibleBoolean).booleanValue())
565 {
566 criteria.add(HIDDEN, 1);
567 }
568else569 {
570 criteria.add(HIDDEN, 0);
571 }
572 }
573 }
574575// Set the correct dbName if it has not been overridden576// criteria.getDbName will return the same object if not set to577// another value so == check is okay and faster578if (criteria.getDbName() == Torque.getDefaultDB())
579 {
580 criteria.setDbName(DATABASE_NAME);
581 }
582if (con == null)
583 {
584 BasePeer.doDelete(criteria);
585 }
586else587 {
588 BasePeer.doDelete(criteria, con);
589 }
590 }
591592/***593 * Method to do selects594 *595 * @throws TorqueException Any exceptions caught during processing will be596 * rethrown wrapped into a TorqueException.597 */598publicstatic List doSelect(Mediatype obj) throws TorqueException
599 {
600return doSelect(buildCriteria(obj));
601 }
602603/***604 * Method to do inserts605 *606 * @throws TorqueException Any exceptions caught during processing will be607 * rethrown wrapped into a TorqueException.608 */609publicstaticvoid doInsert(Mediatype obj) throws TorqueException
610 {
611 obj.setPrimaryKey(doInsert(buildCriteria(obj)));
612 obj.setNew(false);
613 obj.setModified(false);
614 }
615616/***617 * @param obj the data object to update in the database.618 * @throws TorqueException Any exceptions caught during processing will be619 * rethrown wrapped into a TorqueException.620 */621publicstaticvoid doUpdate(Mediatype obj) throws TorqueException
622 {
623 doUpdate(buildCriteria(obj));
624 obj.setModified(false);
625 }
626627/***628 * @param obj the data object to delete in the database.629 * @throws TorqueException Any exceptions caught during processing will be630 * rethrown wrapped into a TorqueException.631 */632publicstaticvoid doDelete(Mediatype obj) throws TorqueException
633 {
634 doDelete(buildCriteria(obj));
635 }
636637/***638 * Method to do inserts. This method is to be used during a transaction,639 * otherwise use the doInsert(Mediatype) method. It will take640 * care of the connection details internally.641 *642 * @param obj the data object to insert into the database.643 * @param con the connection to use644 * @throws TorqueException Any exceptions caught during processing will be645 * rethrown wrapped into a TorqueException.646 */647publicstaticvoid doInsert(Mediatype obj, Connection con)
648 throws TorqueException
649 {
650 obj.setPrimaryKey(doInsert(buildCriteria(obj), con));
651 obj.setNew(false);
652 obj.setModified(false);
653 }
654655/***656 * Method to do update. This method is to be used during a transaction,657 * otherwise use the doUpdate(Mediatype) method. It will take658 * care of the connection details internally.659 *660 * @param obj the data object to update in the database.661 * @param con the connection to use662 * @throws TorqueException Any exceptions caught during processing will be663 * rethrown wrapped into a TorqueException.664 */665publicstaticvoid doUpdate(Mediatype obj, Connection con)
666 throws TorqueException
667 {
668 doUpdate(buildCriteria(obj), con);
669 obj.setModified(false);
670 }
671672/***673 * Method to delete. This method is to be used during a transaction,674 * otherwise use the doDelete(Mediatype) method. It will take675 * care of the connection details internally.676 *677 * @param obj the data object to delete in the database.678 * @param con the connection to use679 * @throws TorqueException Any exceptions caught during processing will be680 * rethrown wrapped into a TorqueException.681 */682publicstaticvoid doDelete(Mediatype obj, Connection con)
683 throws TorqueException
684 {
685 doDelete(buildCriteria(obj), con);
686 }
687688/***689 * Method to do deletes.690 *691 * @param pk ObjectKey that is used DELETE from database.692 * @throws TorqueException Any exceptions caught during processing will be693 * rethrown wrapped into a TorqueException.694 */695publicstaticvoid doDelete(ObjectKey pk) throws TorqueException
696 {
697BaseMediatypePeer698 .doDelete(pk, (Connection) null);
699 }
700701/***702 * Method to delete. This method is to be used during a transaction,703 * otherwise use the doDelete(ObjectKey) method. It will take704 * care of the connection details internally.705 *706 * @param pk the primary key for the object to delete in the database.707 * @param con the connection to use708 * @throws TorqueException Any exceptions caught during processing will be709 * rethrown wrapped into a TorqueException.710 */711publicstaticvoid doDelete(ObjectKey pk, Connection con)
712 throws TorqueException
713 {
714 doDelete(buildCriteria(pk), con);
715 }
716717/*** Build a Criteria object from an ObjectKey */718publicstatic Criteria buildCriteria( ObjectKey pk )
719 {
720 Criteria criteria = new Criteria();
721 criteria.add(ID, pk);
722return criteria;
723 }
724725/*** Build a Criteria object from the data object for this peer */726publicstatic Criteria buildCriteria( Mediatype obj )
727 {
728 Criteria criteria = new Criteria(DATABASE_NAME);
729if (!obj.isNew())
730 criteria.add(ID, obj.getId());
731 criteria.add(NAME, obj.getName());
732 criteria.add(HIDDEN, obj.getHidden());
733 criteria.add(MIMETYPE, obj.getMimetype());
734 criteria.add(ROLE, obj.getRole());
735 criteria.add(TITLE, obj.getTitle());
736 criteria.add(DESCRIPTION, obj.getDescription());
737 criteria.add(IMAGE, obj.getImage());
738return criteria;
739 }
740741742/***743 * Retrieve a single object by pk744 *745 * @param pk the primary key746 * @throws TorqueException Any exceptions caught during processing will be747 * rethrown wrapped into a TorqueException.748 * @throws NoRowsException Primary key was not found in database.749 * @throws TooManyRowsException Primary key was not found in database.750 */751publicstaticMediatype retrieveByPK(long pk)
752 throws TorqueException, NoRowsException, TooManyRowsException
753 {
754return retrieveByPK(SimpleKey.keyFor(pk));
755 }
756757/***758 * Retrieve a single object by pk759 *760 * @param pk the primary key761 * @throws TorqueException Any exceptions caught during processing will be762 * rethrown wrapped into a TorqueException.763 * @throws NoRowsException Primary key was not found in database.764 * @throws TooManyRowsException Primary key was not found in database.765 */766publicstaticMediatype retrieveByPK(ObjectKey pk)
767 throws TorqueException, NoRowsException, TooManyRowsException
768 {
769 Connection db = null;
770Mediatype retVal = null;
771try772 {
773 db = Torque.getConnection(DATABASE_NAME);
774 retVal = retrieveByPK(pk, db);
775 }
776finally777 {
778 Torque.closeConnection(db);
779 }
780return(retVal);
781 }
782783/***784 * Retrieve a single object by pk785 *786 * @param pk the primary key787 * @param con the connection to use788 * @throws TorqueException Any exceptions caught during processing will be789 * rethrown wrapped into a TorqueException.790 * @throws NoRowsException Primary key was not found in database.791 * @throws TooManyRowsException Primary key was not found in database.792 */793publicstaticMediatype retrieveByPK(ObjectKey pk, Connection con)
794 throws TorqueException, NoRowsException, TooManyRowsException
795 {
796 Criteria criteria = buildCriteria(pk);
797 List v = doSelect(criteria, con);
798if (v.size() == 0)
799 {
800thrownew NoRowsException("Failed to select a row.");
801 }
802elseif (v.size() > 1)
803 {
804thrownew TooManyRowsException("Failed to select only one row.");
805 }
806else807 {
808return (Mediatype)v.get(0);
809 }
810 }
811812/***813 * Retrieve a multiple objects by pk814 *815 * @param pks List of primary keys816 * @throws TorqueException Any exceptions caught during processing will be817 * rethrown wrapped into a TorqueException.818 */819publicstatic List retrieveByPKs(List pks)
820 throws TorqueException
821 {
822 Connection db = null;
823 List retVal = null;
824try825 {
826 db = Torque.getConnection(DATABASE_NAME);
827 retVal = retrieveByPKs(pks, db);
828 }
829finally830 {
831 Torque.closeConnection(db);
832 }
833return(retVal);
834 }
835836/***837 * Retrieve a multiple objects by pk838 *839 * @param pks List of primary keys840 * @param dbcon the connection to use841 * @throws TorqueException Any exceptions caught during processing will be842 * rethrown wrapped into a TorqueException.843 */844publicstatic List retrieveByPKs( List pks, Connection dbcon )
845 throws TorqueException
846 {
847 List objs = null;
848if (pks == null || pks.size() == 0)
849 {
850 objs = new LinkedList();
851 }
852else853 {
854 Criteria criteria = new Criteria();
855 criteria.addIn( ID, pks );
856 objs = doSelect(criteria, dbcon);
857 }
858return objs;
859 }
860861862863864865866867868869870/***871 * Returns the TableMap related to this peer. This method is not872 * needed for general use but a specific application could have a need.873 *874 * @throws TorqueException Any exceptions caught during processing will be875 * rethrown wrapped into a TorqueException.876 */877protectedstatic TableMap getTableMap()
878 throws TorqueException
879 {
880return Torque.getDatabaseMap(DATABASE_NAME).getTable(TABLE_NAME);
881 }
882 }