1 package org
.argeo
.api
.slc
.execution
;
5 /** A spec attribute whose value is a reference to a full fledged object. */
6 public class RefSpecAttribute
extends AbstractSpecAttribute
implements
8 private static final long serialVersionUID
= -3427797452955753574L;
9 private transient Class
<?
> targetClass
= String
.class;
11 private String targetClassName
;
12 private transient Object value
= null;
14 /** List to be chosen from */
15 private List
<RefValueChoice
> choices
= null;
17 public Object
getValue() {
21 public void setValue(Object value
) {
25 /** Default is {@link String} */
26 public Class
<?
> getTargetClass() {
30 public void setTargetClass(Class
<?
> targetClass
) {
31 this.targetClass
= targetClass
;
32 this.targetClassName
= targetClass
.getName();
35 public String
getTargetClassName() {
36 return targetClassName
;
39 /** @return can be null */
40 public List
<RefValueChoice
> getChoices() {
44 public void setChoices(List
<RefValueChoice
> choices
) {
45 this.choices
= choices
;
49 protected Object
clone() throws CloneNotSupportedException
{
50 RefSpecAttribute rsa
= new RefSpecAttribute();
51 rsa
.setTargetClass(targetClass
);
52 rsa
.setChoices(choices
);
57 public String
toString() {
58 return "Ref spec attribute [" + targetClass
+ "]"
59 + (value
!= null ?
"=" + value
: "");