b1382b465598e0ae1fd74fbd51148e695e7f8dd2
[sdc.git] / openecomp-be / lib / openecomp-core-lib / openecomp-config-lib / src / main / java / org / openecomp / core / utilities / applicationconfig / dao / type / ApplicationConfigEntity.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.core.utilities.applicationconfig.dao.type;
22
23
24 import com.datastax.driver.mapping.annotations.ClusteringColumn;
25 import com.datastax.driver.mapping.annotations.PartitionKey;
26 import com.datastax.driver.mapping.annotations.Table;
27
28 @Table(keyspace = "dox", name = "application_config")
29 public class ApplicationConfigEntity {
30
31   @PartitionKey
32   private String namespace;
33   @ClusteringColumn
34   private String key;
35   private String value;
36
37   /**
38    * Every entity class must have a default constructor according to
39    * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
40    * Definition of mapped classes</a>.
41    */
42   public ApplicationConfigEntity() {
43     // Don't delete! Default constructor is required by DataStax driver
44   }
45
46   /**
47    * Instantiates a new Application config entity.
48    *
49    * @param namespace the namespace
50    * @param key       the key
51    * @param value     the value
52    */
53   public ApplicationConfigEntity(String namespace, String key, String value) {
54     this.namespace = namespace;
55     this.key = key;
56     this.value = value;
57   }
58
59   public String getNamespace() {
60     return namespace;
61   }
62
63   public void setNamespace(String namespace) {
64     this.namespace = namespace;
65   }
66
67   public String getKey() {
68     return key;
69   }
70
71   public void setKey(String key) {
72     this.key = key;
73   }
74
75   public String getValue() {
76     return value;
77   }
78
79   public void setValue(String value) {
80     this.value = value;
81   }
82
83 }