From: Olivier Lamy Date: Thu, 20 Mar 2014 23:23:07 +0000 (+0000) Subject: this id field is not anymore needed X-Git-Tag: archiva-2.1.0~229 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=633b14e20d47ddbb08c55f1a0843c8785b364937;p=archiva.git this id field is not anymore needed git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1579824 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/Repository.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/Repository.java index 30c9ce55e..402fa8a63 100644 --- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/Repository.java +++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/Repository.java @@ -30,7 +30,6 @@ public class Repository implements Serializable { - private String id; private String name; @@ -39,20 +38,9 @@ public class Repository // no op } - public Repository( String id ) + public Repository( String name ) { - this.id = id; - this.name = id; - } - - public String getId() - { - return id; - } - - public void setId( String id ) - { - this.id = id; + this.name = name; } public String getName() @@ -79,7 +67,7 @@ public class Repository Repository that = (Repository) o; - if ( !id.equals( that.id ) ) + if ( !name.equals( that.name ) ) { return false; } @@ -90,18 +78,14 @@ public class Repository @Override public int hashCode() { - return id.hashCode(); + return name.hashCode(); } - @Override public String toString() { - final StringBuilder sb = new StringBuilder( "Repository{" ); - sb.append( "id='" ).append( id ).append( '\'' ); - sb.append( ", name='" ).append( name ).append( '\'' ); - //sb.append( ", namespaces=" ).append( namespaces ); - sb.append( '}' ); - return sb.toString(); + return "Repository{" + + "name='" + name + '\'' + + '}'; } }