Package org.springframework.beans

Examples of org.springframework.beans.PropertyValue


        BeanDefinition def = ctxt.getBeanFactory().getBeanDefinition(beanName);
        if (!ctxt.getBeanFactory().isSingleton(beanName) || def.isAbstract()) {
            return false;
        }
        Collection<?> ids = null;
        PropertyValue pv = def.getPropertyValues().getPropertyValue(propertyName);
       
        if (pv != null) {
            Object value = pv.getValue();
            if (!(value instanceof Collection)) {
                throw new RuntimeException("The property " + propertyName + " must be a collection!");
            }

            if (value instanceof Mergeable) {
View Full Code Here


                {
                    return new ModelBeanImpl(beanName, ModelBean.POJO);
                }                  
                String lookup = null;
                boolean requiresExternalSupport = false;
                PropertyValue value = bd.getPropertyValues().getPropertyValue("lookupKey");
                if (value != null)
                {
                    lookup = (String)value.getValue();
                }               
                if (bean instanceof ExternalComponentSupport)
                {
                    requiresExternalSupport = true;
                }
View Full Code Here

                continue;
            }

            try {
                Collection<?> ids = null;
                PropertyValue pv = def.getPropertyValues().getPropertyValue(idsProperty);
               
                if (pv != null) {
                    Object value = pv.getValue();
                    if (!(value instanceof Collection)) {
                        throw new RuntimeException("The property " + idsProperty + " must be a collection!");
                    }

                    if (value instanceof Mergeable) {
View Full Code Here

                continue;
            }

            try {
                Collection<?> ids = null;
                PropertyValue pv = def.getPropertyValues().getPropertyValue(idsProperty);
               
                if (pv != null) {
                    Object value = pv.getValue();
                    if (!(value instanceof Collection)) {
                        throw new RuntimeException("The property " + idsProperty + " must be a collection!");
                    }

                    if (value instanceof Mergeable) {
View Full Code Here

        // is a stateless session)
        if (sessionType.equals("stateless")) {
            for (String beanName : parserContext.getRegistry().getBeanDefinitionNames()) {
                BeanDefinition def = parserContext.getRegistry().getBeanDefinition(beanName);
                if (KnowledgeAgentBeanFactory.class.getName().equals(def.getBeanClassName())) {
                    PropertyValue pvalue = def.getPropertyValues().getPropertyValue("kbase");
                    RuntimeBeanReference tbf = (RuntimeBeanReference) pvalue.getValue();
                    if (kbase.equals(tbf.getBeanName())) {
                        factory.addPropertyValue("knowledgeAgent",
                                new RuntimeBeanReference(beanName));
                    }
                }
View Full Code Here

                {
                    return new ModelBeanImpl(beanName, ModelBean.POJO);
                }                  
                String lookup = null;
                boolean requiresExternalSupport = false;
                PropertyValue value = bd.getPropertyValues().getPropertyValue("lookupKey");
                if (value != null)
                {
                    lookup = (String)value.getValue();
                }               
                if (bean instanceof ExternalComponentSupport)
                {
                    requiresExternalSupport = true;
                }
View Full Code Here

            {
                propertyValues.addPropertyValue("enrichmentMessageProcessor", definition);
            }
            else
            {
                PropertyValue messageProcessors = propertyValues.getPropertyValue("messageProcessors");
                if ((messageProcessors == null) || (messageProcessors.getValue() == null))
                {
                    propertyValues.addPropertyValue("messageProcessors", new ManagedList());
                }
                List listMessageProcessors = ((List) propertyValues.getPropertyValue("messageProcessors").getValue());
                listMessageProcessors.add(definition);
View Full Code Here

            {
                propertyValues.addPropertyValue("enrichmentMessageProcessor", definition);
            }
            else
            {
                PropertyValue messageProcessors = propertyValues.getPropertyValue("messageProcessors");
                if ((messageProcessors == null) || (messageProcessors.getValue() == null))
                {
                    propertyValues.addPropertyValue("messageProcessors", new ManagedList());
                }
                List listMessageProcessors = ((List) propertyValues.getPropertyValue("messageProcessors").getValue());
                listMessageProcessors.add(definition);
View Full Code Here

      this.sqlSessionTemplateBeanName = updatePropertyValue("sqlSessionTemplateBeanName", values);
    }
  }

  private String updatePropertyValue(String propertyName, PropertyValues values) {
    PropertyValue property = values.getPropertyValue(propertyName);

    if (property == null) {
      return null;
    }

    Object value = property.getValue();

    if (value == null) {
      return null;
    } else if (value instanceof String) {
      return value.toString();
View Full Code Here

            BeanDefinition def = ctxt.getBeanFactory().getBeanDefinition(beanName);
            if (!ctxt.getBeanFactory().isSingleton(beanName) || def.isAbstract()) {
                return false;
            }
            Collection<?> ids = null;
            PropertyValue pv = def.getPropertyValues().getPropertyValue(propertyName);
           
            if (pv != null) {
                Object value = pv.getValue();
                if (!(value instanceof Collection)) {
                    throw new RuntimeException("The property " + propertyName + " must be a collection!");
                }
   
                if (value instanceof Mergeable) {
View Full Code Here

TOP

Related Classes of org.springframework.beans.PropertyValue

Copyright © 2018 www.massapicom. 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.