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

Examples of net.sf.joafip.store.entity.conversion.input.ConversionDefForClass


    /**/joafipReplacementDefMap.getConversionDefByClassAndIdMap();
    final NavigableMap<Integer, ConversionDefForClass> convDefs = replacementDefMap
        .get(originalClass);
    assertNotNull("mus have conversion definitions for class PTreeSet",
        convDefs);
    final ConversionDefForClass convDef = convDefs.get(0);
    assertNotNull("must have conversion def for id 0", convDef);
    _LOG.debug(convDef);

    final Deque<ClassReplacementDef> defs = conversionManager
        .replacementDefForClassByName(previousJoafipRelesase,
View Full Code Here


        .get(classInfo);
    if (conversionDefByIdMap == null) {
      conversionDefByIdMap = new TreeMap<Integer, ConversionDefForClass>();
      conversionDefByClassAndIdMap.put(classInfo, conversionDefByIdMap);
    }
    ConversionDefForClass conversionDefForClass = conversionDefByIdMap
        .get(from);
    if (conversionDefForClass == null) {
      // FIXMELUC x check overlap
      conversionDefForClass = new ConversionDefForClass(
          conversionDefEntry);
      // add conversion definition
      conversionDefByIdMap.put(from, conversionDefForClass);
    } else {
      conversionDefForClass.update(conversionDefEntry);
    }
  }
View Full Code Here

    for (NavigableMap<Integer, ConversionDefForClass> convByIdMapForClass : conversionDefByClassAndIdMap
        .values()) {
      final Entry<Integer, ConversionDefForClass> floor = convByIdMapForClass
          .floorEntry(previous);
      if (floor != null) {
        final ConversionDefForClass conversionDefForClass = floor
            .getValue();
        if (conversionDefForClass.getToIdentifier() > previous) {
          computeMap(current, conversionDefForClass,
              replacementDefByClassMap);
        }
      }
    }
View Full Code Here

      final ConversionDefForClass originalConversionDef,
      final Map<ClassInfo, Deque<ClassReplacementDef>> replacementDefByClassMap)
      throws ConversionException {

    final Deque<ClassReplacementDef> classReplacementDefList = new LinkedList<ClassReplacementDef>();
    ConversionDefForClass intermediateConversionDef = originalConversionDef;
    final ClassInfo originalClassInfo = originalConversionDef
        .getClassInfo();
    final Deque<ClassReplacementDef> previousClassReplacementDef = replacementDefByClassMap
        .put(originalClassInfo, classReplacementDefList);
    do {

      final ClassInfo originalClass = intermediateConversionDef
          .getClassInfo();
      final ClassInfo replacementClass = intermediateConversionDef
          .getReplacementClass();

      final FieldConversionMap fieldConversionMap = intermediateConversionDef
          .getFieldConversionMap();
      final FieldConversionMap staticFieldConversionMap = intermediateConversionDef
          .getStaticFieldConversionMap();

      final ClassInfo converterClass = intermediateConversionDef
          .getConverterClass();
      final ClassInfo staticConverterClass = intermediateConversionDef
          .getStaticConverterClass();

      final ClassReplacementDef classReplacementDef = new ClassReplacementDef(
      /**/originalClass, replacementClass, converterClass,
          staticConverterClass, fieldConversionMap,
          staticFieldConversionMap);

      final List<FieldInfo> originalFieldList = intermediateConversionDef
          .getFieldList();

      int originalFieldIndex = 0;
      for (FieldInfo originalFieldInfo : originalFieldList) {
        final FieldReplacementDef fieldReplacementDef = classReplacementDef
            .getReplacementFieldInfo(originalFieldInfo);
        if (fieldReplacementDef == null) {
          final FieldInfo newFieldInfo = replacementFieldInfo(
              intermediateConversionDef.getIdentifier(),
              originalFieldInfo);
          classReplacementDef.addFieldConversion(originalFieldInfo,
              originalFieldIndex, newFieldInfo,
              // replacement field index is unknown
              -1/* replacementFieldIndex */);
        }
        originalFieldIndex++;
      }

      classReplacementDefList.add(classReplacementDef);

      final int nextId = intermediateConversionDef.getToIdentifier();

      final NavigableMap<Integer, ConversionDefForClass> convDefById =
      /**/conversionDefByClassAndIdMap.get(replacementClass);
      if (convDefById == null) {
        intermediateConversionDef = null;// NOPMD
      } else {
        final Entry<Integer, ConversionDefForClass> ceiling = convDefById
            .ceilingEntry(nextId);
        if (ceiling == null) {
          intermediateConversionDef = null;// NOPMD
        } else {
          intermediateConversionDef = ceiling.getValue();
          if (intermediateConversionDef.getToIdentifier() > current) {
            intermediateConversionDef = null;// NOPMD
          }
        }
      }

View Full Code Here

    final NavigableMap<Integer, ConversionDefForClass> convDefByIdMap = conversionDefByClassAndIdMap
        .get(classInfo);
    if (convDefByIdMap == null) {
      replacementClass = classInfo;
    } else {
      final ConversionDefForClass conversionDefForClass = convDefByIdMap
          .get(fromIdentifier);
      if (conversionDefForClass == null) {
        replacementClass = classInfo;
      } else {
        replacementClass = conversionDefForClass.getReplacementClass();
      }
    }
    return replacementClass;
  }
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.entity.conversion.input.ConversionDefForClass

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.