docs: public DCollection query(String predicate) throws org.odmg.QueryInvalidException
      {
          // 1.build complete OQL statement
          String oql = "select all from java.lang.Object where " + predicate;
          TransactionImpl tx = getTransaction();
  
          OQLQuery predicateQuery = tx.getImplementation().newOQLQuery();
  
          PBCapsule capsule = new PBCapsule(tx.getImplementation().getCurrentPBKey(), tx);
          PersistenceBroker broker = capsule.getBroker();
  
          try
          {
              predicateQuery.create(oql);
              Query pQ = ((OQLQueryImpl) predicateQuery).getQuery();
              Criteria pCrit = pQ.getCriteria();
  
              Criteria allElementsCriteria = this.getPkCriteriaForAllElements(broker);
              // join selection of elements with predicate criteria:
              pCrit.addAndCriteria(allElementsCriteria);
              Class clazz = this.getElementsExtentClass(broker);
              Query q = new QueryByCriteria(clazz, pCrit);
              if (log.isDebugEnabled()) log.debug(q.toString());
              // 2. perfom query
              return (DSetImpl) broker.getCollectionByQuery(DSetImpl.class, q);
          }
          catch (PersistenceBrokerException e)
          {
              throw new ODMGRuntimeException(e.getMessage());
          }
          finally
          {
              capsule.destroy();
          }
      }