Skip to content

Package: FieldSortCriteriaImpl

FieldSortCriteriaImpl

nameinstructionbranchcomplexitylinemethod
FieldSortCriteriaImpl(String, SortOrder)
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%
getAttributeName()
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%
getSortOrder()
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%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 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.commons.model.query;
14:
15: import org.eclipse.kapua.model.query.FieldSortCriteria;
16: import org.eclipse.kapua.model.query.SortOrder;
17:
18: /**
19: * Field sort criteria.
20: *
21: * @since 1.0
22: *
23: */
24: public class FieldSortCriteriaImpl implements FieldSortCriteria {
25:
26: /**
27: * Field attribute name
28: */
29: private String attributeName;
30:
31: /**
32: * Field sort order
33: */
34: private SortOrder sortOrder;
35:
36: /**
37: * Constructor
38: *
39: * @param attributeName
40: * @param sortOrder
41: */
42: public FieldSortCriteriaImpl(String attributeName, SortOrder sortOrder) {
43: this.attributeName = attributeName;
44: this.sortOrder = sortOrder;
45: }
46:
47: /**
48: * Get the sort attribute name
49: *
50: * @return
51: */
52: @Override
53: public String getAttributeName() {
54: return attributeName;
55: }
56:
57: /**
58: * Get the sort attribute order
59: *
60: * @return
61: */
62: @Override
63: public SortOrder getSortOrder() {
64: return sortOrder;
65: }
66: }