Example #1
0
 /**
  * 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 retrieveByPKs(List pks) throws TorqueException {
   Connection db = null;
   List retVal = null;
   try {
     db = Torque.getConnection(DATABASE_NAME);
     retVal = retrieveByPKs(pks, db);
   } finally {
     Torque.closeConnection(db);
   }
   return (retVal);
 }
 /**
  * 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<TRoleListType> retrieveByPKs(List<ObjectKey> pks) throws TorqueException {
   Connection db = null;
   List<TRoleListType> retVal = null;
   try {
     db = Torque.getConnection(DATABASE_NAME);
     retVal = retrieveByPKs(pks, db);
   } finally {
     Torque.closeConnection(db);
   }
   return retVal;
 }
Example #3
0
 /**
  * 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.
  * @throws NoRowsException Primary key was not found in database.
  * @throws TooManyRowsException Primary key was not found in database.
  */
 public static Exam retrieveByPK(ObjectKey pk)
     throws TorqueException, NoRowsException, TooManyRowsException {
   Connection db = null;
   Exam retVal = null;
   try {
     db = Torque.getConnection(DATABASE_NAME);
     retVal = retrieveByPK(pk, db);
   } finally {
     Torque.closeConnection(db);
   }
   return (retVal);
 }