Author: cbredesen
Date: 2008-08-15 17:03:38 -0400 (Fri, 15 Aug 2008)
New Revision: 15090
Modified:
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/DetachedCriteria.java
Log:
JBPAPP-1083 - HHH-1696 - Add outer join support for aliases on DetachedCriteria
Modified:
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/DetachedCriteria.java
===================================================================
---
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/DetachedCriteria.java 2008-08-15
15:55:04 UTC (rev 15089)
+++
core/branches/Branch_3_2_4_SP1_CP/src/org/hibernate/criterion/DetachedCriteria.java 2008-08-15
21:03:38 UTC (rev 15090)
@@ -6,10 +6,10 @@
import org.hibernate.Criteria;
import org.hibernate.FetchMode;
import org.hibernate.HibernateException;
+import org.hibernate.LockMode;
import org.hibernate.Session;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.impl.CriteriaImpl;
-import org.hibernate.impl.SessionImpl;
import org.hibernate.transform.ResultTransformer;
/**
@@ -87,7 +87,7 @@
public DetachedCriteria createCriteria(String associationPath, String alias)
throws HibernateException {
- return new DetachedCriteria( impl, criteria.createCriteria(associationPath) );
+ return new DetachedCriteria( impl, criteria.createCriteria(associationPath, alias) );
}
public DetachedCriteria createCriteria(String associationPath)
@@ -122,4 +122,32 @@
CriteriaImpl getCriteriaImpl() {
return impl;
}
+
+ public DetachedCriteria createAlias(String associationPath, String alias, int
joinType) throws HibernateException {
+ criteria.createAlias(associationPath, alias, joinType);
+ return this;
+ }
+
+ public DetachedCriteria createCriteria(String associationPath, int joinType) throws
HibernateException {
+ return new DetachedCriteria(impl, criteria.createCriteria(associationPath,
joinType));
+ }
+
+ public DetachedCriteria createCriteria(String associationPath, String alias, int
joinType) throws HibernateException {
+ return new DetachedCriteria(impl, criteria.createCriteria(associationPath, alias,
joinType));
+ }
+
+ public DetachedCriteria setComment(String comment) {
+ criteria.setComment(comment);
+ return this;
+ }
+
+ public DetachedCriteria setLockMode(LockMode lockMode) {
+ criteria.setLockMode(lockMode);
+ return this;
+ }
+
+ public DetachedCriteria setLockMode(String alias, LockMode lockMode) {
+ criteria.setLockMode(alias, lockMode);
+ return this;
+ }
}