예제 #1
0
 private static void visitChildren(
     IFastOrmContainer fastOrm, IEntityDefn parent, IMakerAndEntityDefnVisitor visitor)
     throws Exception {
   for (IEntityDefn child : parent.getChildren()) {
     visitor.acceptChild(
         fastOrm
             .getTempTableMakerFactory()
             .findReaderMakerFor(parent.parameters(), child.parameters()),
         parent,
         child);
     visitChildren(fastOrm, child, visitor);
   }
 }
예제 #2
0
 private static void visitChildren(IEntityDefn parent, IEntityDefnParentChildVisitor visitor)
     throws Exception {
   for (IEntityDefn child : parent.getChildren()) {
     visitor.acceptChild(parent, child);
     visitChildren(child, visitor);
   }
 }
예제 #3
0
 private static <To, From> void visitChildren(
     IFastOrmContainer fastOrm,
     IEntityDefn parent,
     IMakerAndEntityDefnFoldVisitor<From, To> visitor,
     IAggregator<From, To> aggregator) {
   for (IEntityDefn child : parent.getChildren()) {
     aggregator.add(
         visitor.acceptChild(
             fastOrm
                 .getTempTableMakerFactory()
                 .findReaderMakerFor(parent.parameters(), child.parameters()),
             parent,
             child));
     visitChildren(fastOrm, child, visitor, aggregator);
   }
 }
예제 #4
0
 private static void visitChildren(
     IFastOrmContainer fastOrm, IEntityDefn parent, IMutableMakerAndEntityDefnVisitor visitor)
     throws Exception {
   for (IEntityDefn child : parent.getChildren()) {
     visitor.accept(fastOrm.getTempTableMakerFactory().findMutatingMakerFor(child), child);
     visitChildren(fastOrm, child, visitor);
   }
 }
예제 #5
0
 private static <To, From> void visitChildren(
     IEntityDefn parent,
     IEntityDefnFoldVisitor<From, To> visitor,
     IAggregator<From, To> aggregator) {
   for (IEntityDefn child : parent.getChildren()) {
     aggregator.add(visitor.acceptChild(parent, child));
     visitChildren(child, visitor, aggregator);
   }
 }
예제 #6
0
 private static <To, From> To visitChildren(
     IEntityDefn parent,
     To initial,
     IEntityDefnFoldVisitor<From, To> visitor,
     IFoldFunction<From, To> foldFunction) {
   To accumulator = initial;
   for (IEntityDefn child : parent.getChildren()) {
     accumulator = foldFunction.apply(visitor.acceptChild(parent, child), accumulator);
     accumulator = visitChildren(parent, accumulator, visitor, foldFunction);
   }
   return accumulator;
 }