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
This commit is contained in:
Steve Ebersole 2009-10-16 01:02:14 +00:00
parent 694a694d5d
commit ca85991589
4 changed files with 9 additions and 9 deletions

View File

@ -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<Wall> from = criteria.from( Wall.class );
ParameterExpression param = em.getQueryBuilder().parameter( String.class );
ParameterExpression param = em.getCriteriaBuilder().parameter( String.class );
SingularAttribute<? super Wall,?> 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();

View File

@ -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.
}

View File

@ -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<House,String,Room> roomsByName = entityType.getDeclaredMap(

View File

@ -175,7 +175,7 @@ public class JarVisitorTest extends TestCase {
}
/**
* @see EJB-230
* EJB-230
*/
public void testDuplicateFilterExplodedJarExpected() throws Exception {