From e4f454dd78a04a5ffb05eeb3b908946653893c5d Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 24 Mar 2014 06:15:58 +0000 Subject: [PATCH] fix removeArtifact git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1580763 13f79535-47bb-0310-9956-ffa450edef68 --- .../cassandra/CassandraMetadataRepository.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java index 62b3bf3be..90d9a4e76 100644 --- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java +++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java @@ -1690,15 +1690,13 @@ public class CassandraMetadataRepository logger.debug( "removeArtifact repositoryId: '{}', namespace: '{}', project: '{}', version: '{}', id: '{}'", artifactMetadata.getRepositoryId(), artifactMetadata.getNamespace(), artifactMetadata.getProject(), baseVersion, artifactMetadata.getId() ); -/* String key = + String key = new ArtifactMetadataModel.KeyBuilder().withRepositoryId( artifactMetadata.getRepositoryId() ).withNamespace( artifactMetadata.getNamespace() ).withId( artifactMetadata.getId() ).withProjectVersion( baseVersion ).withProject( artifactMetadata.getProject() ).build(); - ArtifactMetadataModel artifactMetadataModel = new ArtifactMetadataModel(); - artifactMetadataModel.setArtifactMetadataModelId( key ); + this.artifactMetadataTemplate.deleteRow( key ); - getArtifactMetadataModelEntityManager().remove( artifactMetadataModel );*/ } @Override @@ -1798,9 +1796,9 @@ public class CassandraMetadataRepository .addEqualsExpression( "project", projectId ) // .addEqualsExpression( "projectVersion", projectVersion ); - QueryResult> result = query.execute(); + QueryResult> result = query.execute(); - for (Row row : result.get()) + for ( Row row : result.get() ) { this.artifactMetadataTemplate.deleteRow( row.getKey() ); } -- 2.39.5