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 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" ); } } }
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 ); }
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 ); }