Author: steve.ebersole(a)jboss.com
Date: 2009-11-18 17:13:03 -0500 (Wed, 18 Nov 2009)
New Revision: 18007
Added:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/components/
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/components/Client.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/components/ComponentCriteriaTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/components/Name.java
Modified:
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/test/java/org/hibernate/ejb/test/metadata/Address.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Flower.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/FoodItem.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Fridge.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Garden.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/House.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/MetadataTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Person.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Room.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/SubThing.java
Log:
HHH-4581 - Embedded objects in criteria API does not work
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 2009-11-18
21:02:19 UTC (rev 18006)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/FromImpl.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -47,6 +47,7 @@
import javax.persistence.metamodel.EntityType;
import javax.persistence.metamodel.ManagedType;
import javax.persistence.metamodel.PluralAttribute;
+import javax.persistence.metamodel.Bindable;
import javax.persistence.metamodel.PluralAttribute.CollectionType;
import javax.persistence.metamodel.Type.PersistenceType;
@@ -61,6 +62,10 @@
public abstract class FromImpl<Z,X> extends PathImpl<X> implements
From<Z,X>, TableExpressionMapper {
public static final JoinType DEFAULT_JOIN_TYPE = JoinType.INNER;
+ private final Expression<Class<? extends X>> typeExpression;
+ private Set<Join<X, ?>> joins;
+ private Set<Fetch<X, ?>> fetches;
+
/**
* Helper contract used to define who/what keeps track of joins and fetches made from
this <tt>FROM</tt>.
*/
@@ -71,10 +76,6 @@
public From<?, X> getCorrelationParent();
}
- private final Expression<Class<? extends X>> type;
- private Set<Join<X, ?>> joins;
- private Set<Fetch<X, ?>> fetches;
-
private JoinScope<X> joinScope = new JoinScope<X>() {
public void addJoin(Join<X, ?> join) {
if ( joins == null ) {
@@ -108,7 +109,7 @@
@SuppressWarnings({ "unchecked" })
protected FromImpl(CriteriaBuilderImpl criteriaBuilder, EntityType<X>
entityType) {
super( criteriaBuilder, entityType.getBindableJavaType(), null, null, entityType );
- this.type = new EntityTypeExpression( criteriaBuilder, entityType.getBindableJavaType()
);
+ this.typeExpression = new EntityTypeExpression( criteriaBuilder,
entityType.getBindableJavaType() );
}
/**
@@ -126,9 +127,9 @@
Class<X> javaType,
PathImpl<Z> origin,
Attribute<? super Z, ?> attribute,
- ManagedType<X> model) {
+ Bindable<X> model) {
super( criteriaBuilder, javaType, origin, attribute, model );
- this.type = new EntityTypeExpression( criteriaBuilder, model.getJavaType() );
+ this.typeExpression = new EntityTypeExpression( criteriaBuilder,
model.getBindableJavaType() );
}
protected void defineJoinScope(JoinScope<X> joinScope) {
@@ -137,7 +138,7 @@
@Override
public Expression<Class<? extends X>> type() {
- return type;
+ return typeExpression;
}
/**
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 2009-11-18
21:02:19 UTC (rev 18006)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/JoinImpl.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -27,6 +27,9 @@
import javax.persistence.criteria.JoinType;
import javax.persistence.metamodel.Attribute;
import javax.persistence.metamodel.ManagedType;
+import javax.persistence.metamodel.Bindable;
+import javax.persistence.metamodel.SingularAttribute;
+import javax.persistence.metamodel.EmbeddableType;
/**
* Models a non-collection property join.
@@ -56,7 +59,9 @@
javaType,
lhs,
joinProperty,
- criteriaBuilder.getEntityManagerFactory().getMetamodel().managedType( javaType )
+ ( Bindable<X> ) ( Attribute.PersistentAttributeType.EMBEDDED ==
joinProperty.getPersistentAttributeType()
+ ? joinProperty
+ : criteriaBuilder.getEntityManagerFactory().getMetamodel().managedType(
javaType ))
);
this.managedType = getManagedType();
this.joinType = joinType;
@@ -64,7 +69,10 @@
@SuppressWarnings({ "unchecked" })
protected ManagedType<X> getManagedType() {
- return (ManagedType<X>) getModel();
+ Bindable<X> model = getModel();
+ return Bindable.BindableType.ENTITY_TYPE == model.getBindableType()
+ ? (ManagedType<X>) model
+ : (EmbeddableType<X>) ( (SingularAttribute) model ).getType();
}
/**
Added:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/components/Client.java
===================================================================
---
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/components/Client.java
(rev 0)
+++
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/components/Client.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors. All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA\
+ */
+package org.hibernate.ejb.criteria.components;
+
+import java.io.Serializable;
+import javax.persistence.Embedded;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+/**
+ * The client domain entity
+ *
+ */
+@Entity
+public class Client implements Serializable {
+ private int id;
+ private Name name;
+
+ public Client() {
+ }
+
+ public Client(int id, Name name) {
+ this.id = id;
+ this.name = name;
+ }
+
+ public Client(int id, String firstName, String lastName) {
+ this( id, new Name( firstName, lastName ) );
+ }
+
+ @Id
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ @Embedded
+ public Name getName() {
+ return name;
+ }
+
+ public void setName(Name name) {
+ this.name = name;
+ }
+}
Added:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/components/ComponentCriteriaTest.java
===================================================================
---
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/components/ComponentCriteriaTest.java
(rev 0)
+++
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/components/ComponentCriteriaTest.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -0,0 +1,68 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors. All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+package org.hibernate.ejb.criteria.components;
+
+import java.util.List;
+import javax.persistence.EntityManager;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Root;
+
+import org.hibernate.ejb.test.TestCase;
+
+/**
+ *
+ * @author alan.oleary
+ */
+public class ComponentCriteriaTest extends TestCase {
+ public Class[] getAnnotatedClasses() {
+ return new Class[] { Client.class };
+ }
+
+ public void testEmbeddableInPath() {
+ EntityManager em = getOrCreateEntityManager();
+ em.getTransaction().begin();
+ Client client = new Client( 111, "steve", "ebersole" );
+ em.persist(client);
+ em.getTransaction().commit();
+ em.close();
+
+ em = getOrCreateEntityManager();
+ em.getTransaction().begin();
+ CriteriaBuilder cb = em.getCriteriaBuilder();
+ CriteriaQuery<Client> cq = cb.createQuery(Client.class);
+ Root<Client> root = cq.from(Client.class);
+ cq.where(cb.equal(root.get("name").get("firstName"),
client.getName().getFirstName()));
+ List<Client> list = em.createQuery(cq).getResultList();
+ assertEquals(1, list.size());
+ em.getTransaction().commit();
+ em.close();
+
+ em = getOrCreateEntityManager();
+ em.getTransaction().begin();
+ em.createQuery( "delete Client" ).executeUpdate();
+ em.getTransaction().commit();
+ em.close();
+ }
+}
Added:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/components/Name.java
===================================================================
---
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/components/Name.java
(rev 0)
+++
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/criteria/components/Name.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors. All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA\
+ */
+package org.hibernate.ejb.criteria.components;
+
+import java.io.Serializable;
+import javax.persistence.Embeddable;
+import javax.persistence.Column;
+
+/**
+ * The name component
+ *
+ * @author alan.oleary
+ */
+@Embeddable
+public class Name implements Serializable {
+ private static final long serialVersionUID = 8381969086665589013L;
+
+ private String firstName;
+ private String lastName;
+
+ public Name() {
+ }
+
+ public Name(String firstName, String lastName) {
+ this.firstName = firstName;
+ this.lastName = lastName;
+ }
+
+ @Column(name = "FIRST_NAME", nullable = false)
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ @Column(name = "LAST_NAME", nullable = false)
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+}
\ No newline at end of file
Modified:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Address.java
===================================================================
---
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Address.java 2009-11-18
21:02:19 UTC (rev 18006)
+++
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Address.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors. All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.ejb.test.metadata;
import javax.persistence.Embeddable;
Modified:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Flower.java
===================================================================
---
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Flower.java 2009-11-18
21:02:19 UTC (rev 18006)
+++
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Flower.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors. All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.ejb.test.metadata;
import javax.persistence.Entity;
Modified:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/FoodItem.java
===================================================================
---
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/FoodItem.java 2009-11-18
21:02:19 UTC (rev 18006)
+++
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/FoodItem.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors. All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.ejb.test.metadata;
import javax.persistence.Entity;
Modified:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Fridge.java
===================================================================
---
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Fridge.java 2009-11-18
21:02:19 UTC (rev 18006)
+++
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Fridge.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors. All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.ejb.test.metadata;
import javax.persistence.Entity;
Modified:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Garden.java
===================================================================
---
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Garden.java 2009-11-18
21:02:19 UTC (rev 18006)
+++
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Garden.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -1,6 +1,28 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors. All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.ejb.test.metadata;
-import java.util.Set;
import java.util.List;
import java.util.ArrayList;
import javax.persistence.Entity;
Modified:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/House.java
===================================================================
---
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/House.java 2009-11-18
21:02:19 UTC (rev 18006)
+++
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/House.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors. All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.ejb.test.metadata;
import java.io.Serializable;
Modified:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/MetadataTest.java
===================================================================
---
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/MetadataTest.java 2009-11-18
21:02:19 UTC (rev 18006)
+++
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/MetadataTest.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors. All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.ejb.test.metadata;
import java.util.Set;
Modified:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Person.java
===================================================================
---
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Person.java 2009-11-18
21:02:19 UTC (rev 18006)
+++
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Person.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors. All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.ejb.test.metadata;
import java.io.Serializable;
Modified:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Room.java
===================================================================
---
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Room.java 2009-11-18
21:02:19 UTC (rev 18006)
+++
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/Room.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors. All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.ejb.test.metadata;
import java.math.BigDecimal;
Modified:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/SubThing.java
===================================================================
---
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/SubThing.java 2009-11-18
21:02:19 UTC (rev 18006)
+++
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/SubThing.java 2009-11-18
22:13:03 UTC (rev 18007)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors. All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.ejb.test.metadata;
/**