Examples of FieldDescriptor


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

        return fd;
    }

    private FieldDescriptor parseFieldDescriptor() throws XmlPullParserException {
        FieldDescriptor fd = new FieldDescriptor();

        /*
         *  fieldName CDATA #REQUIRED
         *  jcrName CDATA #IMPLIED
         *  id (true | false) "false"
         *  path (true | false) "false"
         *  jcrType (String | Date | Long | Double | Boolean | Binary) #IMPLIED
         *  jcrAutoCreated (true | false) "false"
         *  jcrMandatory (true | false) "false"
         *  jcrOnParentVersion (COPY | VERSION | INITIALIZE | COMPUTE | IGNORE | ABORT) "COPY"
         *  jcrProtected (true | false) "false"
         *  jcrMultiple (true | false) "false"
         */

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

        fd.setId(this.getOptionalAttribute("id", false));
        fd.setPath(this.getOptionalAttribute("path", false));

        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.setJcrMultiple(this.getOptionalAttribute("jcrMultiple", false));
        fd.setJcrDefaultValue(this.getOptionalAttribute("jcrDefaultValue"));

        return fd;
    }
View Full Code Here

Examples of org.apache.ojb.broker.metadata.FieldDescriptor

                ValueContainer[] pkValues = brokerForClass.serviceBrokerHelper().getKeyValues(cld, obj);

                Criteria criteria = new Criteria();
                for (int j = 0; j < pkFields.length; j++)
                {
                    FieldDescriptor fld = pkFields[j];
                    criteria.addEqualTo(fld.getPersistentField().getName(), pkValues[j].getValue());
                }

                if (crit == null)
                    crit = criteria;
                else
View Full Code Here

