sqlquerycollectionreturn.java

来自「hibernate-3.0.5 中文文档」· Java 代码 · 共 45 行

JAVA
45
字号
// $Id: SQLQueryCollectionReturn.java,v 1.4 2005/05/17 17:11:09 maxcsaucdk Exp $package org.hibernate.loader.custom;import java.util.Map;import org.hibernate.LockMode;/** * Represents a return defined as part of a native sql query which * names a collection role in the form {classname}.{collectionrole}; it * is used in defining a custom sql query for loading an entity's * collection in non-fetching scenarios (i.e., loading the collection * itself as the "root" of the result). * * @author Steve */public class SQLQueryCollectionReturn extends SQLQueryReturn {	private String ownerEntityName;	private String ownerProperty;	public SQLQueryCollectionReturn(String alias, String ownerClass, String ownerProperty, Map propertyResults, LockMode lockMode) {		super(alias, propertyResults, true, lockMode);		this.ownerEntityName = ownerClass;		this.ownerProperty = ownerProperty;	}	/**	 * Returns the class owning the collection.	 *	 * @return The class owning the collection.	 */	public String getOwnerEntityName() {		return ownerEntityName;	}	/**	 * Returns the name of the property representing the collection from the {@link #getOwnerEntityName}.	 *	 * @return The name of the property representing the collection on the owner class.	 */	public String getOwnerProperty() {		return ownerProperty;	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?