public void run(int nOps) {
if (mode != CrundDriver.XMode.INDY) {
beginTransaction();
}
// QueryBuilder is the sessionFactory for queries
final QueryBuilder builder
= session.getQueryBuilder();
// QueryDomainType is the main interface
final QueryDomainType<IB0> dobj
= builder.createQueryDefinition(IB0.class);
// filter by aid
dobj.where(dobj.get("aid").equal(dobj.param("aid")));
query = session.createQuery(dobj);
for (int i = 0; i < nOps; i++) {
// find B0s by query