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