diff options
author | Olivier Lamy <olamy@apache.org> | 2014-03-24 03:17:49 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-03-24 03:17:49 +0000 |
commit | 8565793eed637237c99de7772a046b6ce368a0bc (patch) | |
tree | 50ad4c2ed7a2cebe48f9c53a90185eb2940ee3e9 /archiva-modules/plugins | |
parent | 7d10f63b87eb918253ee018d998975b9c0bbb63f (diff) | |
download | archiva-8565793eed637237c99de7772a046b6ce368a0bc.tar.gz archiva-8565793eed637237c99de7772a046b6ce368a0bc.zip |
fix remove artifact
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1580720 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/plugins')
-rw-r--r-- | archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java | 15 |
1 files changed, 5 insertions, 10 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 fd2eed936..31e99150e 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 @@ -1841,25 +1841,23 @@ public class CassandraMetadataRepository final String version, final String id ) throws MetadataRepositoryException { -/* logger.debug( "removeArtifact repositoryId: '{}', namespace: '{}', project: '{}', version: '{}', id: '{}'", + logger.debug( "removeArtifact repositoryId: '{}', namespace: '{}', project: '{}', version: '{}', id: '{}'", repositoryId, namespace, project, version, id ); String key = new ArtifactMetadataModel.KeyBuilder().withRepositoryId( repositoryId ).withNamespace( namespace ).withId( id ).withProjectVersion( version ).withProject( project ).build(); - ArtifactMetadataModel artifactMetadataModel = new ArtifactMetadataModel(); - artifactMetadataModel.setArtifactMetadataModelId( key ); - getArtifactMetadataModelEntityManager().remove( artifactMetadataModel ); + Keyspace keyspace = cassandraArchivaManager.getKeyspace(); + + this.artifactMetadataTemplate.deleteRow( key ); key = new ProjectVersionMetadataModel.KeyBuilder().withId( version ).withRepository( repositoryId ).withNamespace( namespace ).withProjectId( project ).build(); - ProjectVersionMetadataModel projectVersionMetadataModel = new ProjectVersionMetadataModel(); - projectVersionMetadataModel.setRowId( key ); + this.projectVersionMetadataModelTemplate.deleteRow( key ); - getProjectVersionMetadataModelEntityManager().remove( projectVersionMetadataModel );*/ } @Override @@ -1919,9 +1917,6 @@ public class CassandraMetadataRepository Keyspace keyspace = cassandraArchivaManager.getKeyspace(); StringSerializer ss = StringSerializer.get(); - // cql cannot run or in queries so running twice the query - - RangeSlicesQuery<String, String, String> query = HFactory // .createRangeSlicesQuery( keyspace, ss, ss, ss ) // .setColumnFamily( cassandraArchivaManager.getArtifactMetadataModelFamilyName() ) // |