Examples of Example


Examples of org.hibernate.criterion.Example

        Session s = openSession();

        Transaction t = s.beginTransaction();
        Componentizable master = getMaster("hibernate", "open sourc%", "open source1");
        Criteria crit = s.createCriteria(Componentizable.class);
        Example ex = Example.create(master).enableLike();
        crit.add(ex);
        List result = crit.list();
        assertNotNull(result);
        assertEquals(1, result.size());
View Full Code Here

Examples of org.hibernate.criterion.Example

        initData();
        Session s = openSession();
        Transaction t = s.beginTransaction();
        Componentizable master = getMaster("hibernate", null, "ope%");
        Criteria crit = s.createCriteria(Componentizable.class);
        Example ex = Example.create(master).enableLike();

        crit.add(Expression.or(Expression.not(ex), ex));

        List result = crit.list();
        assertNotNull(result);
View Full Code Here

Examples of org.openiaml.docs.modeldoc.Example

        } else {
          jc = ((JavaMethod) reference).getJavaClass();
        }

        // make an inference semantics link
        Example example = factory.createExample();
        example.setDescription(description);
        example.setReference(reference);
       
        // make a new ModelReference
        ModelReference ref = factory.createModelReference();
        ref.setPlugin(jc.getPlugin());
        ref.setPackage(jc.getPackage());
        ref.setName(jc.getName());
        root.getReferences().add(ref);
       
        example.setExampleModel(ref);

        // make a new FileReference for the example .html
        // as per issue 128, this will be in a new location
        FileReference file = factory.createFileReference();
        file.setPlugin(examplePlugin);
        file.setPackage(jc.getName());
        file.setName(jc.getName() + ".html");
        root.getReferences().add(file);
       
        example.setExampleLocation(file);

        target.getExamples().add(example);

      } else {
        throw new SemanticHandlerException("Unknown example reference: " + reference + ", class: " + reference.getClass());
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.