Class BookNodeBuilder
- java.lang.Object
-
- com.activeviam.risk.ref.parentchild.builders.ParentChildNodeBuilder<BookParentChildNode,BookNodeBuilder>
-
- com.activeviam.risk.ref.parentchild.builders.BookNodeBuilder
-
- All Implemented Interfaces:
Cloneable
public class BookNodeBuilder extends ParentChildNodeBuilder<BookParentChildNode,BookNodeBuilder>
The BookNodeBuilder is an instance ofParentChildNodeBuilder
that provides a way to make book nodes. It follows a standard builder pattern for making objects. The primary benefit this builder provides over allowing the user to just create their own nodes is it provides a way to map field types from strings to booleans. Nodes in the datastore itself may have fields with "Y" or "N" instead of the data models true/false. This builder converts those values for a caller without the caller having to worry about the type of the fields for the modal.
-
-
Constructor Summary
Constructors Constructor Description BookNodeBuilder(LocalDate asOf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BookParentChildNode
build()
Takes all previously declared fields from this builder and generates the node model.BookNodeBuilder
withCategory(String category)
BookNodeBuilder
withDesk(boolean isDesk)
BookNodeBuilder
withDesk(String desk)
-
Methods inherited from class com.activeviam.risk.ref.parentchild.builders.ParentChildNodeBuilder
withName, withParent
-
-
-
-
Field Detail
-
IS_DESK
public static final String IS_DESK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BookNodeBuilder
public BookNodeBuilder(LocalDate asOf)
-
-
Method Detail
-
withDesk
public BookNodeBuilder withDesk(boolean isDesk)
-
withDesk
public BookNodeBuilder withDesk(String desk)
-
withCategory
public BookNodeBuilder withCategory(String category)
-
build
public BookParentChildNode build()
Takes all previously declared fields from this builder and generates the node model. If the datastore global default string or null where set as the field then default model data is provided to the corresponding field in the data modal (objects use nulls and primitives use their typical default values.) Strings that follow a "Y" or "N" pattern are converted to boolean on the data modal. If a string is not a "Y" or "N" then the boolean defaults to false.- Specified by:
build
in classParentChildNodeBuilder<BookParentChildNode,BookNodeBuilder>
-
-