/**
   * Create a new object of type cls from a resultset row starting 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 TRoleListType row2Object(Record row, int offset, Class cls) throws TorqueException {
    try {
      TRoleListType obj = (TRoleListType) cls.newInstance();
      TRoleListTypePeer.populateObject(row, offset, obj);
      obj.setModified(false);
      obj.setNew(false);

      return obj;
    } catch (InstantiationException e) {
      throw new TorqueException(e);
    } catch (IllegalAccessException e) {
      throw new TorqueException(e);
    }
  }
 /**
  * Method to do update. This method is to be used during a transaction, otherwise use the
  * doUpdate(TRoleListType) method. It will take 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(TRoleListType obj, Connection con) throws TorqueException {
   doUpdate(buildCriteria(obj), con);
   obj.setModified(false);
 }
 /**
  * Method to do inserts. This method is to be used during a transaction, otherwise use the
  * doInsert(TRoleListType) method. It will take 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(TRoleListType obj, Connection con) throws TorqueException {
   obj.setPrimaryKey(doInsert(buildCriteria(obj), con));
   obj.setNew(false);
   obj.setModified(false);
 }