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

com.sap.cds.ql.cqn.CqnSelectListValue Maven / Gradle / Ivy

There is a newer version: 3.6.1
Show newest version
/************************************************************************
 * © 2020-2023 SAP SE or an SAP affiliate company. All rights reserved. *
 ************************************************************************/
package com.sap.cds.ql.cqn;

import java.util.Optional;
import java.util.stream.Stream;

public interface CqnSelectListValue extends CqnSelectListItem {

	CqnValue value();

	/**
	 * Returns display name of this select list value. It is the name of the element
	 * of the underlying entity or the alias.
	 *
	 * @return the display name as a string
	 */
	String displayName();

	Optional alias();

	@Override
	default boolean isValue() {
		return true;
	}

	@Override
	default CqnSelectListValue asValue() {
		return this;
	}

	@Override
	default Stream ofValue() {
		return Stream.of(this);
	}

	@Override
	default boolean isRef() {
		return value().isRef();
	}

	@Override
	default CqnElementRef asRef() {
		return value().asRef();
	}

	@Override
	default Stream ofRef() {
		return value().ofRef();
	}

	@Override
	default void accept(CqnVisitor visitor) {
		value().accept(visitor);

		visitor.visit(this);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy