01: // $Id: NativeSQLQueryJoinReturn.java 7232 2005-06-19 17:16:40 -0500 (Sun, 19 Jun 2005) maxcsaucdk $
02: package org.hibernate.engine.query.sql;
03:
04: import java.util.Map;
05:
06: import org.hibernate.LockMode;
07:
08: /**
09: * Represents a return defined as part of a native sql query which
10: * names a fetched role.
11: *
12: * @author Steve Ebersole
13: */
14: public class NativeSQLQueryJoinReturn extends
15: NativeSQLQueryNonScalarReturn {
16: private String ownerAlias;
17: private String ownerProperty;
18:
19: /**
20: * Construct a return descriptor representing some form of fetch.
21: *
22: * @param alias The result alias
23: * @param ownerAlias The owner's result alias
24: * @param ownerProperty The owner's property representing the thing to be fetched
25: * @param propertyResults Any user-supplied column->property mappings
26: * @param lockMode The lock mode to apply
27: */
28: public NativeSQLQueryJoinReturn(String alias, String ownerAlias,
29: String ownerProperty, Map propertyResults, LockMode lockMode) {
30: super (alias, propertyResults, lockMode);
31: this .ownerAlias = ownerAlias;
32: this .ownerProperty = ownerProperty;
33: }
34:
35: /**
36: * Retrieve the alias of the owner of this fetched association.
37: *
38: * @return The owner's alias.
39: */
40: public String getOwnerAlias() {
41: return ownerAlias;
42: }
43:
44: /**
45: * Retrieve the property name (relative to the owner) which maps to
46: * the association to be fetched.
47: *
48: * @return The property name.
49: */
50: public String getOwnerProperty() {
51: return ownerProperty;
52: }
53: }
|