private ObjectDifferBuilder() { nodeQueryService = new DefaultNodeQueryService(categoryService, introspectionService, inclusionService, returnableNodeService, comparisonService, comparisonService); }
public ObjectDiffer build() { final DifferProvider differProvider = new DifferProvider(); final DifferDispatcher differDispatcher = newDifferDispatcher(differProvider); differProvider.push(newBeanDiffer(differDispatcher)); differProvider.push(newCollectionDiffer(differDispatcher)); differProvider.push(newMapDiffer(differDispatcher)); differProvider.push(newPrimitiveDiffer()); differProvider.pushAll(createCustomDiffers(differDispatcher)); return new ObjectDiffer(differDispatcher); }
public static ObjectDifferBuilder startBuilding() { return new ObjectDifferBuilder(); }
.startBuilding() .categories() .ofType(TRelationshipTemplate.SourceOrTargetElement.class) .toBe(REFERENCING_OBJECT) .and() .inclusion() .exclude() .propertyName("nodeTemplateOrRelationshipTemplate") .propertyName("fakeJacksonType") .propertyName("any") .propertyName("internalAny") .propertyName("prefix") .category(REFERENCING_OBJECT) .and() .identity() .setDefaultCollectionItemIdentityStrategy(identityStrategy) .and() .build() .compare(newVersion, oldVersion);
@SuppressWarnings({"unchecked"}) public <T> T merge(final T modified, final T base, final T head) { final DiffNode.Visitor visitor = new MergingDifferenceVisitor<T>(head, modified); final DiffNode difference = objectDiffer.compare(modified, base); difference.visit(visitor); return head; }
public SchemaCrawlerDifferBuilder() { objectDifferBuilder = ObjectDifferBuilder.startBuilding(); objectDifferBuilder.filtering().omitNodesWithState(State.UNTOUCHED); objectDifferBuilder.filtering().omitNodesWithState(State.CIRCULAR); objectDifferBuilder.inclusion().exclude().propertyName("fullName"); objectDifferBuilder.inclusion().exclude().propertyName("parent"); objectDifferBuilder.inclusion().exclude() .propertyName("exportedForeignKeys"); objectDifferBuilder.inclusion().exclude() .propertyName("importedForeignKeys"); objectDifferBuilder.inclusion().exclude().propertyName("deferrable"); objectDifferBuilder.inclusion().exclude().propertyName("initiallyDeferred"); }
public static ObjectDiffer buildDefault() { return startBuilding().build(); }
final Configuration configuration = new Configuration(); configuration.withoutProperty(PropertyPath.buildWith("businessKeyValuesMap")); configuration.withoutProperty(PropertyPath.buildWith("relativeEffectiveDate")); configuration.withoutProperty(PropertyPath.buildWith("effectiveLocalDate")); configuration.withoutProperty(PropertyPath.buildWith("userPrincipalId")); configuration.withoutProperty(PropertyPath.buildWith("groupKey")); configuration.withoutProperty(PropertyPath.buildWith("locationObj")); configuration.withoutProperty(PropertyPath.buildWith("location")); configuration.withoutProperty(PropertyPath.buildWith("institutionObj")); configuration.withoutProperty(PropertyPath.buildWith("institution")); ObjectDiffer objectDiffer = ObjectDifferFactory.getInstance(configuration); final Node root = objectDiffer.compare(currentPosition, previousPosition); final ChangedBusinessObjectVisitor visitor = new ChangedBusinessObjectVisitor(currentPosition, previousPosition, KRADServiceLocatorWeb.getDataDictionaryService()); root.visit(visitor);
Collection<?> previousCollection = null; if(collectionNode.canonicalGet(current) instanceof Collection) { currentCollection = (Collection<?>) collectionNode.canonicalGet(current); if(collectionNode.canonicalGet(previous) instanceof Collection) { previousCollection = (Collection<?>) collectionNode.canonicalGet(previous); boolean foundItemMatch = false; for(Object currentCollectionItem: currentCollection) { ObjectDiffer objectDiffer = ObjectDifferFactory.getInstance(); final Node root = objectDiffer.compare(currentCollectionItem, previousCollectionItem); if(!root.hasChanges()) { foundItemMatch = true; break;
public ObjectDiffer build() { return objectDifferBuilder.build(); }
Node root = differ.compare(working, base); root.visit(new MongoDiffHistoryChangeVisitor(change, working, base));
public ObjectMerger() { this.objectDiffer = ObjectDifferBuilder.buildDefault(); }
public ObjectDiffer build() { final DifferProvider differProvider = new DifferProvider(); final DifferDispatcher differDispatcher = newDifferDispatcher(differProvider); differProvider.push(newBeanDiffer(differDispatcher)); differProvider.push(newCollectionDiffer(differDispatcher)); differProvider.push(newMapDiffer(differDispatcher)); differProvider.push(newPrimitiveDiffer()); differProvider.pushAll(createCustomDiffers(differDispatcher)); return new ObjectDiffer(differDispatcher); }
@SuppressWarnings({"unchecked"}) public <T> T merge(final T modified, final T base, final T head) { final DiffNode.Visitor visitor = new MergingDifferenceVisitor<T>(head, modified); final DiffNode difference = objectDiffer.compare(modified, base); difference.visit(visitor); return head; }
public static ObjectDiffer buildDefault() { return startBuilding().build(); }
private ObjectDifferBuilder() { nodeQueryService = new DefaultNodeQueryService(categoryService, introspectionService, inclusionService, returnableNodeService, comparisonService, comparisonService); }
public static ObjectDifferBuilder startBuilding() { return new ObjectDifferBuilder(); }
public ObjectMerger() { this.objectDiffer = ObjectDifferBuilder.buildDefault(); }