Skip to content

Package: XmlAdaptedSortField

XmlAdaptedSortField

nameinstructionbranchcomplexitylinemethod
XmlAdaptedSortField()
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%
XmlAdaptedSortField(SortDirection, String)
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
getDirection()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getField()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
setDirection(SortDirection)
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%
setField(String)
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:
20: /**
21: * {@link SortField} XML adaptation definition.
22: *
23: * @since 1.0.0
24: */
25: @XmlAccessorType(XmlAccessType.FIELD)
26: @XmlRootElement(name = "sortField")
27: public class XmlAdaptedSortField {
28:
29: @XmlElement
30: private String field;
31:
32: @XmlElement
33: private SortDirection direction;
34:
35: /**
36: * Constructor.
37: * <p>
38: * Required by JAXB
39: *
40: * @since 1.0.0
41: */
42: public XmlAdaptedSortField() {
43: }
44:
45: /**
46: * Constructor.
47: *
48: * @param direction The {@link SortDirection}.
49: * @param field The name of the field
50: * @since 1.0.0
51: */
52: public XmlAdaptedSortField(SortDirection direction, String field) {
53: this.direction = direction;
54: this.field = field;
55: }
56:
57: /**
58: * Gets the field name.
59: *
60: * @return The field name.
61: * @since 1.0.0
62: */
63: public String getField() {
64: return field;
65: }
66:
67: /**
68: * Sets the field name.
69: *
70: * @param field The field name.
71: * @since 1.0.0
72: */
73: public void setField(String field) {
74: this.field = field;
75: }
76:
77: /**
78: * Gets the {@link SortDirection}.
79: *
80: * @return The {@link SortDirection}.
81: * @since 1.0.0
82: */
83: public SortDirection getDirection() {
84: return direction;
85: }
86:
87: /**
88: * Sets the {@link SortDirection}.
89: *
90: * @param direction The {@link SortDirection}.
91: * @since 1.0.0
92: */
93: public void setDirection(SortDirection direction) {
94: this.direction = direction;
95: }
96: }