01: package org.hibernate.loader.custom;
02:
03: import org.hibernate.LockMode;
04: import org.hibernate.HibernateException;
05:
06: /**
07: * Represents some non-scalar (entity/collection) return within the query result.
08: *
09: * @author Steve Ebersole
10: */
11: public abstract class NonScalarReturn implements Return {
12: private final String alias;
13: private final LockMode lockMode;
14:
15: public NonScalarReturn(String alias, LockMode lockMode) {
16: this .alias = alias;
17: if (alias == null) {
18: throw new HibernateException("alias must be specified");
19: }
20: this .lockMode = lockMode;
21: }
22:
23: public String getAlias() {
24: return alias;
25: }
26:
27: public LockMode getLockMode() {
28: return lockMode;
29: }
30: }
|