org.hibernate.engine.query.sql
Class NativeSQLQueryRootReturn

java.lang.Object
  extended by org.hibernate.engine.query.sql.NativeSQLQueryNonScalarReturn
      extended by org.hibernate.engine.query.sql.NativeSQLQueryRootReturn
All Implemented Interfaces:
Serializable, NativeSQLQueryReturn

public class NativeSQLQueryRootReturn
extends NativeSQLQueryNonScalarReturn

Represents a return defined as part of a native sql query which names a "root" entity. A root entity means it is explicitly a "column" in the result, as opposed to a fetched relationship or role.

Author:
Steve Ebersole
See Also:
Serialized Form

Constructor Summary
NativeSQLQueryRootReturn(String alias, String entityName, LockMode lockMode)
          Construct a return representing an entity returned at the root of the result.
NativeSQLQueryRootReturn(String alias, String entityName, Map propertyResults, LockMode lockMode)
           
 
Method Summary
 boolean equals(Object o)
           
 String getReturnEntityName()
          The name of the entity to be returned.
 int hashCode()
           
 
Methods inherited from class org.hibernate.engine.query.sql.NativeSQLQueryNonScalarReturn
getAlias, getLockMode, getPropertyResultsMap
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeSQLQueryRootReturn

public NativeSQLQueryRootReturn(String alias,
                                String entityName,
                                LockMode lockMode)
Construct a return representing an entity returned at the root of the result.

Parameters:
alias - The result alias
entityName - The entity name.
lockMode - The lock mode to apply

NativeSQLQueryRootReturn

public NativeSQLQueryRootReturn(String alias,
                                String entityName,
                                Map propertyResults,
                                LockMode lockMode)
Parameters:
alias - The result alias
entityName - The entity name.
propertyResults - Any user-supplied column->property mappings
lockMode - The lock mode to apply
Method Detail

getReturnEntityName

public String getReturnEntityName()
The name of the entity to be returned.

Returns:
The entity name

equals

public boolean equals(Object o)
Overrides:
equals in class NativeSQLQueryNonScalarReturn

hashCode

public int hashCode()
Overrides:
hashCode in class NativeSQLQueryNonScalarReturn


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.