diff.add( this + " isn't indexed in " + indexName + " for mine" ); continue; diff.add( this + " isn't indexed in " + indexName + " for other" ); continue; diff.add( "other index had a different mapping count than me for node " + this + " mine:" + thisIndex + ", other:" + otherIndex ); continue; otherIndex.get( indexEntry.getKey() ) ) ) diff.add( "other index had a different value indexed for " + indexEntry.getKey() + "=" + indexEntry.getValue() + ", namely " + otherIndex.get( indexEntry.getKey() ) + " for " + this );
diff.add( this + " isn't indexed in " + indexName + " for mine" ); continue; diff.add( this + " isn't indexed in " + indexName + " for other" ); continue; diff.add( "other index had a different mapping count than me for node " + this + " mine:" + thisIndex + ", other:" + otherIndex ); continue; otherIndex.get( indexEntry.getKey() ) ) ) diff.add( "other index had a different value indexed for " + indexEntry.getKey() + "=" + indexEntry.getValue() + ", namely " + otherIndex.get( indexEntry.getKey() ) + " for " + this );
private void compareRelationships( NodeRep other, DiffReport diff ) { for ( PropertiesRep rel : outRelationships.values() ) { PropertiesRep otherRel = other.outRelationships.get( rel.entityId ); if ( otherRel == null ) { diff.add( "I have relationship " + rel.entityId + " which other don't" ); continue; } rel.compareWith( otherRel, diff ); } for ( Long id : other.outRelationships.keySet() ) { if ( !outRelationships.containsKey( id ) ) { diff.add( "Other has relationship " + id + " which I don't" ); } } }
private void nodeDiff( DbRepresentation other, DiffReport diff ) { for ( NodeRep node : nodes.values() ) { NodeRep otherNode = other.nodes.get( node.id ); if ( otherNode == null ) { diff.add( "I have node " + node.id + " which other doesn't" ); continue; } node.compareWith( otherNode, diff ); } for ( Long id : other.nodes.keySet() ) { if ( !nodes.containsKey( id ) ) { diff.add( "Other has node " + id + " which I don't" ); } } }
private void indexDiff( DbRepresentation other, DiffReport diff ) { for ( IndexDefinition schemaIndex : schemaIndexes ) { if ( !other.schemaIndexes.contains( schemaIndex ) ) { diff.add( "I have schema index " + schemaIndex + " which other doesn't" ); } } for ( IndexDefinition otherSchemaIndex : other.schemaIndexes ) { if ( !schemaIndexes.contains( otherSchemaIndex ) ) { diff.add( "Other has schema index " + otherSchemaIndex + " which I don't" ); } } }
private void constraintDiff( DbRepresentation other, DiffReport diff ) { for ( ConstraintDefinition constraint : constraints ) { if ( !other.constraints.contains( constraint ) ) { diff.add( "I have constraint " + constraint + " which other doesn't" ); } } for ( ConstraintDefinition otherConstraint : other.constraints ) { if ( !constraints.contains( otherConstraint ) ) { diff.add( "Other has constraint " + otherConstraint + " which I don't" ); } } }
void compareWith( NodeRep other, DiffReport diff ) { if ( other.id != id ) { diff.add( "Id differs mine:" + id + ", other:" + other.id ); } properties.compareWith( other.properties, diff ); if ( index != null && other.index != null ) { compareIndex( other, diff ); } compareRelationships( other, diff ); }
protected void compareWith( PropertiesRep other, DiffReport diff ) { boolean equals = props.equals( other.props ); if ( !equals ) { diff.add( "Properties diff for " + entityToString + " mine:" + props + ", other:" + other.props ); } }
private void compareRelationships( NodeRep other, DiffReport diff ) { for ( PropertiesRep rel : outRelationships.values() ) { PropertiesRep otherRel = other.outRelationships.get( rel.entityId ); if ( otherRel == null ) { diff.add( "I have relationship " + rel.entityId + " which other don't" ); continue; } rel.compareWith( otherRel, diff ); } for ( Long id : other.outRelationships.keySet() ) { if ( !outRelationships.containsKey( id ) ) { diff.add( "Other has relationship " + id + " which I don't" ); } } }
private void nodeDiff( DbRepresentation other, DiffReport diff ) { for ( NodeRep node : nodes.values() ) { NodeRep otherNode = other.nodes.get( node.id ); if ( otherNode == null ) { diff.add( "I have node " + node.id + " which other doesn't" ); continue; } node.compareWith( otherNode, diff ); } for ( Long id : other.nodes.keySet() ) { if ( !nodes.containsKey( id ) ) { diff.add( "Other has node " + id + " which I don't" ); } } }
private void constraintDiff( DbRepresentation other, DiffReport diff ) { for ( ConstraintDefinition constraint : constraints ) { if ( !other.constraints.contains( constraint ) ) { diff.add( "I have constraint " + constraint + " which other doesn't" ); } } for ( ConstraintDefinition otherConstraint : other.constraints ) { if ( !constraints.contains( otherConstraint ) ) { diff.add( "Other has constraint " + otherConstraint + " which I don't" ); } } }
private void indexDiff( DbRepresentation other, DiffReport diff ) { for ( IndexDefinition schemaIndex : schemaIndexes ) { if ( !other.schemaIndexes.contains( schemaIndex ) ) { diff.add( "I have schema index " + schemaIndex + " which other doesn't" ); } } for ( IndexDefinition otherSchemaIndex : other.schemaIndexes ) { if ( !schemaIndexes.contains( otherSchemaIndex ) ) { diff.add( "Other has schema index " + otherSchemaIndex + " which I don't" ); } } }
void compareWith( NodeRep other, DiffReport diff ) { if ( other.id != id ) { diff.add( "Id differs mine:" + id + ", other:" + other.id ); } properties.compareWith( other.properties, diff ); if ( index != null && other.index != null ) { compareIndex( other, diff ); } compareRelationships( other, diff ); }
protected void compareWith( PropertiesRep other, DiffReport diff ) { boolean equals = props.equals( other.props ); if ( !equals ) { diff.add( "Properties diff for " + entityToString + " mine:" + props + ", other:" + other.props ); } }