Code Duplication    Length = 23-23 lines in 14 locations

src/cli/Database/Base/ChannelQuery.php 2 locations

@@ 395-417 (lines=23) @@
392
     *
393
     * @return $this|ChildChannelQuery The current query, for fluid interface
394
     */
395
    public function joinInstance($relationAlias = null, $joinType = Criteria::INNER_JOIN)
396
    {
397
        $tableMap = $this->getTableMap();
398
        $relationMap = $tableMap->getRelation('Instance');
399
400
        // create a ModelJoin object for this join
401
        $join = new ModelJoin();
402
        $join->setJoinType($joinType);
403
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
404
        if ($previousJoin = $this->getPreviousJoin()) {
405
            $join->setPreviousJoin($previousJoin);
406
        }
407
408
        // add the ModelJoin to the current object
409
        if ($relationAlias) {
410
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
411
            $this->addJoinObject($join, $relationAlias);
412
        } else {
413
            $this->addJoinObject($join, 'Instance');
414
        }
415
416
        return $this;
417
    }
418
419
    /**
420
     * Use the Instance relation Instance object
@@ 468-490 (lines=23) @@
465
     *
466
     * @return $this|ChildChannelQuery The current query, for fluid interface
467
     */
468
    public function joinSubscription($relationAlias = null, $joinType = Criteria::INNER_JOIN)
469
    {
470
        $tableMap = $this->getTableMap();
471
        $relationMap = $tableMap->getRelation('Subscription');
472
473
        // create a ModelJoin object for this join
474
        $join = new ModelJoin();
475
        $join->setJoinType($joinType);
476
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
477
        if ($previousJoin = $this->getPreviousJoin()) {
478
            $join->setPreviousJoin($previousJoin);
479
        }
480
481
        // add the ModelJoin to the current object
482
        if ($relationAlias) {
483
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
484
            $this->addJoinObject($join, $relationAlias);
485
        } else {
486
            $this->addJoinObject($join, 'Subscription');
487
        }
488
489
        return $this;
490
    }
491
492
    /**
493
     * Use the Subscription relation Subscription object

src/cli/Database/Base/ConnectionQuery.php 2 locations

@@ 525-547 (lines=23) @@
522
     *
523
     * @return $this|ChildConnectionQuery The current query, for fluid interface
524
     */
525
    public function joinInstance($relationAlias = null, $joinType = Criteria::INNER_JOIN)
526
    {
527
        $tableMap = $this->getTableMap();
528
        $relationMap = $tableMap->getRelation('Instance');
529
530
        // create a ModelJoin object for this join
531
        $join = new ModelJoin();
532
        $join->setJoinType($joinType);
533
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
534
        if ($previousJoin = $this->getPreviousJoin()) {
535
            $join->setPreviousJoin($previousJoin);
536
        }
537
538
        // add the ModelJoin to the current object
539
        if ($relationAlias) {
540
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
541
            $this->addJoinObject($join, $relationAlias);
542
        } else {
543
            $this->addJoinObject($join, 'Instance');
544
        }
545
546
        return $this;
547
    }
548
549
    /**
550
     * Use the Instance relation Instance object
@@ 602-624 (lines=23) @@
599
     *
600
     * @return $this|ChildConnectionQuery The current query, for fluid interface
601
     */
