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.user;
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.user.UPlainAttr;
27 import org.apache.syncope.core.persistence.api.entity.user.UPlainAttrValue;
28 import org.apache.syncope.core.persistence.jpa.entity.AbstractPlainAttrValue;
29
30 @Entity
31 @Table(name = JPAUPlainAttrValue.TABLE)
32 public class JPAUPlainAttrValue extends AbstractPlainAttrValue implements UPlainAttrValue {
33
34 private static final long serialVersionUID = -6259576015647897446L;
35
36 public static final String TABLE = "UPlainAttrValue";
37
38 @ManyToOne
39 @NotNull
40 private JPAUPlainAttr attribute;
41
42 @Override
43 public UPlainAttr getAttr() {
44 return attribute;
45 }
46
47 @Override
48 public void setAttr(final PlainAttr<?> attr) {
49 checkType(attr, JPAUPlainAttr.class);
50 this.attribute = (JPAUPlainAttr) attr;
51 }
52 }