Exemplo n.º 1
0
 private void writeCachedDirty() {
   Iterator4 i = _dirtyClassMetadata.iterator();
   while (i.moveNext()) {
     PersistentBase dirty = (PersistentBase) i.current();
     dirty.write(systemTransaction());
     dirty.notCachedDirty();
   }
   _dirtyClassMetadata.clear();
 }
Exemplo n.º 2
0
  public Iterator4 executeSnapshot() {
    final CreateCandidateCollectionResult r = createCandidateCollection();

    final Collection4 executionPath = executionPath(r);

    Iterator4 candidatesIterator = new Iterator4Impl(r.candidateCollection);

    Collection4 snapshots = new Collection4();
    while (candidatesIterator.moveNext()) {
      QCandidates candidates = (QCandidates) candidatesIterator.current();
      snapshots.add(candidates.executeSnapshot(executionPath));
    }

    Iterator4 snapshotsIterator = snapshots.iterator();
    final CompositeIterator4 resultingIDs = new CompositeIterator4(snapshotsIterator);

    if (!r.checkDuplicates) {
      return resultingIDs;
    }

    return checkDuplicates(resultingIDs);
  }
Exemplo n.º 3
0
 private Constraint addInterfaceConstraint(ReflectClass claxx) {
   Collection4 classes = stream().classCollection().forInterface(claxx);
   if (classes.size() == 0) {
     QConClass qcc = new QConClass(_trans, null, null, claxx);
     addConstraint(qcc);
     return qcc;
   }
   Iterator4 i = classes.iterator();
   Constraint constr = null;
   while (i.moveNext()) {
     ClassMetadata classMetadata = (ClassMetadata) i.current();
     ReflectClass classMetadataClaxx = classMetadata.classReflector();
     if (classMetadataClaxx != null) {
       if (!classMetadataClaxx.isInterface()) {
         if (constr == null) {
           constr = constrain(classMetadataClaxx);
         } else {
           constr = constr.or(constrain(classMetadata.classReflector()));
         }
       }
     }
   }
   return constr;
 }