Package com.vercer.engine.persist.util.PropertySets

Examples of com.vercer.engine.persist.util.PropertySets.PrefixPropertySet


    }

    // both fields and properties are sorted by name
    List<Field> fields = getSortedFields(instance);
    Iterator<PrefixPropertySet> ppss = PropertySets.prefixPropertySets(properties, path).iterator();
    PrefixPropertySet pps = null;
    for (Field field : fields)
    {
      if (stored(field))
      {
        String name = fieldToPartName(field);
        Path fieldPath = new Path.Builder(path).field(name).build();
       
        // handle missing class fields by ignoring the properties
        while (ppss.hasNext() && (pps == null || pps.getPrefix().compareTo(fieldPath) < 0))
        {
          pps = ppss.next();
        }
       
        // if there are no properties for the field we must still
        // run a translator because some translators do not require
        // any fields to set a field value e.g. KeyTranslator
        Set<Property> childProperties;
        if (pps == null || !fieldPath.equals(pps.getPrefix()))
        {
          // there were no properties for this field
          childProperties = Collections.emptySet();
        }
        else
        {
          childProperties = pps.getProperties();
        }

        // get the correct translator for this field
        PropertyTranslator translator = decoder(field, childProperties);
View Full Code Here

TOP

Related Classes of com.vercer.engine.persist.util.PropertySets.PrefixPropertySet

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.