Examples of Specification


Examples of org.apache.isis.applib.spec.Specification

            public MySpecAnd() {
                super(neverSatisfied);
            }
        }
        ;
        final Specification mySpecAnd = new MySpecAnd();
        assertThat(mySpecAnd.satisfies(null), is(not(nullValue())));
        assertThat(mySpecAnd.satisfies(null), is("not satisfied"));
    }
View Full Code Here

Examples of org.apache.isis.viewer.scimpi.dispatcher.view.debug.Specification

        addElementProcessor(new Selector());
        addElementProcessor(new Services());
        addElementProcessor(new ShortFormView());
        addElementProcessor(new ShowDebug());
        addElementProcessor(new SimpleButton());
        addElementProcessor(new Specification());
        addElementProcessor(new TableCell());
        addElementProcessor(new TableView());
        addElementProcessor(new TableBuilder());
        addElementProcessor(new TableEmpty());
        addElementProcessor(new TableRow());
View Full Code Here

Examples of org.apache.openjpa.conf.Specification

        conf.metaFactoryPlugin.setString(SPEC_JPA.getName());
        conf.lockManagerPlugin.setDefault("mixed");
        conf.lockManagerPlugin.setString("mixed");
        conf.nontransactionalWrite.setDefault("true");
        conf.nontransactionalWrite.set(true);
        Specification spec = ((OpenJPAConfiguration) c).getSpecificationInstance();
        int specVersion = spec.getVersion();
        Compatibility compatibility = conf.getCompatibilityInstance();
        spec.setCompatibility(compatibility);
        if (specVersion < 2) {
            compatibility.setFlushBeforeDetach(true);
            compatibility.setCopyOnDetach(true);
            compatibility.setPrivatePersistentProperties(true);
            compatibility.setIgnoreDetachedStateFieldForProxySerialization(true);
View Full Code Here

Examples of org.codehaus.loom.extension.Specification

            "Implementation-Version: 1.0.2Alpha\n";
        final Specification[] specifications = getSpecifications(
            manifestString );

        assertEquals( "Count", 2, specifications.length );
        Specification dveSpecification;
        Specification fooSpecification;
        if( 3 == specifications[ 0 ].getSections().length )
        {
            dveSpecification = specifications[ 0 ];
            fooSpecification = specifications[ 1 ];
        }
        else
        {
            dveSpecification = specifications[ 1 ];
            fooSpecification = specifications[ 0 ];
        }

        final String[] sections = dveSpecification.getSections();
        assertEquals( "sections.length", 3, sections.length );
        assertEquals( "sections.length", 3, sections.length );
        final HashSet set = new HashSet();
        set.addAll( Arrays.asList( sections ) );
        assertTrue( "sections.contains(org/realityforge/dve)",
                    set.contains( "org/realityforge/dve" ) );
        assertTrue( "sections.contains(org/realityforge/dve/input)",
                    set.contains( "org/realityforge/dve/input" ) );
        assertTrue( "sections.contains(org/realityforge/dve/sim)",
                    set.contains( "org/realityforge/dve/sim" ) );
        assertEquals( "Name", "org.realityforge.dve",
                      dveSpecification.getSpecificationTitle() );
        assertEquals( "SpecVendor", "Peter Donald",
                      dveSpecification.getSpecificationVendor() );
        assertEquals( "SpecVersion", "1.0.2",
                      dveSpecification.getSpecificationVersion().toString() );
        assertEquals( "ImpVendor", "Peter Donald",
                      dveSpecification.getImplementationVendor() );
        assertEquals( "ImpTitle", "DVE vi OS3P",
                      dveSpecification.getImplementationTitle() );
        assertEquals( "ImpVersion", "1.0.2Alpha",
                      dveSpecification.getImplementationVersion().toString() );

        assertEquals( "sections.length",
                      1,
                      fooSpecification.getSections().length );
        assertEquals( "sections[0]",
                      "com/biz/foo",
                      fooSpecification.getSections()[ 0 ] );
        assertEquals( "Name", "com.biz.foo",
                      fooSpecification.getSpecificationTitle() );
        assertEquals( "SpecVendor", "Peter Donald",
                      fooSpecification.getSpecificationVendor() );
        assertEquals( "SpecVersion", "1.0.2",
                      fooSpecification.getSpecificationVersion().toString() );
        assertEquals( "ImpVendor", "Peter Donald",
                      fooSpecification.getImplementationVendor() );
        assertEquals( "ImpTitle", "DVE vi OS3P",
                      fooSpecification.getImplementationTitle() );
        assertEquals( "ImpVersion", "1.0.2Alpha",
                      fooSpecification.getImplementationVersion().toString() );
    }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.TrimExpression.Specification

   *
   * @param specification The new trim specification; <code>null</code> is not valid
   */
  public void setSpecification(Specification specification) {
    Assert.isNotNull(specification, "The Specification cannot be null");
    Specification oldSpecification = this.specification;
    this.specification = specification;
    firePropertyChanged(SPECIFICATION_PROPERTY, oldSpecification, specification);
  }
