From ca85991589fa9d57251835a000689931b631edee Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Fri, 16 Oct 2009 01:02:14 +0000 Subject: [PATCH] Update jpa-api to 2.0-cr-1 git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@17773 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- .../ejb/criteria/basic/BasicCriteriaUsageTest.java | 8 ++++---- .../ejb/test/connection/PersistenceUnitInfoImpl.java | 6 +++--- .../org/hibernate/ejb/test/metadata/MetadataTest.java | 2 +- .../org/hibernate/ejb/test/packaging/JarVisitorTest.java | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/entitymanager/src/test/java/org/hibernate/ejb/criteria/basic/BasicCriteriaUsageTest.java b/entitymanager/src/test/java/org/hibernate/ejb/criteria/basic/BasicCriteriaUsageTest.java index cd8478c19b..fce70549e7 100644 --- a/entitymanager/src/test/java/org/hibernate/ejb/criteria/basic/BasicCriteriaUsageTest.java +++ b/entitymanager/src/test/java/org/hibernate/ejb/criteria/basic/BasicCriteriaUsageTest.java @@ -44,7 +44,7 @@ public class BasicCriteriaUsageTest extends TestCase { public void testSimplestCriterias() { EntityManager em = getOrCreateEntityManager(); em.getTransaction().begin(); - CriteriaQuery criteria = em.getQueryBuilder().createQuery(); + CriteriaQuery criteria = em.getCriteriaBuilder().createQuery(); criteria.from( Wall.class ); em.getTransaction().commit(); em.close(); @@ -53,14 +53,14 @@ public class BasicCriteriaUsageTest extends TestCase { public void testParameterCollection() { EntityManager em = getOrCreateEntityManager(); em.getTransaction().begin(); - CriteriaQuery criteria = em.getQueryBuilder().createQuery(); + CriteriaQuery criteria = em.getCriteriaBuilder().createQuery(); Root from = criteria.from( Wall.class ); - ParameterExpression param = em.getQueryBuilder().parameter( String.class ); + ParameterExpression param = em.getCriteriaBuilder().parameter( String.class ); SingularAttribute colorAttribute = em.getMetamodel() .entity( Wall.class ) .getDeclaredSingularAttribute( "color" ); assertNotNull( "metamodel returned null singular attribute", colorAttribute ); - Predicate predicate = em.getQueryBuilder().equal( from.get( colorAttribute ), param ); + Predicate predicate = em.getCriteriaBuilder().equal( from.get( colorAttribute ), param ); criteria.where( predicate ); assertEquals( 1, criteria.getParameters().size() ); em.getTransaction().commit(); diff --git a/entitymanager/src/test/java/org/hibernate/ejb/test/connection/PersistenceUnitInfoImpl.java b/entitymanager/src/test/java/org/hibernate/ejb/test/connection/PersistenceUnitInfoImpl.java index e92f28cab8..8ffc826ba8 100644 --- a/entitymanager/src/test/java/org/hibernate/ejb/test/connection/PersistenceUnitInfoImpl.java +++ b/entitymanager/src/test/java/org/hibernate/ejb/test/connection/PersistenceUnitInfoImpl.java @@ -8,7 +8,7 @@ import java.util.Properties; import javax.persistence.spi.ClassTransformer; import javax.persistence.spi.PersistenceUnitInfo; import javax.persistence.spi.PersistenceUnitTransactionType; -import javax.persistence.Caching; +import javax.persistence.SharedCacheMode; import javax.persistence.ValidationMode; import javax.sql.DataSource; @@ -73,7 +73,7 @@ public class PersistenceUnitInfoImpl implements PersistenceUnitInfo { return properties; } - public String PersistenceXMLSchemaVersion() { + public String getPersistenceXMLSchemaVersion() { return null; //To change body of implemented methods use File | Settings | File Templates. } @@ -93,7 +93,7 @@ public class PersistenceUnitInfoImpl implements PersistenceUnitInfo { return true; } - public Caching getCaching() { + public SharedCacheMode getSharedCacheMode() { //FIXME return null; //To change body of implemented methods use File | Settings | File Templates. } diff --git a/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/MetadataTest.java b/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/MetadataTest.java index 1a5ef21c60..3501314e28 100644 --- a/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/MetadataTest.java +++ b/entitymanager/src/test/java/org/hibernate/ejb/test/metadata/MetadataTest.java @@ -131,7 +131,7 @@ public class MetadataTest extends TestCase { assertEquals( Bindable.BindableType.PLURAL_ATTRIBUTE, rooms.getBindableType() ); assertEquals( Set.class, rooms.getJavaType() ); assertEquals( PluralAttribute.CollectionType.SET, rooms.getCollectionType() ); - assertEquals( 3, entityType.getDeclaredCollections().size() ); + assertEquals( 3, entityType.getDeclaredPluralAttributes().size() ); assertEquals( Type.PersistenceType.EMBEDDABLE, rooms.getElementType().getPersistenceType() ); final MapAttribute roomsByName = entityType.getDeclaredMap( diff --git a/entitymanager/src/test/java/org/hibernate/ejb/test/packaging/JarVisitorTest.java b/entitymanager/src/test/java/org/hibernate/ejb/test/packaging/JarVisitorTest.java index c60915f124..74060804dc 100644 --- a/entitymanager/src/test/java/org/hibernate/ejb/test/packaging/JarVisitorTest.java +++ b/entitymanager/src/test/java/org/hibernate/ejb/test/packaging/JarVisitorTest.java @@ -175,7 +175,7 @@ public class JarVisitorTest extends TestCase { } /** - * @see EJB-230 + * EJB-230 */ public void testDuplicateFilterExplodedJarExpected() throws Exception {