01: //$Id: PropertySubqueryExpression.java 5685 2005-02-12 07:19:50Z steveebersole $
02: package org.hibernate.criterion;
03:
04: import org.hibernate.Criteria;
05:
06: /**
07: * A comparison between a property value in the outer query and the
08: * result of a subquery
09: * @author Gavin King
10: */
11: public class PropertySubqueryExpression extends SubqueryExpression {
12: private String propertyName;
13:
14: protected PropertySubqueryExpression(String propertyName,
15: String op, String quantifier, DetachedCriteria dc) {
16: super (op, quantifier, dc);
17: this .propertyName = propertyName;
18: }
19:
20: protected String toLeftSqlString(Criteria criteria,
21: CriteriaQuery criteriaQuery) {
22: return criteriaQuery.getColumn(criteria, propertyName);
23: }
24:
25: }
|