Author: steve.ebersole(a)jboss.com
Date: 2010-01-04 14:00:01 -0500 (Mon, 04 Jan 2010)
New Revision: 18400
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/AbstractBasicPluralJoin.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/AbstractNode.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicCollectionJoinImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicListJoinImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicMapJoinImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicSetJoinImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CollectionJoinImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaQueryCompiler.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/FromImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/JoinImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/ListJoinImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/MapJoinImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/MapKeyHelpers.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/OrderImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/PathImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/QueryStructure.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/RootImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/SetJoinImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/ValueHandlerFactory.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/AbstractTupleElement.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/BinaryArithmeticOperation.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/CollectionExpression.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/CompoundSelectionImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ConcatExpression.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/EntityTypeExpression.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/ListIndexExpression.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/LiteralExpression.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/NullifExpression.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ParameterExpressionImpl.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/SelectionImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SimpleCaseExpression.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SizeOfCollectionExpression.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SubqueryComparisonModifierExpression.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/UnaryArithmeticOperation.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/UnaryOperatorExpression.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/AbsFunction.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/AggregationFunction.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/BasicFunctionExpression.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CastFunction.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CurrentDateFunction.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CurrentTimeFunction.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CurrentTimestampFunction.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/LengthFunction.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/LocateFunction.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/LowerFunction.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/SqrtFunction.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/SubstringFunction.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/TrimFunction.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/UpperFunction.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/AbstractPredicateImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/AbstractSimplePredicate.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/BetweenPredicate.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/BooleanAssertionPredicate.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/BooleanExpressionPredicate.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/ComparisonPredicate.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/CompoundPredicate.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/ExistsPredicate.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/ExplicitTruthValueCheck.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/InPredicate.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/IsEmptyPredicate.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/LikePredicate.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/MemberOfPredicate.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/NullnessPredicate.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/CriteriaCompilingTest.java
Log:
HHH-4663 - Make sure CriteriaQuery is serializable
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/AbstractBasicPluralJoin.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/AbstractBasicPluralJoin.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/AbstractBasicPluralJoin.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import javax.persistence.criteria.CollectionJoin;
import javax.persistence.criteria.Expression;
import javax.persistence.criteria.Fetch;
@@ -47,7 +48,7 @@
*/
public abstract class AbstractBasicPluralJoin<O,C,E>
extends JoinImpl<O,E>
- implements PluralJoin<O,C,E>, Fetch<O,E> {
+ implements PluralJoin<O,C,E>, Fetch<O,E>, Serializable {
public AbstractBasicPluralJoin(
CriteriaBuilderImpl 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-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/AbstractNode.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,13 +23,15 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
+
/**
* All nodes in a criteria query tree will generally need access to the {@link
CriteriaBuilderImpl} from which they
* come. This base class provides convenient, consistent support for that.
*
* @author Steve Ebersole
*/
-public class AbstractNode {
+public class AbstractNode implements Serializable {
private final CriteriaBuilderImpl criteriaBuilder;
public AbstractNode(CriteriaBuilderImpl criteriaBuilder) {
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicCollectionJoinImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicCollectionJoinImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicCollectionJoinImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import javax.persistence.criteria.JoinType;
import javax.persistence.criteria.From;
import javax.persistence.metamodel.CollectionAttribute;
@@ -36,7 +37,7 @@
*/
public class BasicCollectionJoinImpl<O,E>
extends AbstractBasicPluralJoin<O,java.util.Collection<E>,E>
- implements JoinImplementors.CollectionJoinImplementor<O,E> {
+ implements JoinImplementors.CollectionJoinImplementor<O,E>, Serializable {
public BasicCollectionJoinImpl(
CriteriaBuilderImpl criteriaBuilder,
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicListJoinImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicListJoinImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicListJoinImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import javax.persistence.criteria.JoinType;
import javax.persistence.criteria.From;
@@ -38,7 +39,7 @@
*/
public class BasicListJoinImpl<O,E>
extends AbstractBasicPluralJoin<O,java.util.List<E>,E>
- implements JoinImplementors.ListJoinImplementor<O,E> {
+ implements JoinImplementors.ListJoinImplementor<O,E>, Serializable {
public BasicListJoinImpl(
CriteriaBuilderImpl criteriaBuilder,
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicMapJoinImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicMapJoinImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicMapJoinImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import java.util.Map;
import java.util.Map.Entry;
import javax.persistence.criteria.Expression;
@@ -46,7 +47,7 @@
*/
public class BasicMapJoinImpl<O,K,V>
extends AbstractBasicPluralJoin<O,java.util.Map<K,V>,V>
- implements JoinImplementors.MapJoinImplementor<O,K,V> {
+ implements JoinImplementors.MapJoinImplementor<O,K,V>, Serializable {
public BasicMapJoinImpl(
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicSetJoinImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicSetJoinImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/BasicSetJoinImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import javax.persistence.criteria.JoinType;
import javax.persistence.criteria.From;
import javax.persistence.metamodel.SetAttribute;
@@ -36,7 +37,7 @@
*/
public class BasicSetJoinImpl<O,E>
extends AbstractBasicPluralJoin<O,java.util.Set<E>,E>
- implements JoinImplementors.SetJoinImplementor<O,E> {
+ implements JoinImplementors.SetJoinImplementor<O,E>, Serializable {
public BasicSetJoinImpl(
CriteriaBuilderImpl criteriaBuilder,
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CollectionJoinImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CollectionJoinImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CollectionJoinImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import javax.persistence.criteria.JoinType;
import javax.persistence.criteria.From;
import javax.persistence.metamodel.CollectionAttribute;
@@ -38,7 +39,7 @@
*/
public class CollectionJoinImpl<O,E>
extends JoinImpl<O,E>
- implements JoinImplementors.CollectionJoinImplementor<O,E> {
+ implements JoinImplementors.CollectionJoinImplementor<O,E>, Serializable {
public CollectionJoinImpl(
CriteriaBuilderImpl criteriaBuilder,
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaQueryCompiler.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaQueryCompiler.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaQueryCompiler.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import java.util.Set;
import java.util.Map;
import java.util.HashMap;
@@ -56,7 +57,7 @@
*
* @author Steve Ebersole
*/
-public class CriteriaQueryCompiler {
+public class CriteriaQueryCompiler implements Serializable {
private static final Logger log = LoggerFactory.getLogger( CriteriaQueryCompiler.class
);
public static interface ImplicitParameterBinding {
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-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaQueryImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -47,7 +48,7 @@
*
* @author Steve Ebersole
*/
-public class CriteriaQueryImpl<T> extends AbstractNode implements
CriteriaQuery<T> {
+public class CriteriaQueryImpl<T> extends AbstractNode implements
CriteriaQuery<T>, Serializable {
private final Class<T> returnType;
private final QueryStructure<T> queryStructure;
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-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaSubqueryImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import java.util.List;
import java.util.Set;
import java.util.HashSet;
@@ -49,7 +50,7 @@
*
* @author Steve Ebersole
*/
-public class CriteriaSubqueryImpl<T> extends ExpressionImpl<T> implements
Subquery<T> {
+public class CriteriaSubqueryImpl<T> extends ExpressionImpl<T> implements
Subquery<T>, Serializable {
private final AbstractQuery<?> parent;
private final QueryStructure<T> queryStructure;
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/FromImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/FromImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/FromImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import java.util.Set;
import java.util.Collection;
import java.util.Map;
@@ -59,7 +60,9 @@
*
* @author Steve Ebersole
*/
-public abstract class FromImpl<Z,X> extends PathImpl<X> implements
From<Z,X>, TableExpressionMapper {
+public abstract class FromImpl<Z,X>
+ extends PathImpl<X>
+ implements From<Z,X>, TableExpressionMapper, Serializable {
public static final JoinType DEFAULT_JOIN_TYPE = JoinType.INNER;
private final Expression<Class<? extends X>> typeExpression;
@@ -69,7 +72,7 @@
/**
* Helper contract used to define who/what keeps track of joins and fetches made from
this <tt>FROM</tt>.
*/
- public static interface JoinScope<X> {
+ public static interface JoinScope<X> extends Serializable {
public void addJoin(Join<X, ?> join);
public void addFetch(Fetch<X,?> fetch);
public boolean isCorrelated();
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/JoinImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/JoinImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/JoinImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import javax.persistence.criteria.From;
import javax.persistence.criteria.JoinType;
import javax.persistence.metamodel.Attribute;
@@ -36,7 +37,9 @@
*
* @author Steve Ebersole
*/
-public class JoinImpl<Z, X> extends FromImpl<Z, X> implements
JoinImplementors.JoinImplementor<Z,X> {
+public class JoinImpl<Z, X>
+ extends FromImpl<Z, X>
+ implements JoinImplementors.JoinImplementor<Z,X>, Serializable {
// TODO : keep track or whether any non-identifier properties get dereferenced
// for join optimization like in HQL
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/ListJoinImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/ListJoinImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/ListJoinImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import javax.persistence.criteria.JoinType;
import javax.persistence.criteria.From;
@@ -38,7 +39,9 @@
*
* @author Steve Ebersole
*/
-public class ListJoinImpl<O,E> extends JoinImpl<O,E> implements
JoinImplementors.ListJoinImplementor<O,E> {
+public class ListJoinImpl<O,E>
+ extends JoinImpl<O,E>
+ implements JoinImplementors.ListJoinImplementor<O,E>, Serializable {
public ListJoinImpl(
CriteriaBuilderImpl criteriaBuilder,
Class<E> javaType,
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/MapJoinImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/MapJoinImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/MapJoinImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import java.util.Map;
import java.util.Map.Entry;
import javax.persistence.criteria.Expression;
@@ -43,7 +44,7 @@
*/
public class MapJoinImpl<O,K,V>
extends JoinImpl<O,V>
- implements JoinImplementors.MapJoinImplementor<O,K,V> {
+ implements JoinImplementors.MapJoinImplementor<O,K,V>, Serializable {
public MapJoinImpl(
CriteriaBuilderImpl criteriaBuilder,
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/MapKeyHelpers.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/MapKeyHelpers.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/MapKeyHelpers.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import java.lang.reflect.Member;
import java.util.Map;
import java.util.Map.Entry;
@@ -60,8 +61,15 @@
* @param <K> The type of the map key
* @param <V> The type of the map value
*/
- public static class MapKeyJoin<K,V> extends JoinImpl<Map<K, V>, K>
implements Join<Map<K, V>, K> {
- public MapKeyJoin(CriteriaBuilderImpl criteriaBuilder, MapPath<K,V> source,
MapKeyAttribute<K> attribute, JoinType jt) {
+ public static class MapKeyJoin<K,V>
+ extends JoinImpl<Map<K, V>, K>
+ implements Join<Map<K, V>, K>, Serializable {
+
+ public MapKeyJoin(
+ CriteriaBuilderImpl criteriaBuilder,
+ MapPath<K,V> source,
+ MapKeyAttribute<K> attribute,
+ JoinType jt) {
super(
criteriaBuilder,
attribute.getJavaType(),
@@ -90,7 +98,7 @@
*
* @param <K> The type of the map key.
*/
- public static class MapKeyPath<K> extends PathImpl<K> implements
Path<K> {
+ public static class MapKeyPath<K> extends PathImpl<K> implements
Path<K>, Serializable {
public MapKeyPath(
CriteriaBuilderImpl criteriaBuilder,
MapPath<K,?> source,
@@ -106,7 +114,7 @@
* @param <K> The map key type
* @param <V> The map value type
*/
- public static class MapPath<K,V> extends PathImpl<Map<K, V>>
implements Path<Map<K, V>> {
+ public static class MapPath<K,V> extends PathImpl<Map<K, V>>
implements Path<Map<K, V>>, Serializable {
private final MapJoin<?,K,V> mapJoin;
public MapPath(
@@ -138,7 +146,7 @@
*
* @param <K> The type of the map key
*/
- public static class MapKeyAttribute<K> implements
SingularAttribute<Map<K,?>,K> {
+ public static class MapKeyAttribute<K> implements
SingularAttribute<Map<K,?>,K>, Serializable {
private final MapAttribute<?,K,?> attribute;
private final CollectionPersister mapPersister;
private final Type mapKeyType;
@@ -259,7 +267,7 @@
public static class MapEntryExpression<K,V>
extends ExpressionImpl<Map.Entry<K,V>>
- implements Expression<Map.Entry<K,V>> {
+ implements Expression<Map.Entry<K,V>>, Serializable {
private final PathImpl origin;
private final MapAttribute<?, K, V> attribute;
@@ -282,7 +290,7 @@
}
public String render(CriteriaQueryCompiler.RenderingContext renderingContext) {
- // i dont think this is vqalid outside of select clause...
+ // i don't think this is valid outside of select clause...
throw new IllegalStateException( "illegal reference to map entry outside of
select clause." );
}
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/OrderImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/OrderImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/OrderImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,15 +23,16 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import javax.persistence.criteria.Order;
import javax.persistence.criteria.Expression;
/**
- * TODO : javadoc
+ * Represents an <tt>ORDER BY</tt> fragment.
*
* @author Steve Ebersole
*/
-public class OrderImpl implements Order {
+public class OrderImpl implements Order, Serializable {
private final Expression<?> expression;
private boolean ascending;
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/PathImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/PathImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/PathImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import java.util.Collection;
import java.util.Map;
import javax.persistence.criteria.Expression;
@@ -40,7 +41,7 @@
*
* @author Steve Ebersole
*/
-public class PathImpl<X> extends ExpressionImpl<X> implements Path<X>
{
+public class PathImpl<X> extends ExpressionImpl<X> implements Path<X>,
Serializable {
private final PathImpl<?> origin;
private final Attribute<?,?> attribute;
private Object model;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/QueryStructure.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/QueryStructure.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/QueryStructure.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import java.util.Arrays;
import java.util.Set;
import java.util.HashSet;
@@ -54,7 +55,7 @@
*
* @author Steve Ebersole
*/
-public class QueryStructure<T> {
+public class QueryStructure<T> implements Serializable {
private final AbstractQuery<T> owner;
private final CriteriaBuilderImpl criteriaBuilder;
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/RootImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/RootImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/RootImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import javax.persistence.criteria.Root;
import javax.persistence.criteria.From;
import javax.persistence.metamodel.Attribute;
@@ -33,7 +34,7 @@
*
* @author Steve Ebersole
*/
-public class RootImpl<X> extends FromImpl<X,X> implements Root<X> {
+public class RootImpl<X> extends FromImpl<X,X> implements Root<X>,
Serializable {
private RootImpl<X> correlationParent;
public RootImpl(
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/SetJoinImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/SetJoinImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/SetJoinImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import javax.persistence.criteria.JoinType;
import javax.persistence.criteria.From;
import javax.persistence.metamodel.SetAttribute;
@@ -38,7 +39,7 @@
*/
public class SetJoinImpl<O,E>
extends JoinImpl<O,E>
- implements JoinImplementors.SetJoinImplementor<O,E> {
+ implements JoinImplementors.SetJoinImplementor<O,E>, Serializable {
public SetJoinImpl(
CriteriaBuilderImpl criteriaBuilder,
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/ValueHandlerFactory.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/ValueHandlerFactory.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/ValueHandlerFactory.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria;
+import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
@@ -40,7 +41,7 @@
public String render(T value);
}
- public static abstract class BaseValueHandler<T> implements ValueHandler<T>
{
+ public static abstract class BaseValueHandler<T> implements ValueHandler<T>,
Serializable {
public String render(T value) {
return value.toString();
}
@@ -73,7 +74,7 @@
|| Double.TYPE.isInstance( value );
}
- public static class ByteValueHandler extends BaseValueHandler<Byte> {
+ public static class ByteValueHandler extends BaseValueHandler<Byte> implements
Serializable {
public static final ByteValueHandler INSTANCE = new ByteValueHandler();
@SuppressWarnings({ "UnnecessaryBoxing" })
public Byte convert(Object value) {
@@ -90,7 +91,7 @@
}
}
- public static class ShortValueHandler extends BaseValueHandler<Short> {
+ public static class ShortValueHandler extends BaseValueHandler<Short> implements
Serializable {
public static final ShortValueHandler INSTANCE = new ShortValueHandler();
@SuppressWarnings({ "UnnecessaryBoxing" })
public Short convert(Object value) {
@@ -107,7 +108,7 @@
}
}
- public static class IntegerValueHandler extends BaseValueHandler<Integer> {
+ public static class IntegerValueHandler extends BaseValueHandler<Integer>
implements Serializable {
public static final IntegerValueHandler INSTANCE = new IntegerValueHandler();
@SuppressWarnings({ "UnnecessaryBoxing" })
public Integer convert(Object value) {
@@ -124,7 +125,7 @@
}
}
- public static class LongValueHandler extends BaseValueHandler<Long> {
+ public static class LongValueHandler extends BaseValueHandler<Long> implements
Serializable {
public static final LongValueHandler INSTANCE = new LongValueHandler();
@SuppressWarnings({ "UnnecessaryBoxing" })
public Long convert(Object value) {
@@ -146,7 +147,7 @@
}
}
- public static class FloatValueHandler extends BaseValueHandler<Float> {
+ public static class FloatValueHandler extends BaseValueHandler<Float> implements
Serializable {
public static final FloatValueHandler INSTANCE = new FloatValueHandler();
@SuppressWarnings({ "UnnecessaryBoxing" })
public Float convert(Object value) {
@@ -168,7 +169,7 @@
}
}
- public static class DoubleValueHandler extends BaseValueHandler<Double> {
+ public static class DoubleValueHandler extends BaseValueHandler<Double> implements
Serializable {
public static final DoubleValueHandler INSTANCE = new DoubleValueHandler();
@SuppressWarnings({ "UnnecessaryBoxing" })
public Double convert(Object value) {
@@ -190,7 +191,7 @@
}
}
- public static class BigIntegerValueHandler extends BaseValueHandler<BigInteger> {
+ public static class BigIntegerValueHandler extends BaseValueHandler<BigInteger>
implements Serializable {
public static final BigIntegerValueHandler INSTANCE = new BigIntegerValueHandler();
public BigInteger convert(Object value) {
if ( value == null ) {
@@ -206,7 +207,7 @@
}
}
- public static class BigDecimalValueHandler extends BaseValueHandler<BigDecimal> {
+ public static class BigDecimalValueHandler extends BaseValueHandler<BigDecimal>
implements Serializable {
public static final BigDecimalValueHandler INSTANCE = new BigDecimalValueHandler();
public BigDecimal convert(Object value) {
if ( value == null ) {
@@ -225,7 +226,7 @@
}
}
- public static class StringValueHandler extends BaseValueHandler<String> {
+ public static class StringValueHandler extends BaseValueHandler<String> implements
Serializable {
public static final StringValueHandler INSTANCE = new StringValueHandler();
public String convert(Object value) {
return value == null ? null : value.toString();
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/AbstractTupleElement.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/AbstractTupleElement.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/AbstractTupleElement.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,8 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
+
import org.hibernate.ejb.criteria.AbstractNode;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
import org.hibernate.ejb.criteria.TupleElementImplementor;
@@ -35,7 +37,7 @@
*/
public abstract class AbstractTupleElement<X>
extends AbstractNode
- implements TupleElementImplementor<X> {
+ implements TupleElementImplementor<X>, Serializable {
private final Class originalJavaType;
private Class<X> javaType;
private String alias;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/BinaryArithmeticOperation.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/BinaryArithmeticOperation.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/BinaryArithmeticOperation.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.ParameterRegistry;
@@ -37,7 +38,7 @@
*/
public class BinaryArithmeticOperation<N extends Number>
extends ExpressionImpl<N>
- implements BinaryOperatorExpression<N> {
+ implements BinaryOperatorExpression<N>, Serializable {
public static enum Operation {
ADD {
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-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/CoalesceExpression.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.criteria.Expression;
@@ -37,7 +38,7 @@
*
* @author Steve Ebersole
*/
-public class CoalesceExpression<T> extends ExpressionImpl<T> implements
Coalesce<T> {
+public class CoalesceExpression<T> extends ExpressionImpl<T> implements
Coalesce<T>, Serializable {
private final List<Expression<? extends T>> expressions;
private Class<T> javaType;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/CollectionExpression.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/CollectionExpression.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/CollectionExpression.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import javax.persistence.metamodel.PluralAttribute;
import org.hibernate.ejb.criteria.ParameterRegistry;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -36,7 +37,7 @@
*
* @author Steve Ebersole
*/
-public class CollectionExpression<C> extends ExpressionImpl<C> {
+public class CollectionExpression<C> extends ExpressionImpl<C> implements
Serializable {
private final PathImpl origin;
private final CollectionPersister persister;
private final PluralAttribute<?, C, ?> attribute;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/CompoundSelectionImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/CompoundSelectionImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/CompoundSelectionImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Tuple;
@@ -42,7 +43,9 @@
*
* @author Steve Ebersole
*/
-public class CompoundSelectionImpl<X> extends SelectionImpl<X> implements
CompoundSelection<X>, Renderable {
+public class CompoundSelectionImpl<X>
+ extends SelectionImpl<X>
+ implements CompoundSelection<X>, Renderable, Serializable {
private final boolean isConstructor;
private List<Selection<?>> selectionItems;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ConcatExpression.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ConcatExpression.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ConcatExpression.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.ParameterRegistry;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -34,7 +35,7 @@
*
* @author Steve Ebersole
*/
-public class ConcatExpression extends ExpressionImpl<String> {
+public class ConcatExpression extends ExpressionImpl<String> implements
Serializable {
private Expression<String> string1;
private Expression<String> string2;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/EntityTypeExpression.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/EntityTypeExpression.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/EntityTypeExpression.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,8 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
+
import org.hibernate.ejb.criteria.ParameterRegistry;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
import org.hibernate.ejb.criteria.CriteriaQueryCompiler;
@@ -32,7 +34,7 @@
*
* @author Steve Ebersole
*/
-public class EntityTypeExpression<T> extends ExpressionImpl<T> {
+public class EntityTypeExpression<T> extends ExpressionImpl<T> implements
Serializable {
public EntityTypeExpression(CriteriaBuilderImpl criteriaBuilder, Class<T>
javaType) {
super( criteriaBuilder, javaType );
}
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-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ExpressionImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Collection;
@@ -40,7 +41,7 @@
*/
public abstract class ExpressionImpl<T>
extends SelectionImpl<T>
- implements ExpressionImplementor<T> {
+ implements ExpressionImplementor<T>, Serializable {
public ExpressionImpl(CriteriaBuilderImpl criteriaBuilder, Class<T> javaType) {
super( criteriaBuilder, javaType );
}
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ListIndexExpression.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ListIndexExpression.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ListIndexExpression.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import javax.persistence.metamodel.ListAttribute;
import org.hibernate.ejb.criteria.ParameterRegistry;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -34,7 +35,7 @@
*
* @author Steve Ebersole
*/
-public class ListIndexExpression extends ExpressionImpl<Integer> {
+public class ListIndexExpression extends ExpressionImpl<Integer> implements
Serializable {
private final PathImpl origin;
private final ListAttribute<?,?> listAttribute;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/LiteralExpression.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/LiteralExpression.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/LiteralExpression.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import javax.persistence.TypedQuery;
import org.hibernate.ejb.criteria.ValueHandlerFactory;
@@ -35,7 +36,7 @@
*
* @author Steve Ebersole
*/
-public class LiteralExpression<T> extends ExpressionImpl<T> {
+public class LiteralExpression<T> extends ExpressionImpl<T> implements
Serializable {
private Object literal;
@SuppressWarnings({ "unchecked" })
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/NullifExpression.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/NullifExpression.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/NullifExpression.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.ParameterRegistry;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -34,7 +35,7 @@
*
* @author Steve Ebersole
*/
-public class NullifExpression<T> extends ExpressionImpl<T> {
+public class NullifExpression<T> extends ExpressionImpl<T> implements
Serializable {
private final Expression<? extends T> primaryExpression;
private final Expression<?> secondaryExpression;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ParameterExpressionImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ParameterExpressionImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/ParameterExpressionImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import javax.persistence.criteria.ParameterExpression;
import org.hibernate.ejb.criteria.ParameterRegistry;
@@ -35,7 +36,9 @@
*
* @author Steve Ebersole
*/
-public class ParameterExpressionImpl<T> extends ExpressionImpl<T> implements
ParameterExpression<T> {
+public class ParameterExpressionImpl<T>
+ extends ExpressionImpl<T>
+ implements ParameterExpression<T>, Serializable {
private final String name;
private final Integer position;
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-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SearchedCaseExpression.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.criteria.Expression;
@@ -44,7 +45,9 @@
*
* @author Steve Ebersole
*/
-public class SearchedCaseExpression<R> extends ExpressionImpl<R> implements
Case<R> {
+public class SearchedCaseExpression<R>
+ extends ExpressionImpl<R>
+ implements Case<R>, Serializable {
private Class<R> javaType; // overrides the javaType kept on tuple-impl so that we
can adjust it
private List<WhenClause> whenClauses = new ArrayList<WhenClause>();
private Expression<? extends R> otherwiseResult;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SelectionImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SelectionImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SelectionImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import java.util.Collections;
import java.util.List;
import javax.persistence.criteria.Selection;
@@ -40,7 +41,7 @@
*/
public abstract class SelectionImpl<X>
extends AbstractTupleElement<X>
- implements SelectionImplementor<X>, ParameterContainer {
+ implements SelectionImplementor<X>, ParameterContainer, Serializable {
public SelectionImpl(CriteriaBuilderImpl criteriaBuilder, Class<X> javaType) {
super( criteriaBuilder, javaType );
}
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-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SimpleCaseExpression.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.criteria.Expression;
@@ -43,7 +44,9 @@
*
* @author Steve Ebersole
*/
-public class SimpleCaseExpression<C,R> extends ExpressionImpl<R> implements
SimpleCase<C,R> {
+public class SimpleCaseExpression<C,R>
+ extends ExpressionImpl<R>
+ implements SimpleCase<C,R>, Serializable {
private Class<R> javaType;
private final Expression<? extends C> expression;
private List<WhenClause> whenClauses = new ArrayList<WhenClause>();
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SizeOfCollectionExpression.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SizeOfCollectionExpression.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SizeOfCollectionExpression.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import java.util.Collection;
import org.hibernate.ejb.criteria.ParameterRegistry;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -35,7 +36,8 @@
* @author Steve Ebersole
*/
public class SizeOfCollectionExpression<C extends Collection>
- extends ExpressionImpl<Integer> {
+ extends ExpressionImpl<Integer>
+ implements Serializable {
private final CollectionExpression<C> collectionExpression;
public SizeOfCollectionExpression(
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SubqueryComparisonModifierExpression.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SubqueryComparisonModifierExpression.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/SubqueryComparisonModifierExpression.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import javax.persistence.criteria.Subquery;
import org.hibernate.ejb.criteria.ParameterRegistry;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -35,7 +36,9 @@
*
* @author Steve Ebersole
*/
-public class SubqueryComparisonModifierExpression<Y> extends
ExpressionImpl<Y> {
+public class SubqueryComparisonModifierExpression<Y>
+ extends ExpressionImpl<Y>
+ implements Serializable {
public static enum Modifier {
ALL {
String rendered() {
@@ -77,7 +80,7 @@
}
public void registerParameters(ParameterRegistry registry) {
- // nothign to do (the subquery should be handled directly, and the modified itself is
not parameterized)
+ // nothing to do (the subquery should be handled directly, and the modified itself is
not parameterized)
}
public String render(CriteriaQueryCompiler.RenderingContext renderingContext) {
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/UnaryArithmeticOperation.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/UnaryArithmeticOperation.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/UnaryArithmeticOperation.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.ParameterRegistry;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -36,7 +37,7 @@
*/
public class UnaryArithmeticOperation<T>
extends ExpressionImpl<T>
- implements UnaryOperatorExpression<T> {
+ implements UnaryOperatorExpression<T>, Serializable {
public static enum Operation {
UNARY_PLUS, UNARY_MINUS
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/UnaryOperatorExpression.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/UnaryOperatorExpression.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/UnaryOperatorExpression.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
/**
@@ -30,7 +31,7 @@
*
* @author Steve Ebersole
*/
-public interface UnaryOperatorExpression<T> extends Expression<T> {
+public interface UnaryOperatorExpression<T> extends Expression<T>,
Serializable {
/**
* Get the operand.
*
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/AbsFunction.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/AbsFunction.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/AbsFunction.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression.function;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -32,8 +33,8 @@
* @author Steve Ebersole
*/
public class AbsFunction<N extends Number>
- extends ParameterizedFunctionExpression<N> {
-
+ extends ParameterizedFunctionExpression<N>
+ implements Serializable {
public static final String NAME = "abs";
public AbsFunction(CriteriaBuilderImpl criteriaBuilder, Expression expression) {
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/AggregationFunction.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/AggregationFunction.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/AggregationFunction.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression.function;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
import org.hibernate.ejb.criteria.CriteriaQueryCompiler;
@@ -33,7 +34,10 @@
*
* @author Steve Ebersole
*/
-public class AggregationFunction<T> extends
ParameterizedFunctionExpression<T> {
+public class AggregationFunction<T>
+ extends ParameterizedFunctionExpression<T>
+ implements Serializable {
+
/**
* Constructs an aggregation function with a single literal argument.
*
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/BasicFunctionExpression.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/BasicFunctionExpression.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/BasicFunctionExpression.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,8 @@
*/
package org.hibernate.ejb.criteria.expression.function;
+import java.io.Serializable;
+
import org.hibernate.ejb.criteria.ParameterRegistry;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -30,13 +32,13 @@
import org.hibernate.ejb.criteria.expression.ExpressionImpl;
/**
- * Models the basic conept of a SQL function.
+ * Models the basic concept of a SQL function.
*
* @author Steve Ebersole
*/
public class BasicFunctionExpression<X>
extends ExpressionImpl<X>
- implements FunctionExpression<X> {
+ implements FunctionExpression<X>, Serializable {
private final String functionName;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CastFunction.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CastFunction.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CastFunction.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,8 @@
*/
package org.hibernate.ejb.criteria.expression.function;
+import java.io.Serializable;
+
import org.hibernate.ejb.criteria.ParameterRegistry;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
import org.hibernate.ejb.criteria.CriteriaQueryCompiler;
@@ -36,7 +38,9 @@
*
* @author Steve Ebersole
*/
-public class CastFunction<T,Y> extends BasicFunctionExpression<T> implements
FunctionExpression<T> {
+public class CastFunction<T,Y>
+ extends BasicFunctionExpression<T>
+ implements FunctionExpression<T>, Serializable {
public static final String CAST_NAME = "cast";
private final ExpressionImpl<Y> castSource;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CurrentDateFunction.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CurrentDateFunction.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CurrentDateFunction.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,9 @@
*/
package org.hibernate.ejb.criteria.expression.function;
+import java.io.Serializable;
+import java.sql.Date;
+
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
/**
@@ -30,10 +33,12 @@
*
* @author Steve Ebersole
*/
-public class CurrentDateFunction extends BasicFunctionExpression<java.sql.Date> {
+public class CurrentDateFunction
+ extends BasicFunctionExpression<Date>
+ implements Serializable {
public static final String NAME = "current_date";
public CurrentDateFunction(CriteriaBuilderImpl criteriaBuilder) {
- super( criteriaBuilder, java.sql.Date.class, NAME );
+ super( criteriaBuilder, Date.class, NAME );
}
}
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CurrentTimeFunction.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CurrentTimeFunction.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CurrentTimeFunction.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,9 @@
*/
package org.hibernate.ejb.criteria.expression.function;
+import java.io.Serializable;
+import java.sql.Time;
+
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
/**
@@ -30,10 +33,12 @@
*
* @author Steve Ebersole
*/
-public class CurrentTimeFunction extends BasicFunctionExpression<java.sql.Time> {
+public class CurrentTimeFunction
+ extends BasicFunctionExpression<Time>
+ implements Serializable {
public static final String NAME = "current_time";
public CurrentTimeFunction(CriteriaBuilderImpl criteriaBuilder) {
- super( criteriaBuilder, java.sql.Time.class, NAME );
+ super( criteriaBuilder, Time.class, NAME );
}
}
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CurrentTimestampFunction.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CurrentTimestampFunction.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/CurrentTimestampFunction.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression.function;
+import java.io.Serializable;
import java.sql.Timestamp;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -31,7 +32,9 @@
*
* @author Steve Ebersole
*/
-public class CurrentTimestampFunction extends BasicFunctionExpression<Timestamp> {
+public class CurrentTimestampFunction
+ extends BasicFunctionExpression<Timestamp>
+ implements Serializable {
public static final String NAME = "current_timestamp";
public CurrentTimestampFunction(CriteriaBuilderImpl criteriaBuilder) {
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/LengthFunction.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/LengthFunction.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/LengthFunction.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression.function;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -31,7 +32,9 @@
*
* @author Steve Ebersole
*/
-public class LengthFunction extends ParameterizedFunctionExpression<Integer> {
+public class LengthFunction
+ extends ParameterizedFunctionExpression<Integer>
+ implements Serializable {
public static final String NAME = "length";
public LengthFunction(CriteriaBuilderImpl criteriaBuilder, Expression<String>
value) {
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/LocateFunction.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/LocateFunction.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/LocateFunction.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression.function;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.ParameterRegistry;
@@ -36,7 +37,9 @@
*
* @author Steve Ebersole
*/
-public class LocateFunction extends BasicFunctionExpression<Integer> {
+public class LocateFunction
+ extends BasicFunctionExpression<Integer>
+ implements Serializable {
public static final String NAME = "locate";
private final Expression<String> pattern;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/LowerFunction.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/LowerFunction.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/LowerFunction.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression.function;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -31,7 +32,9 @@
*
* @author Steve Ebersole
*/
-public class LowerFunction extends ParameterizedFunctionExpression<String> {
+public class LowerFunction
+ extends ParameterizedFunctionExpression<String>
+ implements Serializable {
public static final String NAME = "lower";
public LowerFunction(CriteriaBuilderImpl criteriaBuilder, Expression<String>
string) {
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/SqrtFunction.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/SqrtFunction.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/SqrtFunction.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression.function;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -31,7 +32,9 @@
*
* @author Steve Ebersole
*/
-public class SqrtFunction extends ParameterizedFunctionExpression<Double> {
+public class SqrtFunction
+ extends ParameterizedFunctionExpression<Double>
+ implements Serializable {
public static final String NAME = "sqrt";
public SqrtFunction(CriteriaBuilderImpl criteriaBuilder, Expression<? extends
Number> expression) {
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/SubstringFunction.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/SubstringFunction.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/SubstringFunction.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression.function;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.ParameterRegistry;
@@ -36,7 +37,9 @@
*
* @author Steve Ebersole
*/
-public class SubstringFunction extends BasicFunctionExpression<String> {
+public class SubstringFunction
+ extends BasicFunctionExpression<String>
+ implements Serializable {
public static final String NAME = "substring";
private final Expression<String> value;
@@ -54,6 +57,7 @@
this.length = length;
}
+ @SuppressWarnings({ "RedundantCast" })
public SubstringFunction(
CriteriaBuilderImpl criteriaBuilder,
Expression<String> value,
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/TrimFunction.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/TrimFunction.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/TrimFunction.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression.function;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import javax.persistence.criteria.CriteriaBuilder.Trimspec;
import org.hibernate.ejb.criteria.ParameterRegistry;
@@ -36,7 +37,9 @@
*
* @author Steve Ebersole
*/
-public class TrimFunction extends BasicFunctionExpression<String> {
+public class TrimFunction
+ extends BasicFunctionExpression<String>
+ implements Serializable {
public static final String NAME = "trim";
public static final Trimspec DEFAULT_TRIMSPEC = Trimspec.BOTH;
public static final char DEFAULT_TRIM_CHAR = ' ';
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/UpperFunction.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/UpperFunction.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/function/UpperFunction.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.expression.function;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -31,7 +32,9 @@
*
* @author Steve Ebersole
*/
-public class UpperFunction extends ParameterizedFunctionExpression<String> {
+public class UpperFunction
+ extends ParameterizedFunctionExpression<String>
+ implements Serializable {
public static final String NAME = "upper";
public UpperFunction(CriteriaBuilderImpl criteriaBuilder, Expression<String>
string) {
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/AbstractPredicateImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/AbstractPredicateImpl.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/AbstractPredicateImpl.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.predicate;
+import java.io.Serializable;
import java.util.List;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Selection;
@@ -36,7 +37,9 @@
*
* @author Steve Ebersole
*/
-public abstract class AbstractPredicateImpl extends ExpressionImpl<Boolean>
implements Predicate {
+public abstract class AbstractPredicateImpl
+ extends ExpressionImpl<Boolean>
+ implements Predicate, Serializable {
private boolean negated;
protected AbstractPredicateImpl(CriteriaBuilderImpl criteriaBuilder) {
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/AbstractSimplePredicate.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/AbstractSimplePredicate.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/AbstractSimplePredicate.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.predicate;
+import java.io.Serializable;
import java.util.List;
import java.util.Collections;
import javax.persistence.criteria.Expression;
@@ -34,7 +35,9 @@
*
* @author Steve Ebersole
*/
-public abstract class AbstractSimplePredicate extends AbstractPredicateImpl {
+public abstract class AbstractSimplePredicate
+ extends AbstractPredicateImpl
+ implements Serializable {
private static final List<Expression<Boolean>> NO_EXPRESSIONS =
Collections.emptyList();
public AbstractSimplePredicate(CriteriaBuilderImpl criteriaBuilder) {
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/BetweenPredicate.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/BetweenPredicate.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/BetweenPredicate.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.predicate;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.ParameterRegistry;
@@ -35,7 +36,9 @@
*
* @author Steve Ebersole
*/
-public class BetweenPredicate<Y> extends AbstractSimplePredicate {
+public class BetweenPredicate<Y>
+ extends AbstractSimplePredicate
+ implements Serializable {
private final Expression<? extends Y> expression;
private final Expression<? extends Y> lowerBound;
private final Expression<? extends Y> upperBound;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/BooleanAssertionPredicate.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/BooleanAssertionPredicate.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/BooleanAssertionPredicate.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.predicate;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -31,11 +32,18 @@
import org.hibernate.ejb.criteria.Renderable;
/**
- * TODO : javadoc
+ * Predicate to assert the explicit value of a boolean expression:<ul>
+ * <li>x = true</li>
+ * <li>x = false</li>
+ * <li>x <> true</li>
+ * <li>x <> false</li>
+ * </ul>
*
* @author Steve Ebersole
*/
-public class BooleanAssertionPredicate extends AbstractSimplePredicate {
+public class BooleanAssertionPredicate
+ extends AbstractSimplePredicate
+ implements Serializable {
private final Expression<Boolean> expression;
private final Boolean assertedValue;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/BooleanExpressionPredicate.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/BooleanExpressionPredicate.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/BooleanExpressionPredicate.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.predicate;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import javax.persistence.criteria.Predicate;
@@ -36,7 +37,9 @@
*
* @author Steve Ebersole
*/
-public class BooleanExpressionPredicate extends AbstractSimplePredicate {
+public class BooleanExpressionPredicate
+ extends AbstractSimplePredicate
+ implements Serializable {
private final Expression<Boolean> expression;
public BooleanExpressionPredicate(CriteriaBuilderImpl criteriaBuilder,
Expression<Boolean> expression) {
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/ComparisonPredicate.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/ComparisonPredicate.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/ComparisonPredicate.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.predicate;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.ValueHandlerFactory;
@@ -38,7 +39,9 @@
*
* @author Steve Ebersole
*/
-public class ComparisonPredicate extends AbstractSimplePredicate implements
BinaryOperatorExpression<Boolean> {
+public class ComparisonPredicate
+ extends AbstractSimplePredicate
+ implements BinaryOperatorExpression<Boolean>, Serializable {
private final ComparisonOperator comparisonOperator;
private final Expression<?> leftHandSide;
private final Expression<?> rightHandSide;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/CompoundPredicate.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/CompoundPredicate.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/CompoundPredicate.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.predicate;
+import java.io.Serializable;
import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;
@@ -40,7 +41,9 @@
*
* @author Steve Ebersole
*/
-public class CompoundPredicate extends AbstractPredicateImpl {
+public class CompoundPredicate
+ extends AbstractPredicateImpl
+ implements Serializable {
private final BooleanOperator operator;
private final List<Expression<Boolean>> expressions = new
ArrayList<Expression<Boolean>>();
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/ExistsPredicate.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/ExistsPredicate.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/ExistsPredicate.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.predicate;
+import java.io.Serializable;
import javax.persistence.criteria.Subquery;
import org.hibernate.ejb.criteria.ParameterRegistry;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -34,7 +35,9 @@
*
* @author Steve Ebersole
*/
-public class ExistsPredicate extends AbstractSimplePredicate {
+public class ExistsPredicate
+ extends AbstractSimplePredicate
+ implements Serializable {
private final Subquery<?> subquery;
public ExistsPredicate(CriteriaBuilderImpl criteriaBuilder, Subquery<?> subquery)
{
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/ExplicitTruthValueCheck.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/ExplicitTruthValueCheck.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/ExplicitTruthValueCheck.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.predicate;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.ParameterRegistry;
@@ -40,7 +41,9 @@
*
* @author Steve Ebersole
*/
-public class ExplicitTruthValueCheck extends AbstractSimplePredicate {
+public class ExplicitTruthValueCheck
+ extends AbstractSimplePredicate
+ implements Serializable {
// TODO : given that JPA supports only TRUE and FALSE, can this be handled just with
negation?
private final Expression<Boolean> booleanExpression;
private final TruthValue truthValue;
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-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/InPredicate.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.predicate;
+import java.io.Serializable;
import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;
@@ -38,11 +39,13 @@
import org.hibernate.ejb.criteria.expression.LiteralExpression;
/**
- * TODO : javadoc
+ * Models an <tt>[NOT] IN</tt> restriction
*
* @author Steve Ebersole
*/
-public class InPredicate<T> extends AbstractSimplePredicate implements
CriteriaBuilderImpl.In<T> {
+public class InPredicate<T>
+ extends AbstractSimplePredicate
+ implements CriteriaBuilderImpl.In<T>, Serializable {
private final Expression<? extends T> expression;
private final List<Expression<? extends T>> values;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/IsEmptyPredicate.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/IsEmptyPredicate.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/IsEmptyPredicate.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.predicate;
+import java.io.Serializable;
import java.util.Collection;
import org.hibernate.ejb.criteria.ParameterRegistry;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -31,13 +32,13 @@
import org.hibernate.ejb.criteria.expression.UnaryOperatorExpression;
/**
- * TODO : javadoc
+ * Models an <tt>IS [NOT] EMPTY</tt> restriction
*
* @author Steve Ebersole
*/
public class IsEmptyPredicate<C extends Collection>
extends AbstractSimplePredicate
- implements UnaryOperatorExpression<Boolean> {
+ implements UnaryOperatorExpression<Boolean>, Serializable {
private final CollectionExpression<C> collectionExpression;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/LikePredicate.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/LikePredicate.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/LikePredicate.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.predicate;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.ParameterRegistry;
import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
@@ -35,7 +36,7 @@
*
* @author Steve Ebersole
*/
-public class LikePredicate extends AbstractSimplePredicate {
+public class LikePredicate extends AbstractSimplePredicate implements Serializable {
private final Expression<String> matchExpression;
private final Expression<String> pattern;
private final Expression<Character> escapeCharacter;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/MemberOfPredicate.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/MemberOfPredicate.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/MemberOfPredicate.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.predicate;
+import java.io.Serializable;
import java.util.Collection;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.ParameterRegistry;
@@ -33,12 +34,13 @@
import org.hibernate.ejb.criteria.expression.LiteralExpression;
/**
- * TODO : javadoc
+ * Models an <tt>[NOT] MEMBER OF</tt> restriction
*
* @author Steve Ebersole
*/
public class MemberOfPredicate<E, C extends Collection<E>>
- extends AbstractSimplePredicate {
+ extends AbstractSimplePredicate
+ implements Serializable {
private final Expression<E> elementExpression;
private final CollectionExpression<C> collectionExpression;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/NullnessPredicate.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/NullnessPredicate.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/predicate/NullnessPredicate.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -23,6 +23,7 @@
*/
package org.hibernate.ejb.criteria.predicate;
+import java.io.Serializable;
import javax.persistence.criteria.Expression;
import org.hibernate.ejb.criteria.ParameterRegistry;
@@ -33,14 +34,16 @@
/**
* Defines a {@link javax.persistence.criteria.Predicate} for checking the
- * nullness state of an expression, aka an <tt>IS (NOT?) NULL</tt>
predicate.
+ * nullness state of an expression, aka an <tt>IS [NOT] NULL</tt> predicate.
* <p/>
* The <tt>NOT NULL</tt> form can be built by calling the constructor and
then
* calling {@link #not}.
*
* @author Steve Ebersole
*/
-public class NullnessPredicate extends AbstractSimplePredicate implements
UnaryOperatorExpression<Boolean> {
+public class NullnessPredicate
+ extends AbstractSimplePredicate
+ implements UnaryOperatorExpression<Boolean>, Serializable {
private final Expression<?> operand;
/**
Modified:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/CriteriaCompilingTest.java
===================================================================
---
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/CriteriaCompilingTest.java 2010-01-04
18:50:45 UTC (rev 18399)
+++
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/CriteriaCompilingTest.java 2010-01-04
19:00:01 UTC (rev 18400)
@@ -139,8 +139,7 @@
root.fetch( "lineItems" );
criteria.select( root );
- // TODO uncomment the serialization line and enjoy the test failing
- // criteria = serializeDeserialize( criteria );
+ criteria = serializeDeserialize( criteria );
em.createQuery( criteria ).getResultList();