2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (c) 2017 AT&T Intellectual Property
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 * ============LICENSE_END=============================================
20 * ====================================================================
23 package org.onap.music.datastore;
25 import java.util.ArrayList;
26 import java.util.List;
33 public class PreparedQueryObject {
36 private List<Object> values;
37 private StringBuilder query;
38 private String consistency;
39 private String keyspaceName;
40 private String tableName;
41 private String operation;
42 private String primaryKeyValue;
46 public String getKeyspaceName() {
50 public void setKeyspaceName(String keyspaceName) {
51 this.keyspaceName = keyspaceName;
54 public String getTableName() {
58 public void setTableName(String tableName) {
59 this.tableName = tableName;
62 public String getOperation() {
66 public void setOperation(String operation) {
67 this.operation = operation;
70 public String getPrimaryKeyValue() {
71 return primaryKeyValue;
74 public void setPrimaryKeyValue(String primaryKeyValue) {
75 this.primaryKeyValue = primaryKeyValue;
78 public String getConsistency() {
82 public void setConsistency(String consistency) {
83 this.consistency = consistency;
89 public PreparedQueryObject() {
91 this.values = new ArrayList<>();
92 this.query = new StringBuilder();
98 public List<Object> getValues() {
105 public void addValue(Object o) {
112 public void appendQueryString(String s) {
113 this.query.append(s);
115 public void replaceQueryString(String s) {
116 this.query.replace(0, query.length(), s);
122 public String getQuery() {
123 return this.query.toString();