Package org.hibernate.test.legacy

Examples of org.hibernate.test.legacy.Single


    s.save(simple, new Long(10) );
    Query q = s.createQuery("from Simple s where s.name=:name and s.count=:count");
    q.setProperties(simple);
    assertTrue( q.list().get(0)==simple );
    //misuse of "Single" as a propertyobject, but it was the first testclass i found with a collection ;)
    Single single = new Single() { // trivial hack to test properties with arrays.
      String[] getStuff() { return (String[]) getSeveral().toArray(new String[getSeveral().size()]); }
    };

    List l = new ArrayList();
    l.add("Simple 1");
    l.add("Slimeball");
    single.setSeveral(l);
    q = s.createQuery("from Simple s where s.name in (:several)");
    q.setProperties(single);
    assertTrue( q.list().get(0)==simple );

View Full Code Here


    s.save(simple, new Long(10) );
    Query q = s.createQuery("from Simple s where s.name=:name and s.count=:count");
    q.setProperties(simple);
    assertTrue( q.list().get(0)==simple );
    //misuse of "Single" as a propertyobject, but it was the first testclass i found with a collection ;)
    Single single = new Single() { // trivial hack to test properties with arrays.
      String[] getStuff() { return (String[]) getSeveral().toArray(new String[getSeveral().size()]); }
    };

    List l = new ArrayList();
    l.add("Simple 1");
    l.add("Slimeball");
    single.setSeveral(l);
    q = s.createQuery("from Simple s where s.name in (:several)");
    q.setProperties(single);
    assertTrue( q.list().get(0)==simple );

View Full Code Here

    s.save(simple, new Long(10) );
    Query q = s.createQuery("from Simple s where s.name=:name and s.count=:count");
    q.setProperties(simple);
    assertTrue( q.list().get(0)==simple );
    //misuse of "Single" as a propertyobject, but it was the first testclass i found with a collection ;)
    Single single = new Single() { // trivial hack to test properties with arrays.
      String[] getStuff() { return (String[]) getSeveral().toArray(new String[getSeveral().size()]); }
    };

    List l = new ArrayList();
    l.add("Simple 1");
    l.add("Slimeball");
    single.setSeveral(l);
    q = s.createQuery("from Simple s where s.name in (:several)");
    q.setProperties(single);
    assertTrue( q.list().get(0)==simple );

View Full Code Here

    s.save(simple, new Long(10) );
    Query q = s.createQuery("from Simple s where s.name=:name and s.count=:count");
    q.setProperties(simple);
    assertTrue( q.list().get(0)==simple );
    //misuse of "Single" as a propertyobject, but it was the first testclass i found with a collection ;)
    Single single = new Single() { // trivial hack to test properties with arrays.
      String[] getStuff() { return (String[]) getSeveral().toArray(new String[getSeveral().size()]); }
    };

    List l = new ArrayList();
    l.add("Simple 1");
    l.add("Slimeball");
    single.setSeveral(l);
    q = s.createQuery("from Simple s where s.name in (:several)");
    q.setProperties(single);
    assertTrue( q.list().get(0)==simple );

View Full Code Here

TOP

Related Classes of org.hibernate.test.legacy.Single

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.