Skip to content

Package: SingularAttribute

SingularAttribute

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: import cz.cvut.kbss.jopa.UnusedJPA;
18:
19: /**
20: * Instances of the type SingularAttribute represents persistent single-valued
21: * properties or fields.
22: *
23: * @param <X>
24: * The type containing the represented attribute
25: * @param <T>
26: * The type of the represented attribute
27: */
28: public interface SingularAttribute<X, T> extends Attribute<X, T>, Bindable<T> {
29:         /**
30:          * Is the attribute an id attribute. This method will return true if the
31:          * attribute is an attribute that corresponds to a simple id, an embedded
32:          * id, or an attribute of an id class.
33:          *
34:          * @return boolean indicating whether the attribute is an id
35:          */
36:         boolean isId();
37:
38:         /**
39:          * Is the attribute a version attribute.
40:          *
41:          * @return boolean indicating whether the attribute is
42:          *
43:          * a version attribute
44:          */
45:         @UnusedJPA
46:         @Deprecated
47:         boolean isVersion();
48:
49:         /**
50:          * Return the type that represents the type of the attribute.
51:          *
52:          * @return type of attribute
53:          */
54:         Type<T> getType();
55: }