Class BookNodeBuilder

  • All Implemented Interfaces:
    Cloneable

    public class BookNodeBuilder
    extends ParentChildNodeBuilder<BookParentChildNode,​BookNodeBuilder>
    The BookNodeBuilder is an instance of ParentChildNodeBuilder 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 Detail

      • BookNodeBuilder

        public BookNodeBuilder​(LocalDate asOf)
    • Method Detail

      • 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 class ParentChildNodeBuilder<BookParentChildNode,​BookNodeBuilder>