OQLQuery query = _db.getOQLQuery(
"CALL SQL select PTF_LOCKED.ID as ID "
+ "from PTF_LOCKED order by PTF_LOCKED.ID "
+ "AS " + OID.class.getName());
QueryResults results = query.execute(Database.READONLY);
long result = System.currentTimeMillis();
initIterateQueriesOID();
int count = 0;
while (results.hasMore()) {
OID oid = (OID) results.next();
iterateStatesOID((Locked) _db.load(Locked.class, oid.getId()),
Database.SHARED);
count++;
}