1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.argeo.slc.core.execution;
17
18 import java.util.List;
19
20
21 public class RefSpecAttribute extends AbstractSpecAttribute implements
22 Cloneable {
23 private static final long serialVersionUID = -3427797452955753574L;
24 private transient Class<?> targetClass = String.class;
25
26 private String targetClassName;
27 private transient Object value = null;
28
29
30 private List<RefValueChoice> choices = null;
31
32 public Object getValue() {
33 return value;
34 }
35
36 public void setValue(Object value) {
37 this.value = value;
38 }
39
40
41 public Class<?> getTargetClass() {
42 return targetClass;
43 }
44
45 public void setTargetClass(Class<?> targetClass) {
46 this.targetClass = targetClass;
47 this.targetClassName = targetClass.getName();
48 }
49
50 public String getTargetClassName() {
51 return targetClassName;
52 }
53
54
55 public List<RefValueChoice> getChoices() {
56 return choices;
57 }
58
59 public void setChoices(List<RefValueChoice> choices) {
60 this.choices = choices;
61 }
62
63 @Override
64 protected Object clone() throws CloneNotSupportedException {
65 RefSpecAttribute rsa = new RefSpecAttribute();
66 rsa.setTargetClass(targetClass);
67 rsa.setChoices(choices);
68 return rsa;
69 }
70
71 @Override
72 public String toString() {
73 return "Ref spec attribute [" + targetClass + "]"
74 + (value != null ? "=" + value : "");
75 }
76
77 }