]> source.dussan.org Git - archiva.git/commitdiff
this id field is not anymore needed
authorOlivier Lamy <olamy@apache.org>
Thu, 20 Mar 2014 23:23:07 +0000 (23:23 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 20 Mar 2014 23:23:07 +0000 (23:23 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1579824 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/model/Repository.java

index 30c9ce55ea49b8ba3b19ab05f412401edfdc8378..402fa8a6368e9f8492af26c1165969508dc109ec 100644 (file)
@@ -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 + '\'' +
+            '}';
     }
 }