Permalink
Browse files

OGM-195 Harmonize toString implementation of EntityKey, AssociationKe…

…y and RowKey
  • Loading branch information...
1 parent db10003 commit 709fa35fe6820e3ed7d49bc2968a5cac33377a50 @emmanuelbernard emmanuelbernard committed Jun 4, 2012
@@ -134,11 +134,10 @@ public int hashCode() {
public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append( "AssociationKey" );
- sb.append( "{table='" ).append( table ).append( "'" );
- for( int index = 0 ; index < columnNames.length ; index++) {
- sb.append( columnNames[index] ).append( " = '" ).append( columnValues[index] ).append( "'" );
- }
- sb.append( "}" );
+ sb.append( "{table='" ).append( table ).append( '\'' );
+ sb.append( ", columnNames=" ).append( columnNames == null ? "null" : Arrays.asList( columnNames ).toString() );
+ sb.append( ", columnValues=" ).append( columnValues == null ? "null" : Arrays.asList( columnValues ).toString() );
+ sb.append( '}' );
return sb.toString();
}
@@ -97,7 +97,7 @@ public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append( "RowKey" );
sb.append( "{table='" ).append( table ).append( '\'' );
- sb.append( ", columns=" ).append( columnNames == null ? "null" : Arrays.asList( columnNames ).toString() );
+ sb.append( ", columnNames=" ).append( columnNames == null ? "null" : Arrays.asList( columnNames ).toString() );
sb.append( ", columnValues=" )
.append( columnValues == null ? "null" : Arrays.asList( columnValues ).toString() );
sb.append( '}' );

0 comments on commit 709fa35

Please sign in to comment.