Examples of PropertySpecification


Examples of org.apache.tapestry.spec.PropertySpecification

        Persist p = method.getAnnotation(Persist.class);

        String propertyName = AnnotationUtils.getPropertyName(method);
        String stategy = p.value();

        IPropertySpecification pspec = new PropertySpecification();

        pspec.setName(propertyName);
        pspec.setPersistence(stategy);

        spec.addPropertySpecification(pspec);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.PropertySpecification

public class TestComponentPropertyProxyWorker extends BaseAnnotationTestCase
{

    IPropertySpecification addProperty(EnhancementOperation op, IComponentSpecification spec, Location l,
            String propertyName) {
        IPropertySpecification pspec = new PropertySpecification();

        pspec.setName(propertyName);
        pspec.setPersistence("session");
        pspec.setLocation(l);

        spec.addPropertySpecification(pspec);
       
        return pspec;
    }
View Full Code Here

Examples of org.apache.tapestry.spec.PropertySpecification

        ComponentPropertyProxyWorker worker = new ComponentPropertyProxyWorker();
        List<String> exclude = new ArrayList<String>();
        exclude.add("Entity");
        worker.setExcludedPackages(exclude);
       
        IPropertySpecification prop = new PropertySpecification();
        prop.setName("value");
        prop.setPersistence("session");
       
        assertEquals(worker.extractPropertyType(AnnotatedGenericPersistentPage.class, "value", prop), Persistent.class);
       
        prop.setGeneric(false);
        prop.setType(null);
        prop.setName("secondValue");
       
        Class type = worker.extractPropertyType(AnnotatedGenericPersistentPage.class, "secondValue", prop);
       
        assert type != null;
        assert prop.isGeneric();
       
        assertEquals(type, Persistent.class);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.PropertySpecification

        InitialValue iv = method.getAnnotation(InitialValue.class);

        String propertyName = AnnotationUtils.getPropertyName(method);
        String stategy = p.value();

        IPropertySpecification pspec = new PropertySpecification();

        pspec.setName(propertyName);
        pspec.setPersistence(stategy);
        pspec.setLocation(location);
        pspec.setInitialValue(iv == null ? null : iv.value());

        spec.addPropertySpecification(pspec);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.PropertySpecification

        String propertyName = AnnotationUtils.getPropertyName(method);

        // Define a transient property

        IPropertySpecification pspec = new PropertySpecification();

        pspec.setName(propertyName);
        pspec.setLocation(location);
        pspec.setInitialValue(iv.value());

        spec.addPropertySpecification(pspec);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.PropertySpecification

    }

    private List buildPropertySpecs(String name, String type, boolean persistent,
            Location location, String initialValue)
    {
        PropertySpecification ps = new PropertySpecification();
        ps.setName(name);
        ps.setType(type);
        ps.setPersistence(persistent ? "session" : null);
        ps.setInitialValue(initialValue);
        ps.setLocation(location);

        return Collections.singletonList(ps);
    }
View Full Code Here

Examples of org.zeroexchange.model.resource.property.PropertySpecification

     * {@inheritDoc}
     */
    @Override
    @Deprecated
    public DictionaryItem getUnitOfMeasure(Resource resource) {
        PropertySpecification propSpecification = getPropertySpecification(resource, Property.PROP_UOM);
        DictionaryValue uomValue = (DictionaryValue) (propSpecification == null ? null : propSpecification.getValue());
        return uomValue == null ? null : uomValue.getValue();
    }
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.