diff options
author | Olivier Lamy <olamy@apache.org> | 2014-03-24 06:15:34 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-03-24 06:15:34 +0000 |
commit | d18ba9ef2187d5e46cf4ab0158d5179b94e76ef4 (patch) | |
tree | d0a538e1103512f7ccc1aadc6e122ad05f663de6 /archiva-modules | |
parent | 869291b35110fbe85810c9fe591228b96b19b40a (diff) | |
download | archiva-d18ba9ef2187d5e46cf4ab0158d5179b94e76ef4.tar.gz archiva-d18ba9ef2187d5e46cf4ab0158d5179b94e76ef4.zip |
cleanup code
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1580761 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepository.java | 35 |
1 files changed, 0 insertions, 35 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 1714f25fd..89f36b0e8 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 @@ -1096,43 +1096,8 @@ public class CassandraMetadataRepository } - key = new ArtifactMetadataModel.KeyBuilder().withNamespace( namespace ).withProject( projectId ).withId( - artifactMeta.getId() ).withProjectVersion( projectVersion ).build(); ArtifactMetadataModel artifactMetadataModel = new ArtifactMetadataModel(); - exists = this.artifactMetadataTemplate.isColumnsExist( key ); - - if ( exists ) - { - // updater - ColumnFamilyUpdater<String, String> updater = this.artifactMetadataTemplate.createUpdater( key ); - updater.setLong( "fileLastModified", artifactMeta.getFileLastModified().getTime() ); - updater.setLong( "whenGathered", artifactMeta.getWhenGathered().getTime() ); - updater.setLong( "size", artifactMeta.getSize() ); - updater.setString( "md5", artifactMeta.getMd5() ); - updater.setString( "sha1", artifactMeta.getSha1() ); - updater.setString( "version", artifactMeta.getVersion() ); - this.artifactMetadataTemplate.update( updater ); - } - else - { - String cf = this.cassandraArchivaManager.getArtifactMetadataModelFamilyName(); - // create - this.artifactMetadataTemplate.createMutator() // - .addInsertion( key, cf, column( "id", artifactMeta.getId() ) )// - .addInsertion( key, cf, column( "repositoryName", repositoryId ) ) // - .addInsertion( key, cf, column( "namespaceId", namespaceId ) ) // - .addInsertion( key, cf, column( "project", artifactMeta.getProject() ) ) // - .addInsertion( key, cf, column( "projectVersion", artifactMeta.getProjectVersion() ) ) // - .addInsertion( key, cf, column( "version", artifactMeta.getVersion() ) ) // - .addInsertion( key, cf, column( "fileLastModified", artifactMeta.getFileLastModified().getTime() ) ) // - .addInsertion( key, cf, column( "size", artifactMeta.getSize() ) ) // - .addInsertion( key, cf, column( "md5", artifactMeta.getMd5() ) ) // - .addInsertion( key, cf, column( "sha1", artifactMeta.getSha1() ) ) // - .addInsertion( key, cf, column( "whenGathered", artifactMeta.getWhenGathered().getTime() ) )// - .execute(); - } - artifactMetadataModel.setRepositoryId( repositoryId ); artifactMetadataModel.setNamespace( namespaceId ); artifactMetadataModel.setProject( projectId ); |