Examples of FieldMetaData


Examples of com.netflix.astyanax.ddl.FieldMetadata

      Class<?> clazz = value.getClass();
     
      String name = key.toUpperCase();
      String type = clazz.getSimpleName().toUpperCase();
      boolean isContainer = Collection.class.isAssignableFrom(clazz) || Map.class.isAssignableFrom(clazz);
      list.add(new FieldMetadata(name, type, isContainer));
    }
    return list;
  }
View Full Code Here

Examples of com.sleepycat.persist.model.FieldMetadata

                        }
                    }
                    if (compositeKeyFields != null) {
                        int nFields = compositeKeyFields.size();
                        for (int i = 0; i < nFields; i += 1) {
                            FieldMetadata fldMeta = compositeKeyFields.get(i);
                            if (fldMeta.getName().equals(name)) {
                                buf.append(" compositeKeyField=\"");
                                buf.append(i + 1);
                                buf.append('"');
                            }
                        }
View Full Code Here

Examples of it.eng.spagobi.tools.dataset.common.datastore.FieldMetadata

    for (Iterator iterator = lst.iterator(); iterator.hasNext();) {
      SourceBean sbRow = (SourceBean)iterator.next();
      String name=sbRow.getAttribute("NAME")!= null ? sbRow.getAttribute("NAME").toString() : null;
      String type=sbRow.getAttribute("TYPE")!= null ? sbRow.getAttribute("TYPE").toString() : null;
      if(name!=null){
        FieldMetadata fieldMeta=new FieldMetadata();
        fieldMeta.setName(name);
        if(type!=null){
          // remove class!
          type=type.substring(6);
          fieldMeta.setType(Class.forName(type.trim()));
        }       
        dsMeta.addFiedMeta(fieldMeta);
      }
    }
    logger.debug("OUT");
View Full Code Here

Examples of org.apache.felix.ipojo.parser.FieldMetadata

     * @return the type of the field or {@code null} if it wasn't found
     */
    private static String getTypeFromAttributeField(String fieldRequire,
            PojoMetadata manipulation) {

        FieldMetadata field = manipulation.getField(fieldRequire);
        if (field == null) {
            return null;
        } else {
            return FieldMetadata.getReflectionType(field.getFieldType());
        }
    }
View Full Code Here

Examples of org.apache.felix.ipojo.parser.FieldMetadata

                    if (object != null) {
                        prop.setValue(object);
                    }

                    if (field != null) {
                        getInstanceManager().register(new FieldMetadata(field, type), this);
                        // Cannot register the property as the interception is necessary
                        // to deal with registration update.
                    }
                }

                // Attach to properties to the provided service
                svc.setProperties(properties);
            }

            Element[] controllers = providedService.getElements("Controller");
            if (controllers != null) {
                for (Element controller : controllers) {
                    String field = controller.getAttribute("field");
                    if (field == null) {
                        throw new ConfigurationException("The field attribute of a controller is mandatory");
                    }

                    String v = controller.getAttribute("value");
                    boolean value = !(v != null && v.equalsIgnoreCase("false"));
                    String s = controller.getAttribute("specification");
                    if (s == null) {
                        s = "ALL";
                    }
                    svc.setController(field, value, s);

                    getInstanceManager().register(new FieldMetadata(field, "boolean"), this);
                }
            }

            if (checkProvidedService(svc)) {
                m_providedServices.add(svc);
View Full Code Here

Examples of org.apache.felix.ipojo.parser.FieldMetadata

                // Check type if not already set
                if (type == null) {
                    if (field == null) {
                        throw new ConfigurationException("The property " + name + " has neither type nor field.");
                    }
                    FieldMetadata fieldMeta = manipulation.getField(field);
                    if (fieldMeta == null) {
                        throw new ConfigurationException("A declared property was not found in the implementation class : " + field);
                    }
                    type = fieldMeta.getFieldType();
                    props[j].addAttribute(new Attribute("type", type));
                }

                // Is the property set to immutable
                boolean immutable = false;
View Full Code Here

Examples of org.apache.felix.ipojo.parser.FieldMetadata

            throw new ConfigurationException("The handler " + NAMESPACE + ":" + NAME + " cannot be declared several times");
        }

        String field = elements[0].getAttribute(FIELD_ATTRIBUTE);
        if (field != null) {
            FieldMetadata meta = getPojoMetadata().getField(field);
            if (meta == null) {
                throw new ConfigurationException("The transaction field does not exist in the pojo class : " + field);
            }
            if (! meta.getFieldType().equals(Transaction.class.getName())) {
                throw new ConfigurationException("The transaction field type must be " + Transaction.class.getName());
            }
            // Register the interceptor
            getInstanceManager().register(meta, this);
View Full Code Here

Examples of org.apache.felix.ipojo.parser.FieldMetadata

                String name = publisherMetadata.getName();
                info(LOG_PREFIX + "Checking publisher " + name);

                // Check field existence and type
                String field = publisherMetadata.getField();
                FieldMetadata fieldMetadata = getPojoMetadata()
                        .getField(publisherMetadata.getField(),
                                Publisher.class.getName());
                if (fieldMetadata == null) {
                    throw new ConfigurationException(
                            "Field not found in the component : "
View Full Code Here

Examples of org.apache.felix.ipojo.parser.FieldMetadata

                        .put(publisherMetadata.getField(), publisher);

                // Register the callback that return the publisher
                // reference when the specified field is read by the
                // POJO.
                FieldMetadata fieldMetadata = getPojoMetadata()
                        .getField(publisherMetadata.getField(),
                                Publisher.class.getName());
                m_manager.register(fieldMetadata, this);

            }
View Full Code Here

Examples of org.apache.felix.ipojo.parser.FieldMetadata

    AtomicImplementationDeclaration primitive = (AtomicImplementationDeclaration) declaration;
    for (PropertyDefinition definition : primitive.getPropertyDefinitions()) {

      if (definition.getField() != null) {
        FieldMetadata field = getPojoMetadata().getField(
            definition.getField());
        if (field == null)
          throw new ConfigurationException("Invalid property definition "  + definition.getName()+ ": the specified field does not exist");

      }
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.