9093a202502dcec5e3e9015231100c37d7b4da00
[aai/aai-common.git] / aai-core / src / main / java / org / onap / aai / db / schema / DBIndex.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 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  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
21  */
22 package org.onap.aai.db.schema;
23
24 import java.util.LinkedHashSet;
25 import java.util.Set;
26
27 import com.thinkaurelius.titan.core.schema.SchemaStatus;
28
29 public class DBIndex implements Named {
30
31         private String name = null;
32         private boolean unique = false;
33         private LinkedHashSet<DBProperty> properties = new LinkedHashSet<>();
34         private SchemaStatus status = null;
35         
36         /**
37          * Gets the name
38          */
39         public String getName() {
40                 return name;
41         }
42         
43         /**
44          * Sets the name.
45          *
46          * @param name the new name
47          */
48         public void setName(String name) {
49                 this.name = name;
50         }
51         
52         /**
53          * Checks if is unique.
54          *
55          * @return true, if is unique
56          */
57         public boolean isUnique() {
58                 return unique;
59         }
60         
61         /**
62          * Sets the unique.
63          *
64          * @param unique the new unique
65          */
66         public void setUnique(boolean unique) {
67                 this.unique = unique;
68         }
69         
70         /**
71          * Gets the properties.
72          *
73          * @return the properties
74          */
75         public Set<DBProperty> getProperties() {
76                 return properties;
77         }
78         
79         /**
80          * Sets the properties.
81          *
82          * @param properties the new properties
83          */
84         public void setProperties(LinkedHashSet<DBProperty> properties) {
85                 this.properties = properties;
86         }
87         
88         /**
89          * Gets the status.
90          *
91          * @return the status
92          */
93         public SchemaStatus getStatus() {
94                 return status;
95         }
96         
97         /**
98          * Sets the status.
99          *
100          * @param status the new status
101          */
102         public void setStatus(SchemaStatus status) {
103                 this.status = status;
104         }
105         
106 }