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

org.hibernate.hql.internal.ast.tree.MapValueNode Maven / Gradle / Ivy

The newest version!
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.hql.internal.ast.tree;

import org.hibernate.persister.collection.QueryableCollection;
import org.hibernate.type.Type;

/**
 * Tree node representing reference to the value of a Map association.
 *
 * @author Steve Ebersole
 */
public class MapValueNode extends AbstractMapComponentNode {
	@Override
	protected String expressionDescription() {
		return "value(*)";
	}

	@Override
	protected String[] resolveColumns(QueryableCollection collectionPersister) {
		final FromElement fromElement = getFromElement();
		return fromElement.toColumns(
				fromElement.getCollectionTableAlias(),
				"elements", // the JPA VALUE "qualifier" is the same concept as the HQL ELEMENTS function/property
				getWalker().isInSelect()
		);
	}

	@Override
	protected Type resolveType(QueryableCollection collectionPersister) {
		return collectionPersister.getElementType();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy