1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.core.persistence.jpa.entity.anyobject;
20
21 import javax.persistence.Entity;
22 import javax.persistence.ManyToOne;
23 import javax.persistence.Table;
24 import javax.validation.constraints.NotNull;
25 import org.apache.syncope.core.persistence.api.entity.PlainAttr;
26 import org.apache.syncope.core.persistence.api.entity.anyobject.APlainAttr;
27 import org.apache.syncope.core.persistence.api.entity.anyobject.APlainAttrValue;
28 import org.apache.syncope.core.persistence.jpa.entity.AbstractPlainAttrValue;
29
30 @Entity
31 @Table(name = JPAAPlainAttrValue.TABLE)
32 public class JPAAPlainAttrValue extends AbstractPlainAttrValue implements APlainAttrValue {
33
34 private static final long serialVersionUID = -2965487882824889272L;
35
36 public static final String TABLE = "APlainAttrValue";
37
38 @ManyToOne
39 @NotNull
40 private JPAAPlainAttr attribute;
41
42 @Override
43 public APlainAttr getAttr() {
44 return attribute;
45 }
46
47 @Override
48 public void setAttr(final PlainAttr<?> attr) {
49 checkType(attr, JPAAPlainAttr.class);
50 this.attribute = (JPAAPlainAttr) attr;
51 }
52 }