KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > criterion > PropertySubqueryExpression


1 //$Id: PropertySubqueryExpression.java,v 1.3 2005/02/12 07:19:14 steveebersole Exp $
2
package org.hibernate.criterion;
3
4 import org.hibernate.Criteria;
5
6 /**
7  * A comparison between a property value in the outer query and the
8  * result of a subquery
9  * @author Gavin King
10  */

11 public class PropertySubqueryExpression extends SubqueryExpression {
12     private String JavaDoc propertyName;
13
14     protected PropertySubqueryExpression(String JavaDoc propertyName, String JavaDoc op, String JavaDoc quantifier, DetachedCriteria dc) {
15         super(op, quantifier, dc);
16         this.propertyName = propertyName;
17     }
18
19     protected String JavaDoc toLeftSqlString(Criteria criteria, CriteriaQuery criteriaQuery) {
20         return criteriaQuery.getColumn(criteria, propertyName);
21     }
22
23 }
24
Popular Tags