[New] added ref methods to String* ParamBuilders

This commit is contained in:
Robert von Burg 2020-07-31 17:52:32 +02:00
parent 315e267eaf
commit 1b5e2f8c62
2 changed files with 40 additions and 0 deletions

View File

@ -1,5 +1,7 @@
package li.strolch.model.builder.params;
import static li.strolch.model.StrolchModelConstants.*;
import java.util.List;
import li.strolch.model.builder.BagBuilder;
@ -13,6 +15,24 @@ public class StringListParamBuilder<T extends ParameterBagContainerBuilder<T>>
super(builder, id, name);
}
public StringListParamBuilder<T> resourceRef(String type) {
this.interpretation = INTERPRETATION_RESOURCE_REF;
this.uom = type;
return this;
}
public StringListParamBuilder<T> orderRef(String type) {
this.interpretation = INTERPRETATION_ORDER_REF;
this.uom = type;
return this;
}
public StringListParamBuilder<T> activityRef(String type) {
this.interpretation = INTERPRETATION_ACTIVITY_REF;
this.uom = type;
return this;
}
@Override
public StringListParameter build() {
return build(new StringListParameter());

View File

@ -1,5 +1,7 @@
package li.strolch.model.builder.params;
import static li.strolch.model.StrolchModelConstants.*;
import li.strolch.model.builder.BagBuilder;
import li.strolch.model.builder.ParameterBagContainerBuilder;
import li.strolch.model.parameter.StringParameter;
@ -11,6 +13,24 @@ public class StringParamBuilder<T extends ParameterBagContainerBuilder<T>>
super(builder, id, name);
}
public StringParamBuilder<T> resourceRef(String type) {
this.interpretation = INTERPRETATION_RESOURCE_REF;
this.uom = type;
return this;
}
public StringParamBuilder<T> orderRef(String type) {
this.interpretation = INTERPRETATION_ORDER_REF;
this.uom = type;
return this;
}
public StringParamBuilder<T> activityRef(String type) {
this.interpretation = INTERPRETATION_ACTIVITY_REF;
this.uom = type;
return this;
}
@Override
public StringParameter build() {
return build(new StringParameter());