Examples of PropertyStorage


Examples of org.apache.myfaces.extensions.validator.core.storage.PropertyStorage

            PropertyInformationKeys.PROPERTY_DETAILS, propertyDetails);

        /*
         * find and add annotations
         */
        PropertyStorage storage = ReflectionUtils.getPropertyStorage();

        addPropertyAccessAnnotations(storage, entityClass, propertyDetails.getProperty(), propertyInformation);
        addFieldAccessAnnotations(storage, entityClass, propertyDetails.getProperty(), propertyInformation);

        return propertyInformation;
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.storage.PropertyStorage

    {
        public PropertyInformation extract(Class targetClass, String targetProperty)
        {
            PropertyInformation propertyInformation = new DefaultPropertyInformation();

            PropertyStorage storage = ReflectionUtils.getPropertyStorage();
            addPropertyAccessAnnotations(storage, targetClass, targetProperty, propertyInformation);
            addFieldAccessAnnotations(storage, targetClass, targetProperty, propertyInformation);

            return propertyInformation;
        }
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.storage.PropertyStorage

    public void testTargetPropertyIdAnnotationDefault() throws Exception
    {
        Method method = ReflectionUtils.getMethod(ConstraintSourceUtils.class, "getTargetPropertyMetaData",
                PropertyStorage.class, Class.class, String.class);
        Assert.assertNotNull(method);
        PropertyStorage propertyStorage = ReflectionUtils.getPropertyStorage();
        Annotation target = (Annotation) ReflectionUtils.invokeMethodOfClass(ConstraintSourceUtils.class, method,
                propertyStorage, ConstraintSourceAwareBean.class, "property5");

        Assert.assertEquals(ConstraintSource.class.getName(), ((Class) ExtValAnnotationUtils.extractValueOf(target,
                Object.class)).getName());
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.storage.PropertyStorage

    public void testTargetPropertyIdAnnotationCustomConfig() throws Exception
    {
        Method method = ReflectionUtils.getMethod(ConstraintSourceUtils.class, "getTargetPropertyMetaData",
                PropertyStorage.class, Class.class, String.class);
        Assert.assertNotNull(method);
        PropertyStorage propertyStorage = ReflectionUtils.getPropertyStorage();
        Annotation target = (Annotation) ReflectionUtils.invokeMethodOfClass(ConstraintSourceUtils.class, method,
                propertyStorage, ConstraintSourceAwareBean.class, "property6");

        Assert.assertEquals(CustomConstraintSource.class.getName(), ((Class) ExtValAnnotationUtils.extractValueOf(target,
                Object.class)).getName());
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.storage.PropertyStorage

            return getMappedConstraintSource(mappedConstraintSourceStorage, originalClass, originalProperty);
        }

        originalClass = ProxyUtils.getUnproxiedClass(originalClass);

        PropertyStorage propertyStorage = ReflectionUtils.getPropertyStorage();
        Class newClass = findMappedClass(propertyStorage, originalClass, originalProperty);

        //mapped source is ignored via @IgnoreConstraintSource or there is just no mapping annotation at the target
        if (newClass == null)
        {
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.storage.PropertyStorage

        return result;
    }

    private static boolean isMappedConstraintSourceIgnored(Class baseBeanClass, String property)
    {
        PropertyStorage storage = ReflectionUtils.getPropertyStorage();
        Method method = ReflectionUtils.tryToGetMethodOfProperty(storage, baseBeanClass, property);

        if (method != null && method.isAnnotationPresent(getIgnoreConstraintSourceAnnotationImplementation()))
        {
            return true;
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.storage.PropertyStorage

    public static PropertyInformation extractAnnotations(Class entityClass, PropertyDetails propertyDetails)
    {
        PropertyInformation propertyInformation = new DefaultPropertyInformation();
        propertyInformation.setInformation(PropertyInformationKeys.PROPERTY_DETAILS, propertyDetails);

        PropertyStorage storage = ReflectionUtils.getPropertyStorage();

        while (!Object.class.getName().equals(entityClass.getName()))
        {
            addPropertyAccessAnnotations(storage, entityClass, propertyDetails.getProperty(), propertyInformation);
            addFieldAccessAnnotations(storage, entityClass, propertyDetails.getProperty(), propertyInformation);
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.storage.PropertyStorage

            PropertyInformationKeys.PROPERTY_DETAILS, propertyDetails);

        /*
         * find and add annotations
         */
        PropertyStorage storage = ReflectionUtils.getPropertyStorage();

        addPropertyAccessAnnotations(storage, entityClass, propertyDetails.getProperty(), propertyInformation);
        addFieldAccessAnnotations(storage, entityClass, propertyDetails.getProperty(), propertyInformation);

        return propertyInformation;
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.storage.PropertyStorage

            return getMappedConstraintSource(mappedConstraintSourceStorage, originalClass, originalProperty);
        }

        originalClass = ProxyUtils.getUnproxiedClass(originalClass);

        PropertyStorage propertyStorage = ReflectionUtils.getPropertyStorage();
        Class newClass = findMappedClass(propertyStorage, originalClass, originalProperty);

        //mapped source is ignored via @IgnoreConstraintSource or there is just no mapping annotation at the target
        if (newClass == null)
        {
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.storage.PropertyStorage

        return result;
    }

    private static boolean isMappedConstraintSourceIgnored(Class baseBeanClass, String property)
    {
        PropertyStorage storage = ReflectionUtils.getPropertyStorage();
        Method method = ReflectionUtils.tryToGetMethodOfProperty(storage, baseBeanClass, property);

        if (method != null && method.isAnnotationPresent(getIgnoreConstraintSourceAnnotationImplementation()))
        {
            return true;
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.