Package org.hibernate.classic

Examples of org.hibernate.classic.Session.find()


    if ( (getDialect() instanceof DB2Dialect) && !(getDialect() instanceof DerbyDialect) ) {
      s.find("from Foo foo where lower( foo.foo.string ) = 'foo'");
      s.find("from Foo foo where lower( (foo.foo.string || 'foo') || 'bar' ) = 'foo'");
      s.find("from Foo foo where repeat( (foo.foo.string || 'foo') || 'bar', 2 ) = 'foo'");
      s.find("from Bar foo where foo.foo.integer is not null and repeat( (foo.foo.string || 'foo') || 'bar', (5+5)/2 ) = 'foo'");
      s.find("from Bar foo where foo.foo.integer is not null or repeat( (foo.foo.string || 'foo') || 'bar', (5+5)/2 ) = 'foo'");
    }
    if (getDialect() instanceof SybaseDialect) { 
      s.iterate("select baz from Baz as baz join baz.fooArray foo group by baz order by sum(foo.float)");
    }
View Full Code Here


    if ( (getDialect() instanceof DB2Dialect) && !(getDialect() instanceof DerbyDialect) ) {
      s.find("from Foo foo where lower( foo.foo.string ) = 'foo'");
      s.find("from Foo foo where lower( (foo.foo.string || 'foo') || 'bar' ) = 'foo'");
      s.find("from Foo foo where repeat( (foo.foo.string || 'foo') || 'bar', 2 ) = 'foo'");
      s.find("from Bar foo where foo.foo.integer is not null and repeat( (foo.foo.string || 'foo') || 'bar', (5+5)/2 ) = 'foo'");
      s.find("from Bar foo where foo.foo.integer is not null or repeat( (foo.foo.string || 'foo') || 'bar', (5+5)/2 ) = 'foo'");
    }
    if (getDialect() instanceof SybaseDialect) { 
      s.iterate("select baz from Baz as baz join baz.fooArray foo group by baz order by sum(foo.float)");
    }
View Full Code Here

    }
    if (getDialect() instanceof SybaseDialect) { 
      s.iterate("select baz from Baz as baz join baz.fooArray foo group by baz order by sum(foo.float)");
    }

    s.find("from Foo as foo where foo.component.glarch.name is not null");
    s.find("from Foo as foo left outer join foo.component.glarch as glarch where glarch.name = 'foo'");

    list = s.find("from Foo");
    assertTrue( list.size()==2 && list.get(0) instanceof FooProxy );
    list = s.find("from Foo foo left outer join foo.foo");
View Full Code Here

    if (getDialect() instanceof SybaseDialect) { 
      s.iterate("select baz from Baz as baz join baz.fooArray foo group by baz order by sum(foo.float)");
    }

    s.find("from Foo as foo where foo.component.glarch.name is not null");
    s.find("from Foo as foo left outer join foo.component.glarch as glarch where glarch.name = 'foo'");

    list = s.find("from Foo");
    assertTrue( list.size()==2 && list.get(0) instanceof FooProxy );
    list = s.find("from Foo foo left outer join foo.foo");
    assertTrue( list.size()==2 && ( (Object[]) list.get(0) )[0] instanceof FooProxy );
View Full Code Here

    }

    s.find("from Foo as foo where foo.component.glarch.name is not null");
    s.find("from Foo as foo left outer join foo.component.glarch as glarch where glarch.name = 'foo'");

    list = s.find("from Foo");
    assertTrue( list.size()==2 && list.get(0) instanceof FooProxy );
    list = s.find("from Foo foo left outer join foo.foo");
    assertTrue( list.size()==2 && ( (Object[]) list.get(0) )[0] instanceof FooProxy );

    s.createQuery("from Bar, Bar").list();
View Full Code Here

    s.find("from Foo as foo where foo.component.glarch.name is not null");
    s.find("from Foo as foo left outer join foo.component.glarch as glarch where glarch.name = 'foo'");

    list = s.find("from Foo");
    assertTrue( list.size()==2 && list.get(0) instanceof FooProxy );
    list = s.find("from Foo foo left outer join foo.foo");
    assertTrue( list.size()==2 && ( (Object[]) list.get(0) )[0] instanceof FooProxy );

    s.createQuery("from Bar, Bar").list();
    s.createQuery("from Foo, Bar").list();
    s.find("from Baz baz left join baz.fooToGlarch, Bar bar join bar.foo");
View Full Code Here

    list = s.find("from Foo foo left outer join foo.foo");
    assertTrue( list.size()==2 && ( (Object[]) list.get(0) )[0] instanceof FooProxy );

    s.createQuery("from Bar, Bar").list();
    s.createQuery("from Foo, Bar").list();
    s.find("from Baz baz left join baz.fooToGlarch, Bar bar join bar.foo");
    s.find("from Baz baz left join baz.fooToGlarch join baz.fooSet");
    s.find("from Baz baz left join baz.fooToGlarch join fetch baz.fooSet foo left join fetch foo.foo");

    list = s.find("from Foo foo where foo.string='osama bin laden' and foo.boolean = true order by foo.string asc, foo.component.count desc");
    assertTrue( "empty query", list.size()==0 );
View Full Code Here

    assertTrue( list.size()==2 && ( (Object[]) list.get(0) )[0] instanceof FooProxy );

    s.createQuery("from Bar, Bar").list();
    s.createQuery("from Foo, Bar").list();
    s.find("from Baz baz left join baz.fooToGlarch, Bar bar join bar.foo");
    s.find("from Baz baz left join baz.fooToGlarch join baz.fooSet");
    s.find("from Baz baz left join baz.fooToGlarch join fetch baz.fooSet foo left join fetch foo.foo");

    list = s.find("from Foo foo where foo.string='osama bin laden' and foo.boolean = true order by foo.string asc, foo.component.count desc");
    assertTrue( "empty query", list.size()==0 );
    Iterator iter = s.iterate("from Foo foo where foo.string='osama bin laden' order by foo.string asc, foo.component.count desc");
View Full Code Here

    s.createQuery("from Bar, Bar").list();
    s.createQuery("from Foo, Bar").list();
    s.find("from Baz baz left join baz.fooToGlarch, Bar bar join bar.foo");
    s.find("from Baz baz left join baz.fooToGlarch join baz.fooSet");
    s.find("from Baz baz left join baz.fooToGlarch join fetch baz.fooSet foo left join fetch foo.foo");

    list = s.find("from Foo foo where foo.string='osama bin laden' and foo.boolean = true order by foo.string asc, foo.component.count desc");
    assertTrue( "empty query", list.size()==0 );
    Iterator iter = s.iterate("from Foo foo where foo.string='osama bin laden' order by foo.string asc, foo.component.count desc");
    assertTrue( "empty iterator", !iter.hasNext() );
View Full Code Here

    s.createQuery("from Foo, Bar").list();
    s.find("from Baz baz left join baz.fooToGlarch, Bar bar join bar.foo");
    s.find("from Baz baz left join baz.fooToGlarch join baz.fooSet");
    s.find("from Baz baz left join baz.fooToGlarch join fetch baz.fooSet foo left join fetch foo.foo");

    list = s.find("from Foo foo where foo.string='osama bin laden' and foo.boolean = true order by foo.string asc, foo.component.count desc");
    assertTrue( "empty query", list.size()==0 );
    Iterator iter = s.iterate("from Foo foo where foo.string='osama bin laden' order by foo.string asc, foo.component.count desc");
    assertTrue( "empty iterator", !iter.hasNext() );

    list = s.find("select foo.foo from Foo foo");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.