Right joins this entity to the previous entity given to the builder.

entityClass becomes the current entity.
196488
public SelectBuilder rightJoin(Class<?> entityClass) {
    currentTable = rootTable.rightJoin(entityClass, currentTable.entityClass);
    return this;
  }
1298380
public function rightJoin($table, callable $callable)
    {
        $table = $this->getPrefix().$table;

        if (is_null($this->join)) {
            $this->join = 'right join `'.$table.'`';

            if (is_callable($callable)) {
                $callable($this);
            }

            return $this;
        }

        if (!preg_match('/^(inner|left)\sjoin\s.*/', $this->join)) {
            $this->join .= ', `'.$table.'`';

            if (is_callable($callable)) {
                $callable($this);
            }

            return $this;
        }

        throw new QueryBuilderException(
            'The inner join clause is already initialized.',
            E_ERROR
        );
    }
837144
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = {
        CascadeType.ALL
    })
    @JoinColumn(name = "GENERATED_ENTITY")
    public org.openprovenance.prov.model.QualifiedName getGeneratedEntity() {
        return generatedEntity;
    }
436409
private void join(ParserRuleContext ctx, Class<? extends Join> type)
  {
    QueryNode left = relationChain.get(relationIdx);
    QueryNode right = relationChain.get(relationIdx+1);

    try
    {
      Constructor<? extends Join> c = type.getConstructor(QueryNode.class);
      Join newJoin = c.newInstance(right);
      left.addOutgoingJoin(addParsedLocation(ctx, newJoin));
      
    }
    catch (NoSuchMethodException ex)
    {
      log.error(null, ex);
    }
    catch (InstantiationException ex)
    {
      log.error(null, ex);
    }
    catch (IllegalAccessException ex)
    {
      log.error(null, ex);
    }
    catch (InvocationTargetException ex)
    {
      log.error(null, ex);
    }

  }
1356348
def _clone(self):
        
        clone = self.__class__(self._entity_cls, criteria=self._criteria,
                               offset=self._offset, limit=self._limit,
                               order_by=self._order_by)
        return clone
520113
private void onRelation(final Object entity, final Map<String, Object> relationsMap, final EntityMetadata m,
            final PersistenceDelegator pd, Relation relation, ForeignKey relationType, boolean lazilyloaded,
            Map<Object, Object> relationStack)
    {

        FetchType fetchType = relation.getFetchType();

        if (!lazilyloaded && fetchType.equals(FetchType.LAZY))
        {
            final Object entityId = PropertyAccessorHelper.getId(entity, m);
            getAssociationBuilder().setProxyRelationObject(entity, relationsMap, m, pd, entityId, relation);
        }
        else
        {
            if (relation.getType().equals(ForeignKey.MANY_TO_MANY))
            {
                // First, Save this entity to persistence cache
                Field f = relation.getProperty();
                Object object = PropertyAccessorHelper.getObject(entity, f);
                final Object entityId = PropertyAccessorHelper.getId(entity, m);
                PersistenceCacheManager.addEntityToPersistenceCache(entity, pd, entityId);
                getAssociationBuilder().populateRelationForM2M(entity, m, pd, relation, object, relationsMap);
            }
            else
            {
                onRelation(entity, relationsMap, relation, m, pd, lazilyloaded, relationStack);
            }
        }
    }
872504
public SelectBuilder from(Class<?> entityClass) {
    if (rootTable == null) {
      rootTable = new TableInfo(entityClass, dialect);
      currentTable = rootTable;
    } else {
      join(entityClass);
    }
    tables.add(currentTable);

    return this;
  }
631816
public QueryBuilder<T, ID> join(QueryBuilder<?, ?> joinedQueryBuilder, JoinType type, JoinWhereOperation operation)
			throws SQLException {
		addJoinInfo(type, null, null, joinedQueryBuilder, operation);
		return this;
	}
416031
public function moveBefore($entity)
    {
        /* @var \Eloquent $this */
        $this->getConnection()->beginTransaction();

        if ($this->position > $entity->position) {
            $this->getConnection()->table($this->getTable())->where('position', '>=', $entity->position)->where(
                'position',
                '<',
                $this->position
            )->increment('position');
            $this->position = $entity->position;

            $entity->position = $entity->position + 1;
        } else {
            if ($this->position < $entity->position) {
                $this->getConnection()->table($this->getTable())->where('position', '<', $entity->position)->where(
                    'position',
                    '>',
                    $this->position
                )->decrement('position');
                $this->position = $entity->position - 1;
            }
        }

        $this->{ $this->getSaveMethod() }();

        $this->getConnection()->commit();
    }
