Author: epbernard
Date: 2009-08-10 20:26:13 -0400 (Mon, 10 Aug 2009)
New Revision: 17259
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/metamodel/ManagedTypeImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/metamodel/PluralAttributeImpl.java
Log:
make Metamodel and its dependencies serializable
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/metamodel/ManagedTypeImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/metamodel/ManagedTypeImpl.java 2009-08-10
22:13:04 UTC (rev 17258)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/metamodel/ManagedTypeImpl.java 2009-08-11
00:26:13 UTC (rev 17259)
@@ -6,6 +6,7 @@
import java.util.Collections;
import java.util.Map;
import java.util.HashMap;
+import java.io.Serializable;
import javax.persistence.metamodel.ManagedType;
import javax.persistence.metamodel.Attribute;
@@ -23,12 +24,13 @@
/**
* @author Emmanuel Bernard
*/
-public abstract class ManagedTypeImpl<X> implements ManagedType<X> {
+public abstract class ManagedTypeImpl<X> implements ManagedType<X>,
Serializable {
private final Class<X> javaClass;
private final Map<String,Attribute<X, ?>> declaredAttributes;
private final Map<String,SingularAttribute<X, ?>>
declaredSingularAttributes;
private final Map<String,PluralAttribute<X, ?, ?>> declaredCollections;
+
ManagedTypeImpl(Class<X> clazz, Iterator<Property> properties,
MetadataContext context) {
this.javaClass = clazz;
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/metamodel/PluralAttributeImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/metamodel/PluralAttributeImpl.java 2009-08-10
22:13:04 UTC (rev 17258)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/metamodel/PluralAttributeImpl.java 2009-08-11
00:26:13 UTC (rev 17259)
@@ -5,6 +5,7 @@
import java.util.List;
import java.util.Set;
import java.util.Collection;
+import java.io.Serializable;
import javax.persistence.metamodel.PluralAttribute;
import javax.persistence.metamodel.ManagedType;
import javax.persistence.metamodel.Type;
@@ -18,7 +19,7 @@
/**
* @author Emmanuel Bernard
*/
-public abstract class PluralAttributeImpl<X, C, E> implements PluralAttribute<X,
C, E> {
+public abstract class PluralAttributeImpl<X, C, E> implements PluralAttribute<X,
C, E>, Serializable {
private final ManagedType<X> ownerType;
private final Type<E> elementType;
Show replies by date