Skip to content

Package: PluralAttribute

PluralAttribute

Coverage

1: /**
2: * Copyright (C) 2016 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.metamodel;
16:
17: /**
18: * Instances of the type PluralAttribute represent persistent collection-valued
19: * attributes.
20: *
21: * @param <X>
22: * The type the represented collection belongs to
23: * @param <C>
24: * The type of the represented collection
25: * @param <E>
26: * The element type of the represented collection
27: */
28: public interface PluralAttribute<X, C, E> extends Attribute<X, C>, Bindable<E> {
29:         public static enum CollectionType {
30:                 COLLECTION, SET, LIST, MAP
31:         }
32:
33:         /**
34:          * Return the collection type.
35:          *
36:          * @return collection type
37:          */
38:         CollectionType getCollectionType();
39:
40:         /**
41:          * Return the type representing the element type of the collection.
42:          *
43:          * @return element type
44:          */
45:         Type<E> getElementType();
46: }