2 * ============LICENSE_START=======================================================
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
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.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.be.dao.model;
23 import java.io.Serializable;
26 * Result for a multiple data query.
30 @SuppressWarnings("PMD.UnusedPrivateField")
31 public class GetMultipleDataResult<T> implements Serializable {
32 public String[] getTypes() {
36 public T[] getData() {
40 public void setTypes(String[] types) {
41 this.types = types.clone();
44 public void setData(T[] data) {
45 this.data = data.clone();
48 public void setQueryDuration(long queryDuration) {
49 this.queryDuration = queryDuration;
52 public void setTotalResults(long totalResults) {
53 this.totalResults = totalResults;
56 public void setFrom(int from) {
60 public void setTo(int to) {
64 public long getQueryDuration() {
68 public long getTotalResults() {
72 public int getFrom() {
80 private static final long serialVersionUID = 1L;
82 private String[] types;
84 private long queryDuration;
85 private long totalResults;
90 * Construct an object only with data and types
95 public GetMultipleDataResult(String[] types, T[] data) {
96 this.types = types.clone();
97 this.data = data.clone();
100 public GetMultipleDataResult(String[] types, Object[] data, long queryDuration, long totalResults, int from,
103 this.types = types.clone();
104 this.data = (T[]) data.clone();
105 this.queryDuration = queryDuration;
106 this.totalResults = totalResults;
111 public GetMultipleDataResult() {