Skip to content

Package: SingularAttribute

SingularAttribute

Coverage

1: /**
2: * Copyright (C) 2019 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: /**
31: * Is the attribute an id attribute. This method will return true if the
32: * attribute is an attribute that corresponds to a simple id, an embedded
33: * id, or an attribute of an id class.
34: *
35: * @return boolean indicating whether the attribute is an id
36: */
37: boolean isId();
38:
39: /**
40: * Is the attribute a version attribute.
41: *
42: * @return boolean indicating whether the attribute is
43: *
44: * a version attribute
45: */
46: @UnusedJPA
47: @Deprecated
48: boolean isVersion();
49:
50: /**
51: * Return the type that represents the type of the attribute.
52: *
53: * @return type of attribute
54: */
55: Type<T> getType();
56: }