Examples of PropertyStorage


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

        return getPropertyStorage().containsMethod(entity, property);
    }

    private void tryToCachedMethod(Class entity, String property, Method method)
    {
        PropertyStorage propertyStorage = getPropertyStorage();
        if (!propertyStorage.containsMethod(entity, property))
        {
            propertyStorage.storeMethod(entity, property, method);
        }
    }
View Full Code Here

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

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

        Assert.assertEquals("test1", ExtValAnnotationUtils.extractValueOf(target, Object.class));
View Full Code Here

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

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

        Assert.assertEquals("test2", ExtValAnnotationUtils.extractValueOf(target, Object.class));
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
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.