602
    public function joinUser($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
603
    {
604
        $tableMap = $this->getTableMap();
605
        $relationMap = $tableMap->getRelation('User');
606
607
        // create a ModelJoin object for this join
608
        $join = new ModelJoin();
609
        $join->setJoinType($joinType);
610
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
611
        if ($previousJoin = $this->getPreviousJoin()) {
612
            $join->setPreviousJoin($previousJoin);
613
        }
614
615
        // add the ModelJoin to the current object
616
        if ($relationAlias) {
617
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
618
            $this->addJoinObject($join, $relationAlias);
619
        } else {
620
            $this->addJoinObject($join, 'User');
621
        }
622
623
        return $this;
624
    }
625
626
    /**
627
     * Use the User relation User object

src/cli/Database/Base/InstanceQuery.php 4 locations

@@ 331-353 (lines=23) @@
328
     *
329
     * @return $this|ChildInstanceQuery The current query, for fluid interface
330
     */
331
    public function joinUser($relationAlias = null, $joinType = Criteria::INNER_JOIN)
332
    {
333
        $tableMap = $this->getTableMap();
334
        $relationMap = $tableMap->getRelation('User');
335
336
        // create a ModelJoin object for this join
337
        $join = new ModelJoin();
338
        $join->setJoinType($joinType);
339
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
340
        if ($previousJoin = $this->getPreviousJoin()) {
341
            $join->setPreviousJoin($previousJoin);
342
        }
343
344
        // add the ModelJoin to the current object
345
        if ($relationAlias) {
346
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
347
            $this->addJoinObject($join, $relationAlias);
348
        } else {
349
            $this->addJoinObject($join, 'User');
350
        }
351
352
        return $this;
353
    }
354
355
    /**
356
     * Use the User relation User object
@@ 404-426 (lines=23) @@
401
     *
402
     * @return $this|ChildInstanceQuery The current query, for fluid interface
403
     */
404
    public function joinConnection($relationAlias = null, $joinType = Criteria::INNER_JOIN)
405
    {
406
        $tableMap = $this->getTableMap();
407
        $relationMap = $tableMap->getRelation('Connection');
408
409
        // create a ModelJoin object for this join
410
        $join = new ModelJoin();
411
        $join->setJoinType($joinType);
412
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
413
        if ($previousJoin = $this->getPreviousJoin()) {
414
            $join->setPreviousJoin($previousJoin);
415
        }
416
417
        // add the ModelJoin to the current object
418
        if ($relationAlias) {
419
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
420
            $this->addJoinObject($join, $relationAlias);
421
        } else {
422
            $this->addJoinObject($join, 'Connection');
423
        }
424
425
        return $this;
426
    }
427
428
    /**
429
     * Use the Connection relation Connection object
@@ 477-499 (lines=23) @@
474
     *
475
     * @return $this|ChildInstanceQuery The current query, for fluid interface
476
     */
477
    public function joinChannel($relationAlias = null, $joinType = Criteria::INNER_JOIN)
478
    {
479
        $tableMap = $this->getTableMap();
480
        $relationMap = $tableMap->getRelation('Channel');
481
482
        // create a ModelJoin object for this join
483
        $join = new ModelJoin();
484
        $join->setJoinType($joinType);
485
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
486
        if ($previousJoin = $this->getPreviousJoin()) {
487
            $join->setPreviousJoin($previousJoin);
488
        }
489
490
        // add the ModelJoin to the current object
491
        if ($relationAlias) {
492
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
493
            $this->addJoinObject($join, $relationAlias);
494
        } else {
495
            $this->addJoinObject($join, 'Channel');
496
        }
497
498
        return $this;
499
    }
500
501
    /**
502
     * Use the Channel relation Channel object
@@ 550-572 (lines=23) @@
547
     *
548
     * @return $this|ChildInstanceQuery The current query, for fluid interface
549
     */
550
    public function joinSubscription($relationAlias = null, $joinType = Criteria::INNER_JOIN)
551
    {
552
        $tableMap = $this->getTableMap();
553
        $relationMap = $tableMap->getRelation('Subscription');
554
555
        // create a ModelJoin object for this join
556
        $join = new ModelJoin();
557
        $join->setJoinType($joinType);
558
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
559
        if ($previousJoin = $this->getPreviousJoin()) {
560
            $join->setPreviousJoin($previousJoin);
561
        }
562
563
        // add the ModelJoin to the current object
564
        if ($relationAlias) {
565
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
566
            $this->addJoinObject($join, $relationAlias);
567
        } else {
568
            $this->addJoinObject($join, 'Subscription');
569
        }
570
571
        return $this;
572
    }
573
574
    /**
575
     * Use the Subscription relation Subscription object

src/cli/Database/Base/SubscriptionQuery.php 3 locations

@@ 677-699 (lines=23) @@
674
     *
675
     * @return $this|ChildSubscriptionQuery The current query, for fluid interface
676
     */
677
    public function joinInstance($relationAlias = null, $joinType = Criteria::INNER_JOIN)
678
    {
679
        $tableMap = $this->getTableMap();
680
        $relationMap = $tableMap->getRelation('Instance');
681
682
        // create a ModelJoin object for this join
683
        $join = new ModelJoin();
684
        $join->setJoinType($joinType);
685
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
686
        if ($previousJoin = $this->getPreviousJoin()) {
687
            $join->setPreviousJoin($previousJoin);
688
        }
689
690
        // add the ModelJoin to the current object
691
        if ($relationAlias) {
692
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
693
            $this->addJoinObject($join, $relationAlias);
694
        } else {
695
            $this->addJoinObject($join, 'Instance');
696
        }
697
698
        return $this;
699
    }
700
701
    /**
702
     * Use the Instance relation Instance object
@@ 754-776 (lines=23) @@
751
     *
752
     * @return $this|ChildSubscriptionQuery The current query, for fluid interface
753
     */
754
    public function joinUser($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
755
    {
756
        $tableMap = $this->getTableMap();
757
        $relationMap = $tableMap->getRelation('User');
758
759
        // create a ModelJoin object for this join
760
        $join = new ModelJoin();
761
        $join->setJoinType($joinType);
762
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
763
        if ($previousJoin = $this->getPreviousJoin()) {
764
            $join->setPreviousJoin($previousJoin);
765
        }
766
767
        // add the ModelJoin to the current object
768
        if ($relationAlias) {
769
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
770
            $this->addJoinObject($join, $relationAlias);
771
        } else {
772
            $this->addJoinObject($join, 'User');
773
        }
774
775
        return $this;
776
    }
777
778
    /**
779
     * Use the User relation User object
@@ 831-853 (lines=23) @@
828
     *
829
     * @return $this|ChildSubscriptionQuery The current query, for fluid interface
830
     */
831
    public function joinChannel($relationAlias = null, $joinType = Criteria::INNER_JOIN)
832
    {
833
        $tableMap = $this->getTableMap();
834
        $relationMap = $tableMap->getRelation('Channel');
835
836
        // create a ModelJoin object for this join
837
        $join = new ModelJoin();
838
        $join->setJoinType($joinType);
839
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
840
        if ($previousJoin = $this->getPreviousJoin()) {
841
            $join->setPreviousJoin($previousJoin);
842
        }
843
844
        // add the ModelJoin to the current object
845
        if ($relationAlias) {
846
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
847
            $this->addJoinObject($join, $relationAlias);
848
        } else {
849
            $this->addJoinObject($join, 'Channel');
850
        }
851
852
        return $this;
853
    }
854
855
    /**
856
     * Use the Channel relation Channel object

src/cli/Database/Base/UserQuery.php 3 locations

@@ 405-427 (lines=23) @@
402
     *
403
     * @return $this|ChildUserQuery The current query, for fluid interface
404
     */
405
    public function joinInstance($relationAlias = null, $joinType = Criteria::INNER_JOIN)
406
    {
407
        $tableMap = $this->getTableMap();
408
        $relationMap = $tableMap->getRelation('Instance');
409
410
        // create a ModelJoin object for this join
411
        $join = new ModelJoin();
412
        $join->setJoinType($joinType);
413
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
414
        if ($previousJoin = $this->getPreviousJoin()) {
415
            $join->setPreviousJoin($previousJoin);
416
        }
417
418
        // add the ModelJoin to the current object
419
        if ($relationAlias) {
420
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
421
            $this->addJoinObject($join, $relationAlias);
422
        } else {
423
            $this->addJoinObject($join, 'Instance');
424
        }
425
426
        return $this;
427
    }
428
429
    /**
430
     * Use the Instance relation Instance object
@@ 478-500 (lines=23) @@
475
     *
476
     * @return $this|ChildUserQuery The current query, for fluid interface
477
     */
478
    public function joinConnection($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
479
    {
480
        $tableMap = $this->getTableMap();
481
        $relationMap = $tableMap->getRelation('Connection');
482
483
        // create a ModelJoin object for this join
484
        $join = new ModelJoin();
485
        $join->setJoinType($joinType);
486
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
487
        if ($previousJoin = $this->getPreviousJoin()) {
488
            $join->setPreviousJoin($previousJoin);
489
        }
490
491
        // add the ModelJoin to the current object
492
        if ($relationAlias) {
493
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
494
            $this->addJoinObject($join, $relationAlias);
495
        } else {
496
            $this->addJoinObject($join, 'Connection');
497
        }
498
499
        return $this;
500
    }
501
502
    /**
503
     * Use the Connection relation Connection object
@@ 551-573 (lines=23) @@
548
     *
549
     * @return $this|ChildUserQuery The current query, for fluid interface
550
     */
551
    public function joinSubscription($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
552
    {
553
        $tableMap = $this->getTableMap();
554
        $relationMap = $tableMap->getRelation('Subscription');
555
556
        // create a ModelJoin object for this join
557
        $join = new ModelJoin();
558
        $join->setJoinType($joinType);
559
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
560
        if ($previousJoin = $this->getPreviousJoin()) {
561
            $join->setPreviousJoin($previousJoin);
562
        }
563
564
        // add the ModelJoin to the current object
565
        if ($relationAlias) {
566
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
567
            $this->addJoinObject($join, $relationAlias);
568
        } else {
569
            $this->addJoinObject($join, 'Subscription');
570
        }
571
572
        return $this;
573
    }
574
575
    /**
576
     * Use the Subscription relation Subscription object