Updated DataExtension API Builders (markdown)

Risto Lahtela 2021-04-07 20:10:53 +03:00
parent 5692219b5d
commit 7aa4a73c92

@ -75,6 +75,27 @@ public ExtensionDataBuilder lotsOfServerData() {
</details>
<details>
<summary>Clean value building example</summary>
```java
@DataBuilderProvider
public ExtensionDataBuilder lotsOfServerData() {
return newExtensionDataBuilder().addValue(Long.class, this::superheroCountValue);
}
private DataValue<Long> superheroCountValue() {
return valueBuilder("Superheroes")
.buildNumber(this::getSuperheroCount);
}
private long getSuperheroCount() {
return 0; // TODO implement later eh? :D
}
```
</details>
In addition to this value builder has a lot of other methods:
```
builder.valueBuilder("Example") // 50 char limit