Examples of BeanDescriptor


Examples of javax.validation.metadata.BeanDescriptor

            ValueExpression valueExpression = ((UIComponent) input).getValueExpression("value");
            if (valueExpression != null) {
                ValueExpressionAnalyzer valueExpressionAnalyzer = new ValueExpressionAnalyzer(valueExpression);
                ValueReference vref = valueExpressionAnalyzer.getValueReference(context.getELContext());
                if (vref != null) { // valueExpressionAnalyzer can return a null value. The condition prevents a NPE
                    BeanDescriptor constraintsForClass = validator.getConstraintsForClass(vref.getBase().getClass());
                    PropertyDescriptor d = constraintsForClass.getConstraintsForProperty((String) vref.getProperty());
                    return (d != null) && d.hasConstraints();
                }
            }
            return false;
        }
View Full Code Here

Examples of juzu.impl.inject.BeanDescriptor

      @Override
      public MetricRegistry get() {
        return registry;
      }
    }; //<1>
    BeanDescriptor registryDescriptor = BeanDescriptor.createFromProvider//<2>
        MetricRegistry.class,
        Scope.SINGLETON,
        Collections.<Annotation>emptyList(),
        registryProvider);
    return new ServiceDescriptor(Arrays.asList(registryDescriptor));        //<3>
View Full Code Here

Examples of org.apache.jackrabbit.ocm.mapper.model.BeanDescriptor

        return fd;
    }

    private BeanDescriptor parseBeanDescriptor() throws XmlPullParserException {
        BeanDescriptor fd = new BeanDescriptor();

        /*
         * fieldName CDATA #REQUIRED
         * jcrName CDATA #IMPLIED
         * proxy (true | false) "false"
         * autoRetrieve (true|false) "true"
         * autoUpdate (true|false) "true"
         * autoInsert (true|false) "true"
         * converter CDATA #IMPLIED
         * jcrType CDATA #IMPLIED
         * jcrAutoCreated (true | false) "false"
         * jcrMandatory (true | false) "false"
         * jcrOnParentVersion (COPY | VERSION | INITIALIZE | COMPUTE | IGNORE | ABORT) "COPY"
         * jcrProtected (true | false) "false"
         * jcrSameNameSiblings (true | false) "false"
         */

        fd.setFieldName(this.getRequiredAttribute("fieldName"));
        fd.setJcrName(this.getOptionalAttribute("jcrName", fd.getFieldName()));
        fd.setProxy(this.getOptionalAttribute("proxy", false));

        fd.setAutoRetrieve(this.getOptionalAttribute("autoRetrieve", true));
        fd.setAutoUpdate(this.getOptionalAttribute("autoUpdate", true));
        fd.setAutoInsert(this.getOptionalAttribute("autoInsert", true));

        fd.setJcrType(this.getOptionalAttribute("jcrType"));
        fd.setJcrAutoCreated(this.getOptionalAttribute("jcrAutoCreated", false));
        fd.setJcrMandatory(this.getOptionalAttribute("jcrMandatory", false));
        fd.setJcrOnParentVersion(this.getOptionalAttribute("jcrOnParentVersion", "COPY"));
        fd.setJcrProtected(this.getOptionalAttribute("jcrProtected", false));
        fd.setJcrSameNameSiblings(this.getOptionalAttribute("jcrSameNameSiblings", false));

        fd.setJcrMultiple(this.getOptionalAttribute("jcrMultiple", false));

        return fd;
    }
View Full Code Here

Examples of org.jboss.errai.codegen.meta.BeanDescriptor

    return name;
  }

  @Override
  public BeanDescriptor getBeanDescriptor() {
    return new BeanDescriptor() {
      private final Set<String> properties;
      private final Map<String, MetaMethod> getterProperties;
      private final Map<String, MetaMethod> setterProperties;

      {
View Full Code Here

Examples of org.jdbf.engine.mapping.BeanDescriptor

            Iterator iter = views.iterator();
            Cache cache = factory.getCache();
           while(iter.hasNext()){
         CacheAccess access = null;
               RepositoryView view = (RepositoryView)iter.next();
               BeanDescriptor beanDesc = view.getBeanDescriptor();
               String region = beanDesc.getDatabaseName();
               String group = beanDesc.getRepositoryViewName();
         try{        
             factory.defineRegion(region);
         }
         catch(ObjectExistsException e){
         }
View Full Code Here

Examples of org.ow2.easybeans.tests.common.interceptors.invocationcontext.BeanDescriptor

        cmpObj.setHashCode(INT_VALUE_0);
        cmpObj.setInterceptedMethod(STR_VALUE_0);

        // Creates a new list of bean descriptors
        List<BeanDescriptor> lstDesc = new ArrayList<BeanDescriptor>();
        lstDesc.add(new BeanDescriptor(INT_VALUE_1, STR_VALUE_1));
        lstDesc.add(new BeanDescriptor(INT_VALUE_2, STR_VALUE_2));

        cmpObj.addDescriptors(lstDesc);

        ic.setParameters(objParams);
View Full Code Here

Examples of org.ow2.easybeans.tests.common.interceptors.invocationcontext.BeanDescriptor

     * @return method's invocation result
     * @throws Exception if invocation fails
     */
    public static Object checkBeanDescriptor(final InvocationContext ic) throws Exception {
        // Log logger = LogFactory.getLog(InvocationContextHelper.class);
        BeanDescriptor icBean = new BeanDescriptor(ic.getTarget().hashCode(), ic.getMethod().toString());
        BeanDescriptor bDesc = (BeanDescriptor) ic.getParameters()[0];

        if (icBean.equalsWithException(bDesc)) {
            return ic.proceed();
        }
        throw new Exception("The referenced bean is not equal as the invocation context reference.");
View Full Code Here

Examples of org.ow2.easybeans.tests.common.interceptors.invocationcontext.BeanDescriptor

    @Test(groups = {"invocationContext", "getContextData"})
    @SuppressWarnings("boxing")
    public void testContextData01() throws Exception {
        ItfInvocationParameter01 icBean = getBeanRemoteInstance(SLSBInvocationContext02.class,
                ItfInvocationParameter01.class);
        icBean.getObjects(new ComplexObject00(), new BeanDescriptor());
    }
View Full Code Here

Examples of org.ow2.easybeans.tests.common.interceptors.invocationcontext.BeanDescriptor

    @Test(groups = {"invocationContext", "getContextData"})
    @SuppressWarnings("boxing")
    public void testContextData02() throws Exception {
        ItfInvocationParameter01 icBean = getBeanRemoteInstance(SLSBInvocationContext02.class,
                ItfInvocationParameter01.class);
        icBean.getObjects(new ComplexObject00(), new BeanDescriptor());
    }
View Full Code Here

Examples of org.reverspring.engine.BeanDescriptor

  private static void writeSetContent(Set<ObjectBinding> value, Set<String> beansProcessed, StringBuffer buffer, int indent) {
    pad(indent, buffer);
    buffer.append("<set>\n");
    if (value != null) {
      for (ObjectBinding ref : value) {
        BeanDescriptor descriptor = ref.getDescriptor();
        if (descriptor.getType() == BeanDescriptor.TYPE_BASE) {
          writeSimplePropertyValue(ref, buffer, indent + 1);
        } else {
          if (ref.isNested() && !beansProcessed.contains(ref.getDescriptor().getId())) {
            writeBean(descriptor, buffer, beansProcessed, indent + 1);
          } else {
            writeRef(descriptor.getId(), buffer, indent + 1);
          }
        }
      }
    }
    pad(indent, buffer);
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.