Package org.jitterbit.util.persist

Examples of org.jitterbit.util.persist.Persistor.createChild()


        Iterable<Field> fields = seg.getFieldList();
        if (fields != null) {
            Persistor fieldRoot = media.createChild(FIELDS);
            FieldPersistor fieldPersistor = new FieldPersistor();
            for (Field f : fields) {
                fieldPersistor.save(f, fieldRoot.createChild(FIELD));
            }
        }
    }
   
    /**
 
View Full Code Here


                return;
            }
        }
        for (Map.Entry<DatabaseObject, Integer> e : objects.entrySet()) {
            Persistor item = root.createChild("Item");
            op.save(e.getKey(), item.createChild("Object"));
            item.putInteger("value", e.getValue());
        }
    }

    public BeginEndQuote getBeginEndQuote() {
View Full Code Here

    }

    private void writeSiblingIds(Persistor p) {
        Persistor root = p.createChild("Siblings");
        for (OperationId id : siblings) {
            root.createChild("Sibling").putString("opId", id.toString());
        }
    }

    private void writeFunctionIds(Persistor p) {
        Persistor root = p.createChild("Functions");
View Full Code Here

   
    @Test
    public void ensureRestoreFromInvalidPersistorFails() {
        try {
            Persistor p = BinaryPersistor.newRoot("CakeRecipy");
            p.createChild("Ingredients").putInteger("NumberOfEggs", 4);
            FieldDelimiter.fromPersistor(p);
            fail();
        } catch (Exception ex) {/*expected*/}
    }
}
View Full Code Here

    private void writeSegmentsTo(Persistor media) {
        SegmentPersistor writer = new SegmentPersistor();
        Persistor segmentRoot = media.createChild("Segments");
        for (Segment s : segmentList) {
            writer.save(s, segmentRoot.createChild("Segment"));
        }
    }

    @Override
    public void restoreFrom(Persistor media) {
View Full Code Here

    }

    private void writeMappings(Persistor p) {
        Persistor root = p.createChild("Mappings");
        for (String s : mappings) {
            root.createChild("Mapping").putText("expr", s);
        }
    }

    private void writeInvalidMappings(Persistor p) {
        Persistor root = p.createChild("InvalidMappings");
View Full Code Here

    }

    private void writeInvalidMappings(Persistor p) {
        Persistor root = p.createChild("InvalidMappings");
        for (InvalidMapping inv : invalidMappings) {
            InvalidMappingPersistor.save(inv, root.createChild("Mapping"));
        }
    }

    private void writeRenamedNodes(Persistor p) {
        Persistor root = p.createChild("RenamedNodes");
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.