View Full Code Here

Examples of org.moresbycoffee.mbyhave8.structure.Specification

public class Specification_isExecutableTest {

    @Test
    public void should_be_true_if_there_are_features_in_the_specification() {
        final Specification specification = specificationWith(featureWith(successScenario()));
        assertTrue(specification.isExecuteable(Filter.EMPTY_FILTER));
    }
View Full Code Here

Examples of org.netbeans.api.java.platform.Specification

            LOGGER.log(Level.INFO, "Invalid platform version: " + versionStr, ex);
            return JavaPlatform.getDefault();
        }

        for (JavaPlatform platform: platforms) {
            Specification specification = platform.getSpecification();
            if (specName.equalsIgnoreCase(specification.getName())
                    && version.equals(specification.getVersion())) {
                return platform;
            }
        }

        // We could not find an exact match, so try to find the best match:
        //
        // 1. If there is at least one platform with a version higher than
        //    requested, choose the one with the lowest version which is still
        //    higher than the requested (the closest version to the requested
        //    which is above the requested version).
        //
        // 2. In case every platform is below the requested, choose the one
        //    with the highest version number.

        JavaPlatform bestMatch = null;
        for (JavaPlatform platform: platforms) {
            Specification platformSpecification = platform.getSpecification();
            if (platformSpecification == null) {
                continue;
            }

            if (!specName.equalsIgnoreCase(platformSpecification.getName())) {
                continue;
            }

            SpecificationVersion thisVersion = platformSpecification.getVersion();
            if (thisVersion == null) {
                continue;
            }

            if (bestMatch == null) {
View Full Code Here

Examples of org.netbeans.api.scala.platform.Specification

    public String getVendor() {
        return System.getProperty("java.vm.vendor");
    }

    public Specification getSpecification() {
        return new Specification(/*J2SEPlatformImpl.PLATFORM_J2SE*/"j2se", Dependency.JAVA_SPEC); // NOI18N
    }
View Full Code Here

Examples of org.qi4j.functional.Specification

        Class serviceType = serviceDescriptor.type();
        Iterable<ServiceReference<T>> services = locator.findServices( serviceType );
        List<ServiceReference<T>> filteredServices = new ArrayList<ServiceReference<T>>();
        for( ServiceReference<T> service : services )
        {
            Specification selector1 = service.metaInfo( Specification.class );
            if( selector1 != null && selector1 == selector )
            {
                continue;
            }
View Full Code Here

Examples of org.springframework.data.jpa.domain.Specification

      }
    }
   
    Object clazz = Class.forName(module.getClassName()).newInstance();
    //Object clazz = null;
    Specification spec = DynamicSpecifications.bySearchFilter(request, clazz.getClass(), filterSet);
   
    CriteriaBuilder builder = em.getCriteriaBuilder();
    CriteriaQuery criteriaQuery = builder.createQuery(clazz.getClass());
    Root root = criteriaQuery.from(clazz.getClass());
   
    Predicate predicate = spec.toPredicate(root, criteriaQuery, builder);
    criteriaQuery.where(predicate);
   
    List<Object> objects = em.createQuery(criteriaQuery).getResultList();
    if (ids != null) {
      if (objects.size() == ids.length) {
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.