Skip to content

Package: Selection

Selection

Coverage

1: /**
2: * Copyright (C) 2023 Czech Technical University in Prague
3: *
4: * This program is free software: you can redistribute it and/or modify it under
5: * the terms of the GNU General Public License as published by the Free Software
6: * Foundation, either version 3 of the License, or (at your option) any
7: * later version.
8: *
9: * This program is distributed in the hope that it will be useful, but WITHOUT
10: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12: * details. You should have received a copy of the GNU General Public License
13: * along with this program. If not, see <http://www.gnu.org/licenses/>.
14: */
15: package cz.cvut.kbss.jopa.model.query.criteria;
16:
17: import cz.cvut.kbss.jopa.model.query.TupleElement;
18:
19: import java.util.List;
20:
21: public interface Selection<X> extends TupleElement<X> {
22:
23: /**
24: * Whether the selection item is a compound selection.
25: * Compounded selection is NOT YET SUPPORTED. Therefore, the method always returns false.
26: * @return boolean indicating whether the selection is a compound selection
27: */
28: boolean isCompoundedSelection();
29:
30: /**
31: * Return the selection items composing a compound selection. Modifications to the list do not affect the query.
32: * Compounded selection is NOT YET SUPPORTED. Therefore, the method always throws IllegalStateException.
33: * @return list of selection items
34: * @throws IllegalStateException if selection is not a compound selection
35: */
36: List<Selection<?>> getCompoundedSelectionItems();
37: }