Examples of org.exolab.castor.mapping.FieldDescriptor

        // -- fields so we can do recursive processing
        _mappings.put(cls, classMap);

        fields = xmlClass.getFields();
        for (int i = 0; i < fields.length; ++i) {
            FieldDescriptor fdesc = fields[i];

            String fieldName = fdesc.getFieldName();

            boolean isContainer = false;
            // -- check for collection wrapper
            if (introspected && fieldName.startsWith("##container")) {
                fdesc = fdesc.getClassDescriptor().getFields()[0];
                fieldName = fdesc.getFieldName();
                isContainer = true;
            }

            Class fieldType = fdesc.getFieldType();

            // -- check to make sure we can find the accessors...
            // -- if we used introspection we don't need to
            // -- enter this block...only when descriptors
            // -- were generated using the source code generator
            // -- or by hand.
            if ((!introspected) && fieldName.startsWith(UNDERSCORE)) {
                // -- check to see if we need to remove underscore
                if (!_mappingLoader.canFindAccessors(cls, fieldName, fieldType)) {
                    fieldName = fieldName.substring(1);
                }

                // -- check to see if we need to remove "List" prefix
                // -- used by generated source code
                if (!_mappingLoader.canFindAccessors(cls, fieldName, fieldType)) {
                    if (fieldName.endsWith("List")) {
                        int len = fieldName.length() - 4;
                        String tmpName = fieldName.substring(0, len);
                        if (_mappingLoader.canFindAccessors(cls, tmpName, fieldType)) {
                            fieldName = tmpName;
                        }
                    }
                }
            }

            fieldMap = new FieldMapping();
            fieldMap.setName(fieldName);

            // -- unwrap arrays of objects
            boolean isArray = fieldType.isArray();
            while (fieldType.isArray()) {
                fieldType = fieldType.getComponentType();
            }

            // -- To prevent outputing of optional fields...check
            // -- for value first before setting
            if (fdesc.isRequired()) {
                fieldMap.setRequired(true);
            }
            if (fdesc.isTransient()) {
                fieldMap.setTransient(true);
            }
            if (fdesc.isMultivalued()) {
                // -- special case for collections
                if (isContainer) {
                    // -- backwards than what you'd expect, but
                    // -- if the collection had a "container" wrapper
                    // -- then we specify container="false" in the
View Full Code Here

Examples of org.glassfish.ejb.deployment.descriptor.FieldDescriptor

        String primkey =
      ((EjbEntityDescriptor)descriptor).getPrimaryKeyClassName();
                    if (primkey.equals("java.lang.String")) {
                        try {
 
                FieldDescriptor primField =
              ((EjbCMPEntityDescriptor)descriptor).getPrimaryKeyFieldDesc();
 
                // primField must exist in order to be valid & pass test
                Descriptor persistentField;
                Field field;
                Set persistentFields =
              ((EjbCMPEntityDescriptor)descriptor).getPersistenceDescriptor().getCMPFields();
                Iterator iterator = persistentFields.iterator();
                boolean foundMatch = false;
                while (iterator.hasNext()) {
              persistentField = (Descriptor)iterator.next();
              if (primField != null) {
                  if (primField.getName().equals(persistentField.getName())) {
                      foundMatch = true;
                      break;
                  } else {
                      continue;
                  }
                    } else {
                                    // should already be set, can't ever be in cmp
                                    // fields if primField doesn't exist
                  foundMatch = false;
                  break;
                    }
                }
                if (foundMatch) {
              result.addGoodDetails(smh.getLocalString
                  ("tests.componentNameConstructor",
                   "For [ {0} ]",
                   new Object[] {compName.toString()}));
        result.passed(smh.getLocalString
                      (getClass().getName() + ".passed",
                       "Primary key field [ {0} ] is defined within set of container managed fields for bean [ {1} ]",
                       new Object[] {primField.getName(),descriptor.getName()}));
                } else {
              if (primField != null) {
                  result.addErrorDetails(smh.getLocalString
                 ("tests.componentNameConstructor",
                  "For [ {0} ]",
                  new Object[] {compName.toString()}));
            result.failed(smh.getLocalString
                    (getClass().getName() + ".failed",
                     "Primary key field [ {0} ] is not defined within set of container managed fields for bean [ {1} ]",
                     new Object[] {primField.getName(),descriptor.getName()}));
              } else {
                                    // unless special case, where primary key class
                                    // is java.lang.Object, then test should be N/A
                                    // not failed
                                    try {
View Full Code Here

Examples of org.hibernate.search.metadata.FieldDescriptor

    this.sharded = indexManagers.length > 1;

    // create the class bridge fields
    Set<FieldDescriptor> fieldDescriptorTmp = new HashSet<FieldDescriptor>();
    for ( DocumentFieldMetadata documentFieldMetadata : typeMetadata.getClassBridgeMetadata() ) {
      FieldDescriptor fieldDescriptor;
      if ( documentFieldMetadata.isNumeric() ) {
        fieldDescriptor = new NumericFieldDescriptorImpl( documentFieldMetadata );
      }
      else {
        fieldDescriptor = new FieldDescriptorImpl( documentFieldMetadata );
View Full Code Here

Examples of org.infinispan.protostream.descriptors.FieldDescriptor

         FieldBridgeProvider fieldBridgeProvider = new FieldBridgeProvider() {
            @Override
            public FieldBridge getFieldBridge(String type, String propertyPath) {
               Descriptor md = serCtx.getMessageDescriptor(type);
               FieldDescriptor fd = getFieldDescriptor(md, propertyPath);
               switch (fd.getType()) {
                  case DOUBLE:
                     return NumericFieldBridge.DOUBLE_FIELD_BRIDGE;
                  case FLOAT:
                     return NumericFieldBridge.FLOAT_FIELD_BRIDGE;
                  case INT64:
View Full Code Here

Examples of org.metaworks.FieldDescriptor

  }

  public void initialize(final ProcessDesigner pd, Activity activity) {
    super.initialize(pd, activity);

    FieldDescriptor fd;
    fd = getFieldDescriptor("VariableBindings");
    bindingVariablesInput = fd.getInputter();

    fd = getFieldDescriptor("DefinitionId");

    XMLValueInput inputter = new XMLValueInput("/processmanager/processDefinitionListXML.jsp?omitVersion=false&objectType=rule") {
      public void onValueChanged() {
        changeBindingArguments((String) getValue());
      }
    };

    fd.setInputter(inputter);
    definitionIdInput = inputter;
   
    setFieldDisplayNames(DRoolsActivity.class);
  }
View Full Code Here

Examples of org.xorm.util.FieldDescriptor

                Class[] fieldTypes = new Class[len];
                byte[] fieldFlags = new byte[len];
                int i = 0;
                Iterator it = managedFields.iterator();
                while (it.hasNext()) {
                    FieldDescriptor fd = mapping.getFieldDescriptor
                        ((String) it.next());
                    fieldNames[i] = fd.name;
                    fieldTypes[i] = fd.type;
                    fieldFlags[i] = (byte) (pc.CHECK_READ | pc.CHECK_WRITE);
                    i++;
View Full Code Here

Examples of ru.andrew.jclazz.core.FieldDescriptor

        {
            if (lv_debug != null)
            {
                try
                {
                    type = new FieldDescriptor(lv_debug.descriptor.getString()).getFQN();
                }
                catch (ClazzException e)
                {
                    throw new RuntimeException(e);
                }
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.