示例#1
0
 private List4 createQCandidatesList() {
   List4 candidatesList = null;
   Iterator4 i = iterateConstraints();
   while (i.moveNext()) {
     QCon constraint = (QCon) i.current();
     constraint = constraint.getRoot();
     ClassMetadata classMetadata = constraint.getYapClass();
     if (classMetadata == null) {
       continue;
     }
     if (constraintCanBeAddedToExisting(candidatesList, constraint)) {
       continue;
     }
     QCandidates candidates = new QCandidates((LocalTransaction) _trans, classMetadata, null);
     candidatesList = new List4(candidatesList, candidates);
   }
   return candidatesList;
 }
示例#2
0
 public CreateCandidateCollectionResult createCandidateCollection() {
   List4 candidatesList = createQCandidatesList();
   boolean checkDuplicates = false;
   boolean topLevel = true;
   Iterator4 i = iterateConstraints();
   while (i.moveNext()) {
     QCon constraint = (QCon) i.current();
     QCon old = constraint;
     constraint = constraint.getRoot();
     if (constraint != old) {
       checkDuplicates = true;
       topLevel = false;
     }
     ClassMetadata classMetadata = constraint.getYapClass();
     if (classMetadata == null) {
       break;
     }
     addConstraintToCandidatesList(candidatesList, constraint);
   }
   return new CreateCandidateCollectionResult(candidatesList, checkDuplicates, topLevel);
 }