]> source.dussan.org Git - archiva.git/commitdiff
Fixing broken code.
authorJoakim Erdfelt <joakime@apache.org>
Tue, 27 Feb 2007 22:19:08 +0000 (22:19 +0000)
committerJoakim Erdfelt <joakime@apache.org>
Tue, 27 Feb 2007 22:19:08 +0000 (22:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@512450 13f79535-47bb-0310-9956-ffa450edef68

archiva-database/src/main/java/org/apache/maven/archiva/database/artifact/ArtifactPersistence.java

index 569e1d63f7876902e67af50080a8bc90155fe52e..d59cbf9ccecb474454c4d9ffa724b0105a40fe09 100644 (file)
@@ -42,17 +42,20 @@ public class ArtifactPersistence
     {
         return new String[] { "ArtifactKeys" };
     }
-    
-    private ArtifactKey toKey(Artifact artifact)
+
+    private ArtifactKey toKey( Artifact artifact )
     {
         ArtifactKey key = new ArtifactKey();
         key.setGroupId( artifact.getGroupId() );
         key.setArtifactId( artifact.getArtifactId() );
-        key.set
+        key.setVersion( artifact.getVersion() );
+        key.setClassifier( artifact.getClassifier() );
+        key.setType( artifact.getType() );
         return key;
     }
 
-    public void create( Artifact artifact ) throws ArchivaDatabaseException
+    public void create( Artifact artifact )
+        throws ArchivaDatabaseException
     {
         SqlMapClient sqlMap = ibatisHelper.getSqlMapClient();
 
@@ -62,7 +65,6 @@ public class ArtifactPersistence
 
             getLogger().info( "Adding artifact." );
             sqlMap.update( "addArtifact", artifact );
-            
 
             sqlMap.commitTransaction();
         }