All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cds.impl.qat.QatAssociationNode Maven / Gradle / Ivy

There is a newer version: 3.6.1
Show newest version
/*******************************************************************
 * © 2019 SAP SE or an SAP affiliate company. All rights reserved. *
 *******************************************************************/
package com.sap.cds.impl.qat;

import java.util.Optional;

import com.sap.cds.ql.cqn.CqnPredicate;
import com.sap.cds.reflect.CdsEntity;

public final class QatAssociationNode extends QatEntityNode {

	private final QatAssociation association;

	public QatAssociationNode(QatNode parent, QatAssociation association, Optional filter,
			boolean inSource) {
		super(parent, association.targetEntity(), filter, inSource);
		this.association = association;
	}

	public QatAssociation association() {
		return association;
	}

	public CdsEntity entity() {
		return association.targetEntity();
	}

	@Override
	public String name() {
		return association().name();
	}

	@Override
	public void accept(QatVisitor visitor) {
		visitor.visit(this);
	}

	@Override
	public String toString() {
		return alias() + " " + association.name() + " " + children();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy