01: package org.hibernate.loader.custom;
02:
03: import org.hibernate.LockMode;
04:
05: /**
06: * Represents a return which names a fetched association.
07: *
08: * @author Steve Ebersole
09: */
10: public abstract class FetchReturn extends NonScalarReturn {
11: private final NonScalarReturn owner;
12: private final String ownerProperty;
13:
14: /**
15: * Creates a return descriptor for an association fetch.
16: *
17: * @param owner The return descriptor for the owner of the fetch
18: * @param ownerProperty The name of the property represernting the association being fetched
19: * @param alias The alias for the fetch
20: * @param lockMode The lock mode to apply to the fetched association.
21: */
22: public FetchReturn(NonScalarReturn owner, String ownerProperty,
23: String alias, LockMode lockMode) {
24: super (alias, lockMode);
25: this .owner = owner;
26: this .ownerProperty = ownerProperty;
27: }
28:
29: /**
30: * Retrieves the return descriptor for the owner of this fetch.
31: *
32: * @return The owner
33: */
34: public NonScalarReturn getOwner() {
35: return owner;
36: }
37:
38: /**
39: * The name of the property on the owner which represents this association.
40: *
41: * @return The property name.
42: */
43: public String getOwnerProperty() {
44: return ownerProperty;
45: }
46: }
|