db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattba...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/odmg OQLTest.java
Date Tue, 24 Jun 2003 20:49:48 GMT
mattbaird    2003/06/24 13:49:48

  Modified:    src/java/org/apache/ojb/odmg/oql oql-ojb.g
               src/test/org/apache/ojb/odmg OQLTest.java
  Log:
  add "in list" functionality to OQL parser. also fixed the OQLTest to delete the results
prior to testing
  
  Revision  Changes    Path
  1.13      +6 -0      db-ojb/src/java/org/apache/ojb/odmg/oql/oql-ojb.g
  
  Index: oql-ojb.g
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/oql/oql-ojb.g,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- oql-ojb.g	15 Mar 2003 16:39:25 -0000	1.12
  +++ oql-ojb.g	24 Jun 2003 20:49:48 -0000	1.13
  @@ -596,6 +596,10 @@
               { negative = true; }
           )?
           "in"
  +        (
  +            "list"
  +            {}
  +        )?
           coll = argList
   
           {
  @@ -606,6 +610,8 @@
               }
           }
       ;
  +
  +    
   
   betweenExpr[Criteria criteria] :
   
  
  
  
  1.10      +304 -363  db-ojb/src/test/org/apache/ojb/odmg/OQLTest.java
  
  Index: OQLTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/OQLTest.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- OQLTest.java	8 Apr 2003 16:51:25 -0000	1.9
  +++ OQLTest.java	24 Jun 2003 20:49:48 -0000	1.10
  @@ -8,378 +8,319 @@
    */
   package org.apache.ojb.odmg;
   
  -import java.util.ArrayList;
  -import java.util.Collection;
  -import java.util.List;
  -
   import junit.framework.TestCase;
  -import org.apache.ojb.broker.Fish;
  -import org.apache.ojb.broker.InterfaceAnimal;
  -import org.apache.ojb.broker.InterfaceFood;
  -import org.apache.ojb.broker.Mammal;
  -import org.apache.ojb.broker.ManageableCollection;
  -import org.apache.ojb.broker.Reptile;
  -import org.apache.ojb.broker.Salad;
  -import org.apache.ojb.broker.TestHelper;
  +import org.apache.ojb.broker.*;
   import org.odmg.Database;
   import org.odmg.Implementation;
  -import org.odmg.ODMGException;
   import org.odmg.OQLQuery;
   import org.odmg.Transaction;
   
  +import java.util.ArrayList;
  +import java.util.Collection;
  +import java.util.Iterator;
  +import java.util.List;
  +
   public class OQLTest extends TestCase
   {
   
  -    private static Class CLASS = OQLTest.class;
  -    private String databaseName;
  -    private int COUNT = 10;
  -    private int id_filter = 2;
  -
  -    public static void main(String[] args)
  -    {
  -        String[] arr = {CLASS.getName()};
  -        junit.textui.TestRunner.main(arr);
  -    }
  -
  -    /**
  -     * Insert the method's description here.
  -     * Creation date: (06.12.2000 21:58:53)
  -     */
  -    public void setUp()
  -    {
  -        databaseName = TestHelper.DEF_DATABASE_NAME;
  -    }
  -
  -    /**
  -     * Insert the method's description here.
  -     * Creation date: (06.12.2000 21:59:14)
  -     */
  -    public void tearDown()
  -    {
  -        databaseName = null;
  -    }
  -
  -    public OQLTest(String name)
  -    {
  -        super(name);
  -    }
  -
  -    private void createData(Database db, Implementation odmg)
  -            throws Exception
  -    {
  +	private static Class CLASS = OQLTest.class;
  +	private String databaseName;
  +	private int COUNT = 10;
  +	private int id_filter = 2;
  +
  +	public static void main(String[] args)
  +	{
  +		String[] arr = {CLASS.getName()};
  +		junit.textui.TestRunner.main(arr);
  +	}
  +
  +	/**
  +	 * Insert the method's description here.
  +	 * Creation date: (06.12.2000 21:58:53)
  +	 */
  +	public void setUp()
  +	{
  +		databaseName = TestHelper.DEF_DATABASE_NAME;
  +	}
  +
  +	/**
  +	 * Insert the method's description here.
  +	 * Creation date: (06.12.2000 21:59:14)
  +	 */
  +	public void tearDown()
  +	{
  +		databaseName = null;
  +	}
  +
  +	public OQLTest(String name)
  +	{
  +		super(name);
  +	}
  +
  +	private void createData(Database db, Implementation odmg)
  +			throws Exception
  +	{
   //        Implementation odmg = OJB.getInstance();
  -        Transaction tx = odmg.newTransaction();
  +		Transaction tx = odmg.newTransaction();
   //        db.open(databaseName, Database.OPEN_READ_WRITE);
  -        tx.begin();
  -        for (int i = 0; i < COUNT; i++)
  -        {
  -            org.apache.ojb.broker.Person aPerson = new org.apache.ojb.broker.Person();
  -            aPerson.setId(i);
  -            aPerson.setFirstname("firstname" + i);
  -            aPerson.setLastname("lastname" + i);
  -            db.makePersistent(aPerson);
  -        }
  -        tx.commit();
  -
  -    }
  -
  -    /**
  -     * test the following conditions:
  -     * != support
  -     * literal support at binding.
  -     * A prior bug where criteria was reporting as bindable when it was in fact a literal.
  -     */
  -    public void testGetWithLiteral() throws Exception
  -    {
  -        Implementation odmg = OJB.getInstance();
  -        Database db = odmg.newDatabase();
  -        db.open(databaseName, Database.OPEN_READ_WRITE);
  -        try
  -        {
  -            createData(db, odmg);
  -
  -            // 3. Get a list of some articles
  -            Transaction tx = odmg.newTransaction();
  -            tx.begin();
  -
  -            OQLQuery query = odmg.newOQLQuery();
  -            String sql = "select allPersons from " + org.apache.ojb.broker.Person.class.getName()
+ " where id != 5 and id > $1";
  -            query.create(sql);
  -            query.bind(new Integer(id_filter));
  -
  -            ManageableCollection allPersons = (ManageableCollection) query.execute();
  -
  -            // Iterator over the restricted articles objects
  -            java.util.Iterator it = allPersons.ojbIterator();
  -
  -            while (it.hasNext())
  -            {
  -                /**
  -                 * just make sure it's a string.
  -                 */
  -                org.apache.ojb.broker.Person value = (org.apache.ojb.broker.Person) it.next();
  -                if (value.getId() <= id_filter)
  -                    fail("oql didn't filter, got id (" + value.getId() + " where it should
have been over " + id_filter);
  -            }
  -            tx.commit();
  -        }
  -        catch (Throwable t)
  -        {
  -            t.printStackTrace(System.out);
  -            fail("testGetAllUnrestricted: " + t.getMessage());
  -        }
  -    }
  -
  -    public void testQueryIn()
  -    {
  -        Implementation odmg = OJB.getInstance();
  -        Database db = odmg.newDatabase();
  -        try
  -        {
  -            db.open(databaseName, Database.OPEN_READ_WRITE);
  -        }
  -        catch (ODMGException ex)
  -        {
  -            fail("ODMGException: " + ex.getMessage());
  -        }
  -        Transaction tx = odmg.newTransaction();
  -
  -        try
  -        {
  -            tx.begin();
  -
  -            OQLQuery query1 = odmg.newOQLQuery();
  -            query1.create("select anArticle from " + Article.class.getName() + " where
articleId in(30, 31, 32) order by articleId");
  -            List result1 = (List) query1.execute();
  -
  -			Collection ids = new ArrayList();
  -			ids.add(new Integer(30));
  -            ids.add(new Integer(31));
  -            ids.add(new Integer(32));
  -            OQLQuery query2 = odmg.newOQLQuery();
  -            query2.create("select anArticle from " + Article.class.getName() + " where
articleId in($1) order by articleId");
  -            query2.bind(ids);
  -            List result2 = (List) query2.execute();
  -
  -			assertEquals(result1.size(),result2.size());
  -            tx.commit();
  -        }
  -        catch (Exception ex)
  -        {
  -            tx.abort();
  -            fail("ODMGException: " + ex.getMessage());
  -        }
  -
  -        try
  -        {
  -            db.close();
  -        }
  -        catch (ODMGException ex)
  -        {
  -            fail("ODMGException: " + ex.getMessage());
  -        }
  -    }
  -
  -    public void testQueryNull()
  -    {
  -        Implementation odmg = OJB.getInstance();
  -        Database db = odmg.newDatabase();
  -        try
  -        {
  -            db.open(databaseName, Database.OPEN_READ_WRITE);
  -        }
  -        catch (ODMGException ex)
  -        {
  -            fail("ODMGException: " + ex.getMessage());
  -        }
  -        Transaction tx = odmg.newTransaction();
  -
  -        try
  -        {
  -            tx.begin();
  -
  -            OQLQuery query1 = odmg.newOQLQuery();
  -            query1.create("select anArticle from " + Article.class.getName() + " where
is_undefined(articleName)");
  -            List result1 = (List) query1.execute();
  -
  -            OQLQuery query2 = odmg.newOQLQuery();
  -            query2.create("select anArticle from " + Article.class.getName() + " where
articleName = nil");
  -            List result2 = (List) query2.execute();
  -
  -			assertEquals(result1.size(),result2.size());
  -            tx.commit();
  -        }
  -        catch (Exception ex)
  -        {
  -            tx.abort();
  -            fail("ODMGException: " + ex.getMessage());
  -        }
  -
  -        try
  -        {
  -            db.close();
  -        }
  -        catch (ODMGException ex)
  -        {
  -            fail("ODMGException: " + ex.getMessage());
  -        }
  -    }
  -
  -    public void testQueryNotNull()
  -    {
  -        Implementation odmg = OJB.getInstance();
  -        Database db = odmg.newDatabase();
  -        try
  -        {
  -            db.open(databaseName, Database.OPEN_READ_WRITE);
  -        }
  -        catch (ODMGException ex)
  -        {
  -            fail("ODMGException: " + ex.getMessage());
  -        }
  -        Transaction tx = odmg.newTransaction();
  -
  -        try
  -        {
  -            tx.begin();
  -
  -            OQLQuery query1 = odmg.newOQLQuery();
  -            query1.create("select anArticle from " + Article.class.getName() + " where
is_defined(articleName)");
  -            List result1 = (List) query1.execute();
  -
  -            OQLQuery query2 = odmg.newOQLQuery();
  -            query2.create("select anArticle from " + Article.class.getName() + " where
articleName <> nil");
  -            List result2 = (List) query2.execute();
  -
  -			assertEquals(result1.size(),result2.size());
  -            tx.commit();
  -        }
  -        catch (Exception ex)
  -        {
  -            tx.abort();
  -            fail("ODMGException: " + ex.getMessage());
  -        }
  -
  -        try
  -        {
  -            db.close();
  -        }
  -        catch (ODMGException ex)
  -        {
  -            fail("ODMGException: " + ex.getMessage());
  -        }
  -    }
  -
  -    public void testQueryBetween()
  -    {
  -        Implementation odmg = OJB.getInstance();
  -        Database db = odmg.newDatabase();
  -
  -        try
  -        {
  -            db.open(databaseName, Database.OPEN_READ_WRITE);
  -        }
  -        catch (ODMGException ex)
  -        {
  -            fail("ODMGException: " + ex.getMessage());
  -        }
  -        Transaction tx = odmg.newTransaction();
  -
  -        try
  -        {
  -            tx.begin();
  -
  -            OQLQuery query1 = odmg.newOQLQuery();
  -            query1.create("select anArticle from " + Article.class.getName() + " where
articleId between 30 and 32 order by articleId desc");
  -            List result1 = (List) query1.execute();
  -
  -            OQLQuery query2 = odmg.newOQLQuery();
  -            query2.create("select anArticle from " + Article.class.getName() + " where
articleId between $1 and $2 order by articleId asc");
  -            query2.bind(new Integer(30));
  -            query2.bind(new Integer(32));
  -            List result2 = (List) query2.execute();
  -
  -			assertEquals(result1.size(),result2.size());
  -            tx.commit();
  -        }
  -        catch (Exception ex)
  -        {
  -            tx.abort();
  -            fail("ODMGException: " + ex.getMessage());
  -        }
  -
  -        try
  -        {
  -            db.close();
  -        }
  -        catch (ODMGException ex)
  -        {
  -            fail("ODMGException: " + ex.getMessage());
  -        }
  -    }
  -
  -    public void testInterfaceQuery()
  -    {
  -        //objects that are part of a 1:n relation, i.e. they have fk-fields
  -        Mammal elephant = new Mammal(4, "Jumbo", 4);
  -        Mammal cat = new Mammal(4, "Silvester", 4);
  -        Reptile snake = new Reptile(4, "Kaa", "green");
  -
  -        //objects that are independent or part of m:n relations, i.e. they
  -        //don't have fk-fields
  -        Fish tuna = new Fish("tuna", 1000, "salt");
  -        Fish trout = new Fish("trout", 1000, "fresh water");
  -
  -        Salad radiccio = new Salad("Radiccio", 1000, "red");
  -        Salad lolloverde = new Salad("Lollo verde", 7, "green");
  -
  -
  -        Implementation odmg = OJB.getInstance();
  -
  -
  -        try
  -        {
  -            Database db = odmg.newDatabase();
  -            db.open(databaseName, Database.OPEN_READ_WRITE);
  -            Transaction tx = odmg.newTransaction();
  -            tx.begin();
  -            db.makePersistent(elephant);
  -            db.makePersistent(cat);
  -            db.makePersistent(snake);
  -
  -
  -            db.makePersistent(tuna);
  -            db.makePersistent(trout);
  -            db.makePersistent(radiccio);
  -            db.makePersistent(lolloverde);
  -            tx.commit();
  -
  -
  -            tx = odmg.newTransaction();
  -            tx.begin();
  -            OQLQuery query = odmg.newOQLQuery();
  -            query.create("select animals from " + InterfaceAnimal.class.getName() +
  -                    " where age=$1");
  -            query.bind(new Integer(4));
  -            List animals = (List) query.execute();
  -            tx.commit();
  -            assertEquals(3, animals.size());
  -
  -
  -            //test independent objects
  -            query = odmg.newOQLQuery();
  -            tx.begin();
  -            query.create("select food from " + InterfaceFood.class.getName() +
  -                    " where calories=$1");
  -            query.bind(new Integer(1000));
  -            List food = (List) query.execute();
  -            tx.commit();
  -            assertEquals(3, food.size());
  -        }
  -        catch (ODMGException e)
  -        {
  -            e.printStackTrace();
  -            fail("ODMGException thrown " + e.getMessage());
  -        }
  -    }
  +		tx.begin();
  +		for (int i = 0; i < COUNT; i++)
  +		{
  +			org.apache.ojb.broker.Person aPerson = new org.apache.ojb.broker.Person();
  +			aPerson.setId(i);
  +			aPerson.setFirstname("firstname" + i);
  +			aPerson.setLastname("lastname" + i);
  +			db.makePersistent(aPerson);
  +		}
  +		tx.commit();
  +
  +	}
  +
  +	private void deleteData(Database db, Implementation odmg)
  +			throws Exception
  +	{
  +		Transaction tx = odmg.newTransaction();
  +		tx.begin();
  +		OQLQuery query = odmg.newOQLQuery();
  +		query.create("select allAnimals from " + InterfaceAnimal.class.getName());
  +		Collection allAnimals = (Collection) query.execute();
  +		Iterator it = allAnimals.iterator();
  +		while (it.hasNext())
  +		{
  +			db.deletePersistent(it.next());
  +		}
  +		tx.commit();
  +		allAnimals = (Collection) query.execute();
  +		System.out.println("animals is: " + allAnimals.size());
  +		assertTrue("should be no animals", (allAnimals.size() ==0));
  +	}
  +
  +	/**
  +	 * test the following conditions:
  +	 * != support
  +	 * literal support at binding.
  +	 * A prior bug where criteria was reporting as bindable when it was in fact a literal.
  +	 */
  +	public void testGetWithLiteral() throws Exception
  +	{
  +		Implementation odmg = OJB.getInstance();
  +		Database db = odmg.newDatabase();
  +		db.open(databaseName, Database.OPEN_READ_WRITE);
  +		try
  +		{
  +			createData(db, odmg);
  +
  +			// 3. Get a list of some articles
  +			Transaction tx = odmg.newTransaction();
  +			tx.begin();
  +
  +			OQLQuery query = odmg.newOQLQuery();
  +			String sql = "select allPersons from " + org.apache.ojb.broker.Person.class.getName()
+ " where id != 5 and id > $1";
  +			query.create(sql);
  +			query.bind(new Integer(id_filter));
  +
  +			ManageableCollection allPersons = (ManageableCollection) query.execute();
  +
  +			// Iterator over the restricted articles objects
  +			java.util.Iterator it = allPersons.ojbIterator();
  +
  +			while (it.hasNext())
  +			{
  +				/**
  +				 * just make sure it's a string.
  +				 */
  +				org.apache.ojb.broker.Person value = (org.apache.ojb.broker.Person) it.next();
  +				if (value.getId() <= id_filter)
  +					fail("oql didn't filter, got id (" + value.getId() + " where it should have been over
" + id_filter);
  +			}
  +			tx.commit();
  +		}
  +		catch (Throwable t)
  +		{
  +			t.printStackTrace(System.out);
  +			fail("testGetAllUnrestricted: " + t.getMessage());
  +		}
  +	}
  +
  +	public void testQueryIn() throws Exception
  +	{
  +		Implementation odmg = OJB.getInstance();
  +		Database db = odmg.newDatabase();
  +		db.open(databaseName, Database.OPEN_READ_WRITE);
  +		deleteData(db, odmg);
  +
  +		Transaction tx = odmg.newTransaction();
  +		tx.begin();
  +
  +		OQLQuery query1 = odmg.newOQLQuery();
  +		query1.create("select anArticle from " + Article.class.getName() + " where articleId
in(30, 31, 32) order by articleId");
  +		List result1 = (List) query1.execute();
  +
  +		Collection ids = new ArrayList();
  +		ids.add(new Integer(30));
  +		ids.add(new Integer(31));
  +		ids.add(new Integer(32));
  +		OQLQuery query2 = odmg.newOQLQuery();
  +		query2.create("select anArticle from " + Article.class.getName() + " where articleId
in($1) order by articleId");
  +		query2.bind(ids);
  +		List result2 = (List) query2.execute();
  +
  +		assertEquals(result1.size(), result2.size());
  +		tx.commit();
  +		db.close();
  +	}
  +
  +	public void testQueryNull() throws Exception
  +	{
  +		Implementation odmg = OJB.getInstance();
  +		Database db = odmg.newDatabase();
  +		db.open(databaseName, Database.OPEN_READ_WRITE);
  +		Transaction tx = odmg.newTransaction();
  +		tx.begin();
  +
  +		OQLQuery query1 = odmg.newOQLQuery();
  +		query1.create("select anArticle from " + Article.class.getName() + " where is_undefined(articleName)");
  +		List result1 = (List) query1.execute();
  +
  +		OQLQuery query2 = odmg.newOQLQuery();
  +		query2.create("select anArticle from " + Article.class.getName() + " where articleName
= nil");
  +		List result2 = (List) query2.execute();
  +
  +		assertEquals(result1.size(), result2.size());
  +		tx.commit();
  +
  +		db.close();
  +	}
  +
  +	public void testQueryNotNull() throws Exception
  +	{
  +		Implementation odmg = OJB.getInstance();
  +		Database db = odmg.newDatabase();
  +		db.open(databaseName, Database.OPEN_READ_WRITE);
  +		Transaction tx = odmg.newTransaction();
  +		tx.begin();
  +
  +		OQLQuery query1 = odmg.newOQLQuery();
  +		query1.create("select anArticle from " + Article.class.getName() + " where is_defined(articleName)");
  +		List result1 = (List) query1.execute();
  +
  +		OQLQuery query2 = odmg.newOQLQuery();
  +		query2.create("select anArticle from " + Article.class.getName() + " where articleName
<> nil");
  +		List result2 = (List) query2.execute();
  +
  +		assertEquals(result1.size(), result2.size());
  +		tx.commit();
  +
  +		db.close();
  +	}
  +
  +	public void testQueryBetween() throws Exception
  +	{
  +		Implementation odmg = OJB.getInstance();
  +		Database db = odmg.newDatabase();
  +		db.open(databaseName, Database.OPEN_READ_WRITE);
  +		Transaction tx = odmg.newTransaction();
  +
  +		tx.begin();
  +
  +		OQLQuery query1 = odmg.newOQLQuery();
  +		query1.create("select anArticle from " + Article.class.getName() + " where articleId
between 30 and 32 order by articleId desc");
  +		List result1 = (List) query1.execute();
  +
  +		OQLQuery query2 = odmg.newOQLQuery();
  +		query2.create("select anArticle from " + Article.class.getName() + " where articleId
between $1 and $2 order by articleId asc");
  +		query2.bind(new Integer(30));
  +		query2.bind(new Integer(32));
  +		List result2 = (List) query2.execute();
  +
  +		assertEquals(result1.size(), result2.size());
  +		tx.commit();
  +
  +		db.close();
  +	}
  +
  +	public void testInListQuery() throws Exception
  +	{
  +		//objects that are part of a 1:n relation, i.e. they have fk-fields
  +		Mammal elephant = new Mammal(4, "Minnie", 4);
  +		Mammal cat = new Mammal(4, "Winston", 4);
  +		Reptile snake = new Reptile(4, "Skuzzlebutt", "green");
  +		Implementation odmg = OJB.getInstance();
  +
  +		Database db = odmg.newDatabase();
  +		db.open(databaseName, Database.OPEN_READ_WRITE);
  +		Transaction tx = odmg.newTransaction();
  +		tx.begin();
  +		db.makePersistent(elephant);
  +		db.makePersistent(cat);
  +		db.makePersistent(snake);
  +		tx.commit();
  +
  +		tx = odmg.newTransaction();
  +		tx.begin();
  +		OQLQuery query = odmg.newOQLQuery();
  +		query.create("select animals from " + InterfaceAnimal.class.getName() +
  +					 " where name in list (\"Minnie\", \"Winston\", \"Skuzzlebutt\")");
  +		List animals = (List) query.execute();
  +		tx.commit();
  +		assertEquals(3, animals.size());
  +	}
  +
  +	public void testInterfaceQuery() throws Exception
  +	{
  +		//objects that are part of a 1:n relation, i.e. they have fk-fields
  +		Mammal elephant = new Mammal(4, "Jumbo", 4);
  +		Mammal cat = new Mammal(4, "Silvester", 4);
  +		Reptile snake = new Reptile(4, "Kaa", "green");
  +
  +		//objects that are independent or part of m:n relations, i.e. they
  +		//don't have fk-fields
  +		Fish tuna = new Fish("tuna", 1000, "salt");
  +		Fish trout = new Fish("trout", 1000, "fresh water");
  +
  +		Salad radiccio = new Salad("Radiccio", 1000, "red");
  +		Salad lolloverde = new Salad("Lollo verde", 7, "green");
  +
  +		Implementation odmg = OJB.getInstance();
  +		Database db = odmg.newDatabase();
  +		db.open(databaseName, Database.OPEN_READ_WRITE);
  +		deleteData(db,odmg);
  +		Transaction tx = odmg.newTransaction();
  +		tx.begin();
  +		db.makePersistent(elephant);
  +		db.makePersistent(cat);
  +		db.makePersistent(snake);
  +
  +
  +		db.makePersistent(tuna);
  +		db.makePersistent(trout);
  +		db.makePersistent(radiccio);
  +		db.makePersistent(lolloverde);
  +		tx.commit();
  +
  +		tx = odmg.newTransaction();
  +		tx.begin();
  +		OQLQuery query = odmg.newOQLQuery();
  +		query.create("select animals from " + InterfaceAnimal.class.getName() +
  +					 " where age=$1");
  +		query.bind(new Integer(4));
  +		List animals = (List) query.execute();
  +		tx.commit();
  +		Iterator it = animals.iterator();
  +		while (it.hasNext())
  +		{
  +			System.out.println(it.next());
  +		}
  +		assertEquals(3, animals.size());
  +
  +		//test independent objects
  +		query = odmg.newOQLQuery();
  +		tx.begin();
  +		query.create("select food from " + InterfaceFood.class.getName() +
  +					 " where calories=$1");
  +		query.bind(new Integer(1000));
  +		List food = (List) query.execute();
  +		tx.commit();
  +		assertEquals(3, food.size());
  +	}
   }
  
  
  

Mime
View raw message