code: @Override
    public <T, C> T retrieveBean(String name, C criteria, T result, Collection<CpoWhere> wheres, Collection<CpoOrderBy> orderBy, Collection<CpoNativeFunction> nativeExpressions) throws CpoException {
      Iterator<T> it = processSelectGroup(name, criteria, result, wheres, orderBy, nativeExpressions, true).iterator();
      if (it.hasNext()) {
        return it.next();
      } else {
        return null;
      }
    }
docs: Retrieves the bean from the datasource. The assumption is that the bean exists in the datasource. If the retrieve
  function defined for this beans returns more than one row, an exception will be thrown.
  
  @param name              The filter name which tells the datasource which beans should be returned. The name also signifies what
  data in the bean will be populated.
  @param criteria          This is an bean that has been defined within the metadata of the datasource. If the class is not
  defined an exception will be thrown. If the bean does not exist in the datasource, an exception will be thrown.
  This bean is used to specify the arguments used to retrieve the collection of beans.
  @param result            This is an bean that has been defined within the metadata of the datasource. If the class is not
  defined an exception will be thrown. If the bean does not exist in the datasource, an exception will be thrown.
  This bean is used to specify the bean type that will be returned in the collection.
  @param wheres            A collection of CpoWhere beans that define the constraints that should be used when retrieving beans
  @param orderBy           The CpoOrderBy bean that defines the order in which beans should be returned
  @param nativeExpressions Native expression that will be used to augment the expression stored in the meta data. This
  text will be embedded at run-time
  @return An bean of the same type as the result argument that is filled in as specified the metadata for the
  retireve.
  @throws CpoException Thrown if there are errors accessing the datasource