aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-03-24 06:15:58 +0000
committerOlivier Lamy <olamy@apache.org>2014-03-24 06:15:58 +0000
commite4f454dd78a04a5ffb05eeb3b908946653893c5d (patch)
treeef7a9a1d43127d434a1dfca4675f9eb9ab144552
parent4b7e4391324d545159f331a2cf7ef24b1b93faed (diff)
downloadarchiva-e4f454dd78a04a5ffb05eeb3b908946653893c5d.tar.gz
archiva-e4f454dd78a04a5ffb05eeb3b908946653893c5d.zip
fix removeArtifact
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1580763 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java10
1 files 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<OrderedRows<String,String,String>> result = query.execute();
+ QueryResult<OrderedRows<String, String, String>> result = query.execute();
- for (Row<String,String,String> row : result.get())
+ for ( Row<String, String, String> row : result.get() )
{
this.artifactMetadataTemplate.deleteRow( row.getKey() );
}