Package net.sf.joafip.store.entity.conversion

Examples of net.sf.joafip.store.entity.conversion.FieldReplacementDef


            null/* staticField */, null/* transientField */);

        FieldInfo replacementFieldInfo = originalFieldInfo;
        for (ClassReplacementDef classReplacementDef : replacementDef) {
          if (replacementFieldInfo != null) {
            final FieldReplacementDef replacementFieldInfox = classReplacementDef
                .getReplacementFieldInfo(replacementFieldInfo);
            if (replacementFieldInfox == null) {
              replacementFieldInfo = null;// NOPMD
            } else {
              replacementFieldInfo = replacementFieldInfox
                  .getFieldInfo();
            }
          }
        }
        final FieldInfo exectedReplacementFieldInfo =
View Full Code Here


    final ClassInfo fieldType = classInfoFactory
        .getClassInfo("net.sf.joafip.java.util.IPNavigableTreeSet");
    final FieldInfo originalFieldInfo = new FieldInfo(classInfo,
        "pTreeSet", fieldType/* fieldType */, null/* staticField */, null/* transientField */);
    final FieldReplacementDef replacementFieldinfo = classReplacementDef
        .getReplacementFieldInfo(originalFieldInfo);
    assertFalse("must not be a deleted field",
        replacementFieldinfo.isDeletedField());
    final FieldInfo newFieldInfo = replacementFieldinfo.getFieldInfo();
    final FieldInfo expected = new FieldInfo(classInfo, "treeSet",
        fieldType/* fieldType */, null/* staticField */, null/* transientField */);
    assertEquals("bad replacement", expected, newFieldInfo);
  }
View Full Code Here

    final ValuedFieldList result = new ValuedFieldList();
    int index = 0;
    for (ValuedField fieldValue : valuedFieldList.getValuedFields()) {
      // replacement for read field by fieldInfo
      final FieldInfo fieldInfo = fieldValue.getFieldInfo();
      final FieldReplacementDef fieldReplacementDef;
      fieldReplacementDef = replacementDef
          .getReplacementFieldInfo(fieldInfo);
      final ObjectAndPersistInfo fiedlValue = fieldValue.getValue();
      if (fieldReplacementDef == null) {
        result.addNewFieldAndItsValue(index++, fieldInfo, fiedlValue);
      } else if (!fieldReplacementDef.isDeletedField()) {
        final FieldInfo newFieldInfo = fieldReplacementDef
            .getFieldInfo();
        result.addNewFieldAndItsValue(index++, newFieldInfo, fiedlValue);
      }
    }
    return result;
View Full Code Here

    int index = 0;
    for (ObjectAndPersistInfo fieldValue : valuedFieldList
        .getFieldValueList()) {
      try {
        // replacement for read field by index
        final FieldReplacementDef fieldReplacementDef;
        fieldReplacementDef = replacementDef
            .getReplacementFieldInfo(index);
        if (fieldReplacementDef == null) {
          result.setFieldValue(index, fieldValue);
        } else if (!fieldReplacementDef.isDeletedField()) {
          /*
           * set result with replacement field info, target field
           * index, and field value
           */
          final FieldInfo newFieldInfo = fieldReplacementDef
              .getFieldInfo();
          int fieldIndex = fieldReplacementDef.getIndex();
          if (fieldIndex == -1) {
            // unknown replacement field index
            for (fieldIndex = 0; fieldIndex < fieldsToSetInfo.length// NOPMD
                && !newFieldInfo
                    .equals(fieldsToSetInfo[fieldIndex]); fieldIndex++)
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.entity.conversion.FieldReplacementDef

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.