1package org.apache.archiva.metadata.repository.cassandra.model;
23/*4 * Licensed to the Apache Software Foundation (ASF) under one5 * or more contributor license agreements. See the NOTICE file6 * distributed with this work for additional information7 * regarding copyright ownership. The ASF licenses this file8 * to you under the Apache License, Version 2.0 (the9 * "License"); you may not use this file except in compliance10 * with the License. You may obtain a copy of the License at11 *12 * http://www.apache.org/licenses/LICENSE-2.013 *14 * Unless required by applicable law or agreed to in writing,15 * software distributed under the License is distributed on an16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY17 * KIND, either express or implied. See the License for the18 * specific language governing permissions and limitations19 * under the License.20 */2122import org.apache.archiva.metadata.repository.cassandra.CassandraUtils;
2324import java.io.Serializable;
2526/**27 * @author Olivier Lamy28 * @since 2.0.029 */30publicclassProject31implements Serializable
32 {
3334publicstaticclass KeyBuilder
35 {
3637privateNamespace namespace;
3839private String projectId;
4041public KeyBuilder()
42 {
43// no op44 }
4546public KeyBuilder withNamespace( Namespace namespace )
47 {
48this.namespace = namespace;
49returnthis;
50 }
5152public KeyBuilder withProjectId( String projectId )
53 {
54this.projectId = projectId;
55returnthis;
56 }
575859public String build()
60 {
61// FIXME add some controls62return CassandraUtils.generateKey( new Namespace.KeyBuilder().withNamespace( this.namespace ).build(),
63this.projectId );
64 }
65 }
66 }