Author: steve.ebersole(a)jboss.com
Date: 2010-01-07 15:49:36 -0500 (Thu, 07 Jan 2010)
New Revision: 18445
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/AbstractNode.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaQueryImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaSubqueryImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/CoalesceExpression.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ExpressionImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SearchedCaseExpression.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SimpleCaseExpression.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/AbstractFromImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/AbstractPathImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/CollectionAttributeJoin.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/ListAttributeJoin.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/MapAttributeJoin.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/RootImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/SetAttributeJoin.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/SingularAttributeJoin.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/InPredicate.java
Log:
HHH-4758 - Rename org.hibernate.ejb.criteria.AbstractNode#queryBuilder to
#criteriaBuilder
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/AbstractNode.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/AbstractNode.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/AbstractNode.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -43,7 +43,7 @@
*
* @return The underlying {@link CriteriaBuilderImpl} instance.
*/
- protected CriteriaBuilderImpl queryBuilder() {
+ protected CriteriaBuilderImpl criteriaBuilder() {
return criteriaBuilder;
}
}
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaQueryImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaQueryImpl.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaQueryImpl.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -124,10 +124,10 @@
final Selection<? extends T> selection;
if ( Tuple.class.isAssignableFrom( getResultType() ) ) {
- selection = ( Selection<? extends T> ) queryBuilder().tuple( selections );
+ selection = ( Selection<? extends T> ) criteriaBuilder().tuple( selections );
}
else if ( getResultType().isArray() ) {
- selection = ( Selection<? extends T> ) queryBuilder().array(
+ selection = ( Selection<? extends T> ) criteriaBuilder().array(
( Class<? extends Object[]> ) getResultType(),
selections
);
@@ -144,12 +144,12 @@
break;
}
default: {
- selection = ( Selection<? extends T> ) queryBuilder().array( selections );
+ selection = ( Selection<? extends T> ) criteriaBuilder().array( selections );
}
}
}
else {
- selection = queryBuilder().construct( getResultType(), selections );
+ selection = criteriaBuilder().construct( getResultType(), selections );
}
applySelection( selection );
return this;
@@ -193,7 +193,7 @@
* {@inheritDoc}
*/
public CriteriaQuery<T> where(Expression<Boolean> expression) {
- queryStructure.setRestriction( queryBuilder().wrap( expression ) );
+ queryStructure.setRestriction( criteriaBuilder().wrap( expression ) );
return this;
}
@@ -202,7 +202,7 @@
*/
public CriteriaQuery<T> where(Predicate... predicates) {
// TODO : assuming this should be a conjuntion, but the spec does not say
specifically...
- queryStructure.setRestriction( queryBuilder().and( predicates ) );
+ queryStructure.setRestriction( criteriaBuilder().and( predicates ) );
return this;
}
@@ -240,7 +240,7 @@
* {@inheritDoc}
*/
public CriteriaQuery<T> having(Expression<Boolean> expression) {
- queryStructure.setHaving( queryBuilder().wrap( expression ) );
+ queryStructure.setHaving( criteriaBuilder().wrap( expression ) );
return this;
}
@@ -248,7 +248,7 @@
* {@inheritDoc}
*/
public CriteriaQuery<T> having(Predicate... predicates) {
- queryStructure.setHaving( queryBuilder().and( predicates ) );
+ queryStructure.setHaving( criteriaBuilder().and( predicates ) );
return this;
}
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaSubqueryImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaSubqueryImpl.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaSubqueryImpl.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -167,7 +167,7 @@
* {@inheritDoc}
*/
public Subquery<T> where(Expression<Boolean> expression) {
- queryStructure.setRestriction( queryBuilder().wrap( expression ) );
+ queryStructure.setRestriction( criteriaBuilder().wrap( expression ) );
return this;
}
@@ -176,7 +176,7 @@
*/
public Subquery<T> where(Predicate... predicates) {
// TODO : assuming this should be a conjuntion, but the spec does not say
specifically...
- queryStructure.setRestriction( queryBuilder().and( predicates ) );
+ queryStructure.setRestriction( criteriaBuilder().and( predicates ) );
return this;
}
@@ -218,7 +218,7 @@
* {@inheritDoc}
*/
public Subquery<T> having(Expression<Boolean> expression) {
- queryStructure.setHaving( queryBuilder().wrap( expression ) );
+ queryStructure.setHaving( criteriaBuilder().wrap( expression ) );
return this;
}
@@ -226,7 +226,7 @@
* {@inheritDoc}
*/
public Subquery<T> having(Predicate... predicates) {
- queryStructure.setHaving( queryBuilder().and( predicates ) );
+ queryStructure.setHaving( criteriaBuilder().and( predicates ) );
return this;
}
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/CoalesceExpression.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/CoalesceExpression.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/CoalesceExpression.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -60,7 +60,7 @@
}
public Coalesce<T> value(T value) {
- return value( new LiteralExpression<T>( queryBuilder(), value ) );
+ return value( new LiteralExpression<T>( criteriaBuilder(), value ) );
}
@SuppressWarnings({ "unchecked" })
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ExpressionImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ExpressionImpl.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ExpressionImpl.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -53,49 +53,49 @@
public <X> Expression<X> as(Class<X> type) {
return type.equals( getJavaType() )
? (Expression<X>) this
- : new CastFunction<X, T>( queryBuilder(), type, this );
+ : new CastFunction<X, T>( criteriaBuilder(), type, this );
}
/**
* {@inheritDoc}
*/
public Predicate isNull() {
- return queryBuilder().isNull( this );
+ return criteriaBuilder().isNull( this );
}
/**
* {@inheritDoc}
*/
public Predicate isNotNull() {
- return queryBuilder().isNotNull( this );
+ return criteriaBuilder().isNotNull( this );
}
/**
* {@inheritDoc}
*/
public Predicate in(Object... values) {
- return queryBuilder().in( this, values );
+ return criteriaBuilder().in( this, values );
}
/**
* {@inheritDoc}
*/
public Predicate in(Expression<?>... values) {
- return queryBuilder().in( this, values );
+ return criteriaBuilder().in( this, values );
}
/**
* {@inheritDoc}
*/
public Predicate in(Collection<?> values) {
- return queryBuilder().in( this, values );
+ return criteriaBuilder().in( this, values );
}
/**
* {@inheritDoc}
*/
public Predicate in(Expression<Collection<?>> values) {
- return queryBuilder().in( this, values );
+ return criteriaBuilder().in( this, values );
}
/**
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SearchedCaseExpression.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SearchedCaseExpression.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SearchedCaseExpression.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -86,7 +86,7 @@
final Class<R> type = result != null
? (Class<R>) result.getClass()
: getJavaType();
- return new LiteralExpression<R>( queryBuilder(), type, result );
+ return new LiteralExpression<R>( criteriaBuilder(), type, result );
}
public Case<R> when(Expression<Boolean> condition, Expression<? extends
R> result) {
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SimpleCaseExpression.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SimpleCaseExpression.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SimpleCaseExpression.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -94,7 +94,7 @@
final Class<R> type = result != null
? (Class<R>) result.getClass()
: getJavaType();
- return new LiteralExpression<R>( queryBuilder(), type, result );
+ return new LiteralExpression<R>( criteriaBuilder(), type, result );
}
public SimpleCase<C, R> when(C condition, Expression<? extends R> result) {
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/AbstractFromImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/AbstractFromImpl.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/AbstractFromImpl.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -236,7 +236,7 @@
final Class<Y> attributeType = attribute.getBindableJavaType();
return new SingularAttributeJoin<X,Y>(
- queryBuilder(),
+ criteriaBuilder(),
attributeType,
this,
attribute,
@@ -272,7 +272,7 @@
final Class<Y> attributeType = collection.getBindableJavaType();
return new CollectionAttributeJoin<X, Y>(
- queryBuilder(),
+ criteriaBuilder(),
attributeType,
this,
collection,
@@ -308,7 +308,7 @@
// TODO : runtime check that the attribute in fact belongs to this From's
model/bindable
final Class<Y> attributeType = set.getBindableJavaType();
- return new SetAttributeJoin<X,Y>( queryBuilder(), attributeType, this, set, jt
);
+ return new SetAttributeJoin<X,Y>( criteriaBuilder(), attributeType, this, set, jt
);
}
/**
@@ -339,7 +339,7 @@
// TODO : runtime check that the attribute in fact belongs to this From's
model/bindable
final Class<Y> attributeType = list.getBindableJavaType();
- return new ListAttributeJoin<X,Y>( queryBuilder(), attributeType, this, list, jt
);
+ return new ListAttributeJoin<X,Y>( criteriaBuilder(), attributeType, this, list,
jt );
}
/**
@@ -370,7 +370,7 @@
// TODO : runtime check that the attribute in fact belongs to this From's
model/bindable
final Class<V> attributeType = map.getBindableJavaType();
- return new MapAttributeJoin<X, K, V>( queryBuilder(), attributeType, this, map,
jt );
+ return new MapAttributeJoin<X, K, V>( criteriaBuilder(), attributeType, this,
map, jt );
}
/**
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/AbstractPathImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/AbstractPathImpl.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/AbstractPathImpl.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -69,7 +69,7 @@
PathSource pathSource) {
super( criteriaBuilder, javaType );
this.pathSource = pathSource;
- this.typeExpression = new PathTypeExpression( queryBuilder(), getJavaType() );
+ this.typeExpression = new PathTypeExpression( criteriaBuilder(), getJavaType() );
}
public PathSource getPathSource() {
@@ -137,7 +137,7 @@
SingularAttributePath<Y> path = (SingularAttributePath<Y>)
resolveCachedAttributePath( attribute.getName() );
if ( path == null ) {
- path = new SingularAttributePath<Y>( queryBuilder(), attribute.getJavaType(),
this, attribute );
+ path = new SingularAttributePath<Y>( criteriaBuilder(), attribute.getJavaType(),
this, attribute );
registerAttributePath( attribute.getName(), path );
}
return path;
@@ -154,7 +154,7 @@
PluralAttributePath<C> path = (PluralAttributePath<C>)
resolveCachedAttributePath( attribute.getName() );
if ( path == null ) {
- path = new PluralAttributePath<C>( queryBuilder(), this, attribute );
+ path = new PluralAttributePath<C>( criteriaBuilder(), this, attribute );
registerAttributePath( attribute.getName(), path );
}
return path;
@@ -171,7 +171,7 @@
PluralAttributePath path = (PluralAttributePath) resolveCachedAttributePath(
attribute.getName() );
if ( path == null ) {
- path = new PluralAttributePath( queryBuilder(), this, attribute );
+ path = new PluralAttributePath( criteriaBuilder(), this, attribute );
registerAttributePath( attribute.getName(), path );
}
return path;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/CollectionAttributeJoin.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/CollectionAttributeJoin.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/CollectionAttributeJoin.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -70,7 +70,7 @@
@Override
protected FromImplementor<O, E> createCorrelationDelegate() {
return new CollectionAttributeJoin<O,E>(
- queryBuilder(),
+ criteriaBuilder(),
getJavaType(),
(PathImplementor<O>) getParentPath(),
getAttribute(),
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/ListAttributeJoin.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/ListAttributeJoin.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/ListAttributeJoin.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -60,7 +60,7 @@
* {@inheritDoc}
*/
public Expression<Integer> index() {
- return new ListIndexExpression( queryBuilder(), this, getAttribute() );
+ return new ListIndexExpression( criteriaBuilder(), this, getAttribute() );
}
@Override
@@ -81,7 +81,7 @@
@Override
protected FromImplementor<O, E> createCorrelationDelegate() {
return new ListAttributeJoin<O,E>(
- queryBuilder(),
+ criteriaBuilder(),
getJavaType(),
(PathImplementor<O>) getParentPath(),
getAttribute(),
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/MapAttributeJoin.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/MapAttributeJoin.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/MapAttributeJoin.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -75,7 +75,7 @@
@Override
protected FromImplementor<O, V> createCorrelationDelegate() {
return new MapAttributeJoin<O,K,V>(
- queryBuilder(),
+ criteriaBuilder(),
getJavaType(),
(PathImplementor<O>) getParentPath(),
getAttribute(),
@@ -96,7 +96,7 @@
*/
@SuppressWarnings({ "unchecked" })
public Expression<Map.Entry<K, V>> entry() {
- return new MapEntryExpression( queryBuilder(), Map.Entry.class, this, getAttribute()
);
+ return new MapEntryExpression( criteriaBuilder(), Map.Entry.class, this, getAttribute()
);
}
/**
@@ -105,13 +105,13 @@
@SuppressWarnings({ "unchecked" })
public Path<K> key() {
final MapKeyHelpers.MapKeySource<K,V> mapKeySource = new
MapKeyHelpers.MapKeySource<K,V>(
- queryBuilder(),
+ criteriaBuilder(),
getAttribute().getJavaType(),
this,
getAttribute()
);
- final MapKeyHelpers.MapKeyAttribute mapKeyAttribute = new
MapKeyHelpers.MapKeyAttribute( queryBuilder(), getAttribute() );
- return new MapKeyHelpers.MapKeyPath( queryBuilder(), mapKeySource, mapKeyAttribute );
+ final MapKeyHelpers.MapKeyAttribute mapKeyAttribute = new
MapKeyHelpers.MapKeyAttribute( criteriaBuilder(), getAttribute() );
+ return new MapKeyHelpers.MapKeyPath( criteriaBuilder(), mapKeySource, mapKeyAttribute
);
}
}
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/RootImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/RootImpl.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/RootImpl.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -57,7 +57,7 @@
@Override
protected FromImplementor<X, X> createCorrelationDelegate() {
- return new RootImpl<X>( queryBuilder(), getEntityType() );
+ return new RootImpl<X>( criteriaBuilder(), getEntityType() );
}
@Override
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/SetAttributeJoin.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/SetAttributeJoin.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/SetAttributeJoin.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -72,7 +72,7 @@
@Override
protected FromImplementor<O, E> createCorrelationDelegate() {
return new SetAttributeJoin<O,E>(
- queryBuilder(),
+ criteriaBuilder(),
getJavaType(),
(PathImplementor<O>) getParentPath(),
getAttribute(),
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/SingularAttributeJoin.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/SingularAttributeJoin.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/path/SingularAttributeJoin.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -69,7 +69,7 @@
@Override
protected FromImplementor<Z, X> createCorrelationDelegate() {
return new SingularAttributeJoin<Z,X>(
- queryBuilder(),
+ criteriaBuilder(),
getJavaType(),
getPathSource(),
getAttribute(),
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/InPredicate.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/InPredicate.java 2010-01-07
20:41:54 UTC (rev 18444)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/InPredicate.java 2010-01-07
20:49:36 UTC (rev 18445)
@@ -143,7 +143,7 @@
}
public InPredicate<T> value(T value) {
- return value( new LiteralExpression<T>( queryBuilder(), value ) );
+ return value( new LiteralExpression<T>( criteriaBuilder(), value ) );
}
public InPredicate<T> value(Expression<? extends T> value) {