Skip to content

Package: XmlAdaptedSortFields

XmlAdaptedSortFields

nameinstructionbranchcomplexitylinemethod
XmlAdaptedSortFields()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getAdaptedSortFields()
M: 10 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
setAdaptedSortFields(List)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2018, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.storable.model.query;
14:
15: import javax.xml.bind.annotation.XmlAccessType;
16: import javax.xml.bind.annotation.XmlAccessorType;
17: import javax.xml.bind.annotation.XmlElement;
18: import javax.xml.bind.annotation.XmlRootElement;
19: import java.util.ArrayList;
20: import java.util.List;
21:
22: /**
23: * {@link List} of {@link SortField} XML adaptation definition.
24: *
25: * @since 1.0.0
26: */
27: @XmlRootElement(name = "sortFields")
28: @XmlAccessorType(XmlAccessType.PROPERTY)
29: public class XmlAdaptedSortFields {
30:
31: private List<XmlAdaptedSortField> adaptedSortFields;
32:
33: /**
34: * Constructor.
35: * <p>
36: * Required by JAXB.
37: *
38: * @since 1.0.0
39: */
40: public XmlAdaptedSortFields() {
41: super();
42: }
43:
44: /**
45: * Gets the {@link List} of {@link SortField}s.
46: *
47: * @return The {@link List} of {@link SortField}s.
48: * @since 1.0.0
49: */
50: @XmlElement(name = "sortField")
51: public List<XmlAdaptedSortField> getAdaptedSortFields() {
52:• return adaptedSortFields != null ? adaptedSortFields : new ArrayList<>();
53: }
54:
55: /**
56: * Sets the {@link List} of {@link SortField}s.
57: *
58: * @param adaptedSortFields The {@link List} of {@link SortField}s.
59: * @since 1.0.0
60: */
61: public void setAdaptedSortFields(List<XmlAdaptedSortField> adaptedSortFields) {
62: this.adaptedSortFields = adaptedSortFields;
63: }
64:
65: }