134437
public QueryBuilder<T, ID> joinOr(QueryBuilder<?, ?> joinedQueryBuilder) throws SQLException {
		addJoinInfo(JoinType.INNER, null, null, joinedQueryBuilder, JoinWhereOperation.OR);
		return this;
	}
1276170
@Override
	public void update(Object entity) {
		if (entity == null) {
			throw new IllegalArgumentException("'entity' must not be [" + entity + "]");
		}
		
		if (operation != Log.Operation.GET) {
			throw new IllegalStateException("Log [" + operation + "] -> ["
					+ Log.Operation.UPDATE
					+ "] is not allowed: previous operation must be ["
					+ Log.Operation.GET + "]");
		}
		
		operation = Log.Operation.UPDATE;
	}
1281469
public static <E> JpaRepositoryConfig.Builder<E> builder(Class<E> entityClass) {
        JpaRepositoryConfig.Builder<E> builder = new JpaRepositoryConfig.Builder<>();
        builder.entityClass = entityClass;
        builder.resourceClass = entityClass;
        return builder;
    }
115463
def add_entity(entity_name, entity_options, activity_klass)
      entity_name = entity_name.to_sym

      if @entity_classes[entity_name] && (@entity_classes[entity_name].name != entity_options[:class].name)
        # otherwise this would break timeline entries deletion mecanism
        raise "Entity name #{entity_name} already used with class #{@entity_classes[entity_name]}, can't redefine it with class #{entity_options[:class]}"
      end

      # class for entity
      @entity_classes[entity_name] = entity_options[:class]

      # entities for activity
      @activity_entities[activity_klass] ||= [ ]
      @activity_entities[activity_klass] << entity_name

      # entities
      @entities ||= { }
      @entities[entity_name] ||= { }

      if !@entities[entity_name][activity_klass].blank?
        raise "Entity name #{entity_name} already used for activity: #{activity_klass}"
      end

      @entities[entity_name][activity_klass] = entity_options
    end
388674
private ClassRecord getClassRecord(EntityIdValue entityIdValue) {
		if (!this.classRecords.containsKey(entityIdValue)) {
			ClassRecord classRecord = new ClassRecord();
			this.classRecords.put(entityIdValue, classRecord);
			return classRecord;
		} else {
			return this.classRecords.get(entityIdValue);
		}
	}
1254665
public function getRightRecord(Entity $rightEntity, $foreignKey, $primaryValue)
    {
        if (!$primaryValue) {
            return null;
        }

        if ($this->inheritRightRepository) {
            $rightEntity->setRepository($this->getLeftEntity()->getRepository());
        }
        $entity = $rightEntity->where($foreignKey, $primaryValue);

        /**
         * Add conditions applied on query.
         */
        foreach ($this->getQuery()->getWhere()->getChildren() as $condition) {
            $entity->where(
                function(Parenthesis $parenthesis) use ($condition) {
                    $parenthesis->push($condition);
                }
            );
        }

        foreach ($this->getQuery()->getBinds('where') as $bind) {
            $entity->getQuery()->bind($bind, 'where');
        }
        
        return (new GetRecords($rightEntity))->executeOne();
    }
1147522
@Override
	public Object next() {
		assertGeneratorStarted();

		if (!hasNext()) {
			throw new NoSuchElementException("No more object to generate");
		}

		Object object = currentFixtureGenerator.next();
		logger.debug("Generated {}", object);
		extractorDelegate.extractEntity(object);

		return object;
	}
44365
public void toLeftJoin() {
        assert((m_leftNode != null && m_rightNode != null) || (m_leftNode == null && m_rightNode == null));
        if (m_leftNode == null && m_rightNode == null) {
            // End of recursion
            return;
        }
        // recursive calls
        if (m_leftNode instanceof BranchNode) {
            ((BranchNode)m_leftNode).toLeftJoin();
        }
        if (m_rightNode instanceof BranchNode) {
            ((BranchNode)m_rightNode).toLeftJoin();
        }

        // Swap own children
        if (m_joinType == JoinType.RIGHT) {
            JoinNode node = m_rightNode;
            m_rightNode = m_leftNode;
            m_leftNode = node;
            m_joinType = JoinType.LEFT;
        }
    }